[Bug bootstrap/81883] New: bootstrap-lto build fails with undefined reference to `_Unwind_Resume'

t at sharklasers dot com gcc-bugzilla@gcc.gnu.org
Thu Aug 17 22:14:00 GMT 2017


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

            Bug ID: 81883
           Summary: bootstrap-lto build fails with undefined reference to
                    `_Unwind_Resume'
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: t at sharklasers dot com
  Target Milestone: ---

Created attachment 41999
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41999&action=edit
Output of a sequential make run for context

I compiled gcc-7.2 without LTO optimizations and tried to compile it again with
bootstrap-lto using the new gcc-7.2 compiler.

System:
Linux 4.4.0-91-generic #114-Ubuntu SMP x86_64 GNU/Linux

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=gcc-7.2.0/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: gcc-7.2.0/configure --prefix=gcc-7.2.0
--enable-languages=c,c++,fortran --enable-gold=yes --enable-ld=yes
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 7.2.0 (GCC) 

$ env | grep -i flags
LDFLAGS=-O3 -flto=4 -fuse-linker-plugin
CXXFLAGS=-march=native -O3 -flto -fno-fat-lto-objects -fuse-linker-plugin
CFLAGS=-march=native -O3 -flto -fno-fat-lto-objects -fuse-linker-plugin

$ ld -v
GNU ld (GNU Binutils) 2.29

GCC tools were used
export AR=gcc-ar
export NM=gcc-nm
export RANLIB=gcc-ranlib

The bootstrap-lto build was configured with:
gcc-7.2.0/configure --prefix=gcc-7.2.0 --enable-languages=c,c++,fortran
--enable-gold=yes --enable-ld=yes --enable-bootstrap
--with-build-config=bootstrap-lto --disable-multilib


make[3]: Entering directory 'gccbuild/gcc'
gccbuild/./prev-gcc/xg++ -Bgccbuild/./prev-gcc/
-Bgcc-7.2.0/x86_64-pc-linux-gnu/bin/ -nostdinc++
-Bgccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-Bgccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-Igccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu 
-Igccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/include 
-Igcc-7.2.0/libstdc++-v3/libsupc++
-Lgccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-Lgccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs   -g -O2
-flto=jobserver -frandom-seed=1 -DIN_GCC     -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-DGENERATOR_FILE -fno-PIE -static-libstdc++ -static-libgcc  -no-pie -o
build/genmddeps \
    build/genmddeps.o build/read-md.o build/errors.o .././libiberty/libiberty.a
binutils-2.29/x86_64-pc-linux-gnu/bin/ld: error in
/tmp/ccK67upk.ltrans0.ltrans.o(.eh_frame); no .eh_frame_hdr table will be
created.
/tmp/ccK67upk.ltrans0.ltrans.o: In function `__verbose_terminate_handler':
gcc-7.2.0/libstdc++-v3/libsupc++/vterminate.cc:82: undefined reference to
`_Unwind_Resume'
collect2: error: ld returned 1 exit status
Makefile:2791: recipe for target 'build/genmddeps' failed
make[3]: *** [build/genmddeps] Error 1
make[3]: Leaving directory 'gccbuild/gcc'
Makefile:4596: recipe for target 'all-stage2-gcc' failed
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory 'gccbuild'
Makefile:26888: recipe for target 'stage2-bubble' failed
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory 'gccbuild'
Makefile:941: recipe for target 'all' failed
make: *** [all] Error 2


More information about the Gcc-bugs mailing list