Simh compilations fails with mysterious error message

Hi,

I tried to compile simh natively on my Beaglebone Black (hf).

The compilation failed with:

* Package: app-emulation/simh-3.9.0-r1
* Repository: gentoo
* Maintainer: alex.buell@munted.eu xmw@gentoo.org,proxy-maint@gentoo.org
* USE: arm elibc_glibc kernel_linux userland_GNU
* FEATURES: preserve-libs sandbox

cfg-update-1.8.2-r1: Creating checksum index...
Unpacking source...
Unpacking simhv39-0.zip to /var/tmp/portage/app-emulation/simh-3.9.0-r1/work
Source unpacked in /var/tmp/portage/app-emulation/simh-3.9.0-r1/work
Preparing source in /var/tmp/portage/app-emulation/simh-3.9.0-r1/work ...

* Applying simh-3.9.0-respect-FLAGS.patch ...
[ ok ]
* Applying simh-3.9.0-fix-mkdir-race.patch ...
[ ok ]

Source prepared.
Configuring source in /var/tmp/portage/app-emulation/simh-3.9.0-r1/work ...
Source configured.
Compiling source in /var/tmp/portage/app-emulation/simh-3.9.0-r1/work ...

make USE_NETWORK=1
lib paths are: /lib/ /usr/armv7a-hardfloat-linux-gnueabi/lib/ /usr/lib/ /usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.6.3/ /usr/lib/opengl/xorg-x11/lib/ /usr/lib/qt4/
using libm: /usr/lib//libm.so
using librt: /usr/lib//librt.so
using libpthread: /usr/lib//libpthread.so /usr/include/pthread.h
using libdl: /usr/lib//libdl.so /usr/include/dlfcn.h
using libpcap: /usr/lib//libpcap.so /usr/include/pcap.h

the standard build runs the compiler with the -flto option (I think
it's Link Time Optimization), which apparently is not supported on the
ARM/Angstrom GCC build. The simplest thing to do would be to cut and
paste the gcc command without the -flto option and run it on the
command line; it's a standard trick for working around Makefile/build
issues. When you find the combination that works, of course fix your
makefiles and submit the patch to the upstream.

armv7a-hardfloat-linux-
gnueabi-gcc -std=c99 -U__STRICT_ANSI__ -O2 -pipe -march=armv7-a
-mfpu=vfpv3-d16 -mfloat-abi=hard -finline-functions
-fgcse-after-reload -fpredictive-commoning -fipa-cp-clone
-fno-unsafe-loop-optimizations -fno-strict-overflow -flto
-fwhole-program -Wno-unused-result -I . -D_GNU_SOURCE
-DUSE_READER_THREAD -DHAVE_DLOPEN=so PDP1/pdp1_lp.c PDP1/pdp1_cpu.c
PDP1/pdp1_stddev.c PDP1/pdp1_sys.c PDP1/pdp1_dt.c PDP1/pdp1_drm.c
PDP1/pdp1_clk.c PDP1/pdp1_dcs.c scp.c sim_console.c sim_fio.c
sim_timer.c sim_sock.c sim_tmxr.c sim_ether.c sim_tape.c -I PDP1 -o
BIN/pdp1 -lm -lrt -lpthread -ldl -lpcap -Wl,-O1 -Wl,--as-needed

Przemek Klosowski <przemek.klosowski@gmail.com> [13-08-07 18:56]: