Message ID | ea8297da-d64e-f390-e968-d5d18c119c06@imgtec.com |
---|---|
State | New |
Headers | show |
> 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. Patch is OK, thanks. > gcc/ada/Changelog: > > 2017-03-10 James Cowgill <James.Cowgill@imgtec.com> > > * s-osinte-linux.ads (struct_sigaction): Use correct type for > sa_flags.
Hi, On 11/03/17 12:11, Arnaud Charlet wrote: >> 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. > > Patch is OK, thanks. Can you commit it for me? 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.
On 13.03.2017 18:26, James Cowgill wrote: > Hi, > > On 11/03/17 12:11, Arnaud Charlet wrote: >>> 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. >> >> Patch is OK, thanks. > > Can you commit it for me? I committed the patch. Matthias >>> 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.