ppc: Fix warning messages when IBM and IEEE long double are mixed

Message ID 20180502221844.6294-1-tuliom@linux.ibm.com
State New
Headers show
Series
  • ppc: Fix warning messages when IBM and IEEE long double are mixed
Related show

Commit Message

Tulio Magno Quites Machado Filho May 2, 2018, 10:18 p.m.
When IBM long double is used, the .gnu_attribute 4 is set to 1 | (1 *
4).  IEEE long double sets the same .gnu_attribute to 1 | (3 * 4).

bfd/ChangeLog:
yyyy-mm-dd  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>

	* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
	of arguments when warning about different long double types.
---
 bfd/elf32-ppc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.14.3

Comments

Alan Modra May 4, 2018, 9:31 a.m. | #1
On Wed, May 02, 2018 at 07:18:44PM -0300, Tulio Magno Quites Machado Filho wrote:
> 	* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order

> 	of arguments when warning about different long double types.


Thanks!  Applied.

-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 1200de8458..7f4ed01f20 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -4776,12 +4776,12 @@  _bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, struct bfd_link_info *info)
 	_bfd_error_handler
 	  /* xgettext:c-format */
 	  (_("warning: %pB uses IBM long double, "
-	     "%pB uses IEEE long double"), ibfd, obfd);
+	     "%pB uses IEEE long double"), obfd, ibfd);
       else if (out_fp == 3 * 4 && in_fp == 1 * 4)
 	_bfd_error_handler
 	  /* xgettext:c-format */
 	  (_("warning: %pB uses IBM long double, "
-	     "%pB uses IEEE long double"), obfd, ibfd);
+	     "%pB uses IEEE long double"), ibfd, obfd);
     }
 }