public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* loongarch32 build failure on 32-bit host
@ 2021-12-14 22:50 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2021-12-14 22:50 UTC (permalink / raw)
  To: binutils

gas/config/tc-loongarch.c: In function ‘assember_macro_helper’:
gas/config/tc-loongarch.c:915:28: error: right shift count >= width of type [-Werror=shift-count-overflow]
  915 |       hi32 = insn->args[1] >> 32;
      |                            ^~

One possible fix is to make offsetT a 64-bit type for loongarch32.
This also makes bfd/targmatch.h (generated from bfd/config.bfd)
consistent since the loongarch32 match is inside #ifdef BFD64.

	* config.bfd (loongarch32-*): Set want64.

diff --git a/bfd/config.bfd b/bfd/config.bfd
index 776918253ef..08755e4679b 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1463,7 +1463,7 @@ case "${targ}" in
   loongarch32-*)
     targ_defvec=loongarch_elf32_vec
     targ_selvecs="loongarch_elf32_vec"
-    want64=false
+    want64=true
     ;;
 
   loongarch64-*)

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-14 22:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 22:50 loongarch32 build failure on 32-bit host Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).