loongarch32 build failure on 32-bit host
authorAlan Modra <amodra@gmail.com>
Tue, 14 Dec 2021 11:42:17 +0000 (22:12 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 14 Dec 2021 22:51:12 +0000 (09:21 +1030)
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.

bfd/config.bfd

index 776918253ef11140df94042b379789e6f7b1e598..08755e4679b4af9f3316684ef97a9d8ae911264e 100644 (file)
@@ -1463,7 +1463,7 @@ case "${targ}" in
   loongarch32-*)
     targ_defvec=loongarch_elf32_vec
     targ_selvecs="loongarch_elf32_vec"
-    want64=false
+    want64=true
     ;;
 
   loongarch64-*)