https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71208

--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
Hmmm. I have problems building gcc-6.1.0 for mmix, by the methods that has
worked in the past and to the best of my knowledge are the official ones.

First, from a separate directory, I build and install binutils-2.25.1 (as you
mentioned this exhibits the same problems as with 2.26 and to avoid mixing up
with fallout from the default-init-array change) in a local prefix.  The CFLAGS
setting is for the anticipated debugging:

$ ~/derp/gcctop/pr71208/binutils-2.25.1/configure --prefix
~/derp/gcctop/pr71208/p --target mmix CFLAGS=-g3
$ make all
$ make install

Then I unpack newlib, rename newlib-2.24 to gcc-6.1.0, unpack gcc-6.1.0 to
override common files, and configure, in a separate directory:
$ ~/derp/gcctop/pr71208/gcc-6.1.0/configure --prefix ~/derp/gcctop/pr71208/p
--target mmix
(noting that the binutils installed is picked up by the build machinery)
$ make all
...
checking for /home/hp/derp/gcctop/pr71208/go/./gcc/xgcc
-B/home/hp/derp/gcctop/pr71208/go/./gcc/
-B/home/hp/derp/gcctop/pr71208/p/mmix/bin/
-B/home/hp/derp/gcctop/pr71208/p/mmix/lib/ -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/include -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/sys-include    option to produce PIC...
-fPIC -DPIC
checking if /home/hp/derp/gcctop/pr71208/go/./gcc/xgcc
-B/home/hp/derp/gcctop/pr71208/go/./gcc/
-B/home/hp/derp/gcctop/pr71208/p/mmix/bin/
-B/home/hp/derp/gcctop/pr71208/p/mmix/lib/ -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/include -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/sys-include    PIC flag -fPIC -DPIC
works... no
checking if /home/hp/derp/gcctop/pr71208/go/./gcc/xgcc
-B/home/hp/derp/gcctop/pr71208/go/./gcc/
-B/home/hp/derp/gcctop/pr71208/p/mmix/bin/
-B/home/hp/derp/gcctop/pr71208/p/mmix/lib/ -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/include -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/sys-include    static flag -static works...
no
checking if /home/hp/derp/gcctop/pr71208/go/./gcc/xgcc
-B/home/hp/derp/gcctop/pr71208/go/./gcc/
-B/home/hp/derp/gcctop/pr71208/p/mmix/bin/
-B/home/hp/derp/gcctop/pr71208/p/mmix/lib/ -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/include -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/sys-include    supports -c -o file.o... yes
checking if /home/hp/derp/gcctop/pr71208/go/./gcc/xgcc
-B/home/hp/derp/gcctop/pr71208/go/./gcc/
-B/home/hp/derp/gcctop/pr71208/p/mmix/bin/
-B/home/hp/derp/gcctop/pr71208/p/mmix/lib/ -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/include -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/sys-include    supports -c -o file.o...
(cached) yes
checking whether the /home/hp/derp/gcctop/pr71208/go/./gcc/xgcc
-B/home/hp/derp/gcctop/pr71208/go/./gcc/
-B/home/hp/derp/gcctop/pr71208/p/mmix/bin/
-B/home/hp/derp/gcctop/pr71208/p/mmix/lib/ -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/include -isystem
/home/hp/derp/gcctop/pr71208/p/mmix/sys-include    linker
(/home/hp/derp/gcctop/pr71208/go/./gcc/collect-ld) supports shared libraries...
yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed after
GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libstdc++-v3] Error 1
oops.

Thinking maybe --with-newlib is required "these days", I add that:

$ ~/derp/gcctop/pr71208/gcc-6.1.0/configure --prefix ~/derp/gcctop/pr71208/p
--target mmix --with-newlib
$ make all
checking for fenv.h... no
checking for complex.h... (cached) no
checking for complex.h... (cached) no
no
checking for ISO C99 support to TR1 in <ctype.h>... no
checking for fenv.h... (cached) no
no
checking for ISO C99 support to TR1 in <stdint.h>... no
checking for ISO C99 support to TR1 in <math.h>... no
no
no
checking stdbool.h usability... no
checking stdbool.h presence... yes
configure: WARNING: stdbool.h: present but cannot be compiled
configure: WARNING: stdbool.h:     check for missing prerequisite headers?
configure: WARNING: stdbool.h: see the Autoconf documentation
configure: WARNING: stdbool.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stdbool.h: proceeding with the compiler's result
checking for stdbool.h... no
checking stdalign.h usability... no
checking stdalign.h presence... yes
configure: WARNING: stdalign.h: present but cannot be compiled
configure: WARNING: stdalign.h:     check for missing prerequisite headers?
configure: WARNING: stdalign.h: see the Autoconf documentation
configure: WARNING: stdalign.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stdalign.h: proceeding with the compiler's result
checking for stdalign.h... no
checking for the value of EOF... configure: error: computing EOF failed
make[1]: *** [configure-target-libstdc++-v3] Error 1

(other attempts yielding same result pruned)

So, how did you manage to build and install gcc-6.1.0 for mmix in the first
place?  If you have local patches or work out of a branch rather than the
release, please add those details too.
...I'm going to retry using the full tuple (mmix-knuth-mmixware) but if that
doesn't work I'm ready to declare gcc-6.1.0 broken for this target.

Reply via email to