I'm sure this would be trivial to fix if I knew any Ada at all, but I've run into this build failure for GCC 7.1.0 when built with --with-multilib=m32,m64,mx32 for x86_64. make[9]: Entering directory '/home/steven/gcc-multilib/src/gcc-build/gcc/ada/rts_x32' [...] /home/steven/gcc-multilib/src/gcc-build/./gcc/xgcc -B/home/steven/gcc-multilib/src/gcc-build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -g -O2 -mx32 -fpic -W -Wall -gnatpg -nostdinc -mx32 a-cfinve.adb -o a-cfinve.o a-cfinve.ads:245:04: warning: in instantiation at a-coboho.adb:55 a-cfinve.ads:245:04: warning: types for unchecked conversion have different sizes make[9]: *** [../gcc-interface/Makefile:296: a-cfinve.o] Error 1 Any ideas?
I configured with these flags, if they're needed for repro: --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://www.uplinklabs.net/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror --enable-checking=release --enable-clocale=gnu --enable-__cxa_atexit --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-libmpx --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --with-isl --with-linker-hash-style=gnu --with-multilib-list=m32,m64,mx32 --with-system-zlib
It looks like this is just the first of several files with that build issue. If I build with 'make -k' I see several others fail with the same warning, e.g.: /home/steven/gcc-multilib/src/gcc-build/./gcc/xgcc -B/home/steven/gcc-multilib/src/gcc-build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -g -O2 -mx32 -fpic -W -Wall -gnatpg -nostdinc -mx32 g-allein.ads -o g-allein.o g-allein.ads:183:04: warning: types for unchecked conversion have different sizes g-allein.ads:185:04: warning: types for unchecked conversion have different sizes g-allein.ads:187:04: warning: types for unchecked conversion have different sizes g-allein.ads:189:04: warning: types for unchecked conversion have different sizes g-allein.ads:191:04: warning: types for unchecked conversion have different sizes [... many more in the same file ...] /home/steven/gcc-multilib/src/gcc-build/./gcc/xgcc -B/home/steven/gcc-multilib/src/gcc-build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -g -O2 -mx32 -fpic -W -Wall -gnatpg -nostdinc -mx32 s-wwdenu.adb -o s-wwdenu.o s-wwdenu.adb:55:07: warning: types for unchecked conversion have different sizes s-wwdenu.adb:94:07: warning: types for unchecked conversion have different sizes s-wwdenu.adb:133:07: warning: types for unchecked conversion have different sizes s-wwdenu.adb:172:07: warning: types for unchecked conversion have different sizes s-wwdenu.adb:211:07: warning: types for unchecked conversion have different sizes s-wwdenu.adb:250:07: warning: types for unchecked conversion have different sizes And several files fail with a different warning: /home/steven/gcc-multilib/src/gcc-build/./gcc/xgcc -B/home/steven/gcc-multilib/src/gcc-build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -g -O2 -mx32 -fpic -W -Wall -gnatpg -nostdinc -mx32 a-dispat.adb -o a-dispat.o s-osinte.ads:608:07: size for "Address" too small, minimum allowed is 64 make[9]: *** [../gcc-interface/Makefile:296: a-dispat.o] Error 1 /home/steven/gcc-multilib/src/gcc-build/./gcc/xgcc -B/home/steven/gcc-multilib/src/gcc-build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -g -O2 -mx32 -fpic -W -Wall -gnatpg -nostdinc -mx32 a-dynpri.adb -o a-dynpri.o s-osinte.ads:608:07: size for "Address" too small, minimum allowed is 64 make[9]: *** [../gcc-interface/Makefile:296: a-dynpri.o] Error 1 /home/steven/gcc-multilib/src/gcc-build/./gcc/xgcc -B/home/steven/gcc-multilib/src/gcc-build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -g -O2 -mx32 -fpic -W -Wall -gnatpg -nostdinc -mx32 a-interr.adb -o a-interr.o s-osinte.ads:608:07: size for "Address" too small, minimum allowed is 64 make[9]: *** [../gcc-interface/Makefile:296: a-interr.o] Error 1
We need something similar to commit 5821cbd2fa002acf67add968862c6d4fe847fa89 Author: krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Apr 4 11:45:37 2017 +0000 [Ada][S/390] Fix Memory_Size definition. -m31 -mzarch uses 64 as word size instead of 32. This must not affect the Address type definition which is based on Memory_Size. gcc/ada/ChangeLog: 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * system-linux-s390.ads: Use Long_Integer'Size to define Memory_Size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246678 138bc75d-0d04-0410-961f-82ee72b054a4 Please try diff --git a/gcc/ada/system-linux-x86.ads b/gcc/ada/system-linux-x86.ads index 22a212e..533d94e 100644 --- a/gcc/ada/system-linux-x86.ads +++ b/gcc/ada/system-linux-x86.ads @@ -70,7 +70,7 @@ package System is Storage_Unit : constant := 8; Word_Size : constant := Standard'Word_Size; - Memory_Size : constant := 2 ** Word_Size; + Memory_Size : constant := 2 ** Long_Integer'Size; -- Address comparison
See also PR80117.
(In reply to H.J. Lu from comment #3) > Please try > > diff --git a/gcc/ada/system-linux-x86.ads b/gcc/ada/system-linux-x86.ads > index 22a212e..533d94e 100644 > --- a/gcc/ada/system-linux-x86.ads > +++ b/gcc/ada/system-linux-x86.ads > @@ -70,7 +70,7 @@ package System is > > Storage_Unit : constant := 8; > Word_Size : constant := Standard'Word_Size; > - Memory_Size : constant := 2 ** Word_Size; > + Memory_Size : constant := 2 ** Long_Integer'Size; > > -- Address comparison This seems to build perfectly for --with-multilib=m32,m64,mx32.
Author: hjl Date: Wed May 10 17:35:02 2017 New Revision: 247849 URL: https://gcc.gnu.org/viewcvs?rev=247849&root=gcc&view=rev Log: Ada/x32: PR ada/80626: Correct Memory_Size X32 uses 64 as word size instead of 32. This must not affect the Address type definition which is based on Memory_Size. PR ada/80626 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size instead of Word_Size. Modified: trunk/gcc/ada/ChangeLog trunk/gcc/ada/system-linux-x86.ads
Author: hjl Date: Wed May 10 17:36:50 2017 New Revision: 247850 URL: https://gcc.gnu.org/viewcvs?rev=247850&root=gcc&view=rev Log: Ada/x32: PR ada/80626: Correct Memory_Size X32 uses 64 as word size instead of 32. This must not affect the Address type definition which is based on Memory_Size. Back port from mainline PR ada/80626 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size instead of Word_Size. Modified: branches/gcc-7-branch/gcc/ada/ChangeLog branches/gcc-7-branch/gcc/ada/system-linux-x86.ads
Fixed on trunk and for 7.2.