------- Comment #13 from davek at gcc dot gnu dot org 2009-07-26 14:26 ------- Broken again on HEAD :-(
Configured with --program-suffix=-4, bootstrapped, and installed into a new $prefix that I then placed at the front of $PATH. None of the newly built gnat* executables had the --program-suffix appended. When trying to run the testsuite, host_gnatmake invokes plain unadorned 'gnatmake', which finds the newly-installed one in $prefix. That attempts to invoke plain unadorned 'gcc' unfortunately, which is the distro compiler installed in /usr/bin, and not the newly installed $prefix/bin/gcc-4, resulting in the following error: > + host_gnatmake -gnatws macrosub.adb > > GNATMAKE 4.5.0 20090707 (experimental) > Copyright (C) 1995-2009, Free Software Foundation, Inc. > "macrosub.ali" being checked ... > -> "macrosub.ali" missing. > gcc -c -gnatV -gnatws macrosub.adb > gnat1: invalid switch: -gnatea > End of compilation I tried hacking host_gnatmake and host_gnatchop to pass --GCC=gcc-4, but that only got me a little way further: > + host_gnatmake -gnatws macrosub.adb > > GNATMAKE 4.5.0 20090707 (experimental) > Copyright (C) 1995-2009, Free Software Foundation, Inc. > "macrosub.ali" being checked ... > -> "macrosub.ali" missing. > gcc-4 -c -gnatws macrosub.adb > "defs.ali" being checked ... > -> "defs.ali" missing. > gcc-4 -c -gnatws defs.ads > "getsubs.ali" being checked ... > -> "getsubs.ali" missing. > gcc-4 -c -gnatws getsubs.adb > "parsemac.ali" being checked ... > -> "parsemac.ali" missing. > gcc-4 -c -gnatws parsemac.adb > "text_io.ali" is a read-only library > End of compilation > gnatbind -x macrosub.ali > gnatlink macrosub.ali > b~macrosub.o:b~macrosub.adb:(.eh_frame+0x11): undefined reference to > `___gnat_eh > _personality' > collect2: ld returned 1 exit status > gnatlink: error when calling /usr/bin/gcc.exe > gnatmake: *** link failed. ... the problem being that yet again the unsuffixed system compiler has been invoked, and it's using the system runtime libs rather than the ones that go with the newly-built compiler in $prefix (and which happen to be ABI incompatible because they use ZCX instead of SJLJ). Should gnatmake have passed down the --GCC= option to gnatbind and gnatlink? -- davek at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC|dave dot korn dot cygwin at |davek at gcc dot gnu dot org |gmail dot com | Status|RESOLVED |REOPENED Resolution|FIXED | Version|2.95.2 |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=864