[PATCH] [ADA] Fix bootstrap failure on mips64el-linux-gnuabi64
James Cowgill
James.Cowgill@imgtec.com
Fri Mar 10 17:38:00 GMT 2017
Hi,
This patch fixes an error caused by my changing of the signal constants
on MIPS in r244026. While that patch worked on mipsel, ada fails to
bootstrap with it on mips64el with the error:
s-osinte.ads:610:07: component "sa_flags" overlaps "sa_handler" at line 608
../gcc-interface/Makefile:297: recipe for target 'a-dispat.o' failed
make[9]: *** [a-dispat.o] Error 1
The fix is to adjust the size of sa_flags in struct_sigaction from an
unsigned long to an int. I checked the glibc sources and sa_flags is an
int on all Linux arches.
Thanks,
James
gcc/ada/Changelog:
2017-03-10 James Cowgill <James.Cowgill@imgtec.com>
* s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
diff --git a/gcc/ada/s-osinte-linux.ads b/gcc/ada/s-osinte-linux.ads
index ee1809e2ec1..b0ba2296398 100644
--- a/gcc/ada/s-osinte-linux.ads
+++ b/gcc/ada/s-osinte-linux.ads
@@ -182,7 +182,7 @@ package System.OS_Interface is
type struct_sigaction is record
sa_handler : System.Address;
sa_mask : sigset_t;
- sa_flags : Interfaces.C.unsigned_long;
+ sa_flags : int;
sa_restorer : System.Address;
end record;
pragma Convention (C, struct_sigaction);
@@ -607,8 +607,7 @@ private
for struct_sigaction use record
sa_handler at Linux.sa_handler_pos range 0 .. Standard'Address_Size - 1;
sa_mask at Linux.sa_mask_pos range 0 .. 1023;
- sa_flags at Linux.sa_flags_pos
- range 0 .. Interfaces.C.unsigned_long'Size - 1;
+ sa_flags at Linux.sa_flags_pos range 0 .. int'Size - 1;
end record;
-- We intentionally leave sa_restorer unspecified and let the compiler
-- append it after the last field, so disable corresponding warning.
--
2.11.0
More information about the Gcc-patches
mailing list