http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46616
Summary: ia64: When compiling gcc with lto support: "collect2: ld returned 1 exit status" Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: devuran...@gmx.net Created attachment 22493 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22493 build.log I am on Gentoo and am compiling GCC with LTO support. When compiling/linking cc1plus-dummy or lto1, ld will reproducibly return exit status 1. Compiling GCC without LTO support (USE=-lto) works fine. The full output is attached. The last lines are: /var/tmp/portage/sys-devel/gcc-4.5.1-r1/work/build/./prev-gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.5.1-r1/work/build/./prev-gcc/ -B/usr/ia64-unknown-linux-gnu/bin/ -B/usr/ia64-unknown-linux-gnu/bin/ -B/usr/ia64-unknown-linux-gnu/lib/ -isystem /usr/ia64-unknown-linux-gnu/include -isystem /usr/ia64-unknown-linux-gnu/sys-include -DEFAULT_PIE -DEFAULT_RELRO -DEFAULT_BIND_NOW -DUSE_LIBUNWIND_EXCEPTIONS -pipe -mtune=mckinley -O2 -gtoggle -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -o cc1plus-dummy \ cp/cp-lang.o stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o tree-mudflap.o attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o c-dump.o c-pretty-print.o c-opts.o c-pch.o incpath.o c-ppoutput.o c-cppbuiltin.o prefix.o c-gimplify.o c-omp.o dummy-checksum.o main.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpc -lmpfr -lgmp -ldl -rdynamic -ldl -lz -lelf /var/tmp/portage/sys-devel/gcc-4.5.1-r1/work/build/./prev-gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.5.1-r1/work/build/./prev-gcc/ -B/usr/ia64-unknown-linux-gnu/bin/ -B/usr/ia64-unknown-linux-gnu/bin/ -B/usr/ia64-unknown-linux-gnu/lib/ -isystem /usr/ia64-unknown-linux-gnu/include -isystem /usr/ia64-unknown-linux-gnu/sys-include -DEFAULT_PIE -DEFAULT_RELRO -DEFAULT_BIND_NOW -DUSE_LIBUNWIND_EXCEPTIONS -pipe -mtune=mckinley -O2 -gtoggle -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -o lto1 \ lto/lto-lang.o lto/lto.o lto/lto-elf.o attribs.o main.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a -lmpc -lmpfr -lgmp -ldl -rdynamic -ldl -lz -lelf ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lelf build/genchecksum cc1-dummy > cc1-checksum.c collect2: ld returned 1 exit status make[3]: *** [lto1] Error 1 make[3]: *** Waiting for unfinished jobs.... collect2: ld returned 1 exit status make[3]: *** [cc1plus-dummy] Error 1 Portage 2.2.0_alpha4 (hardened/linux/ia64/server, gcc-4.4.5, glibc-2.11.2-r3, 2.6.27-openvz-levitan.1 ia64) ================================================================= System uname: Linux-2.6.27-openvz-levitan.1-ia64-31-with-gentoo-2.0.1 Timestamp of tree: Mon, 22 Nov 2010 15:45:01 +0000 app-shells/bash: 4.1_p7 dev-lang/python: 2.6.5-r3, 3.1.2-r4 sys-apps/baselayout: 2.0.1-r1 sys-apps/openrc: 0.6.3 sys-apps/sandbox: 2.3-r1 sys-devel/autoconf: 2.65-r1 sys-devel/automake: 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.30-r1 (sys-kernel/linux-headers) Repositories: gentoo sunrise local ACCEPT_KEYWORDS="ia64" ACCEPT_LICENSE="* -...@eula" CBUILD="ia64-unknown-linux-gnu" CFLAGS="-pipe -mtune=mckinley -O2 -ftree-vectorize" CHOST="ia64-unknown-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-pipe -mtune=mckinley -O2 -ftree-vectorize" DISTDIR="/var/cache/portage/distfiles" EMERGE_DEFAULT_OPTS="--buildpkg --with-bdeps y --keep-going" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--hash-style=gnu" MAKEOPTS="-j3" PKGDIR="/var/cache/portage/packages" PORTAGE_COMPRESS="xz" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="..." PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/cache/portage/gentoo" PORTDIR_OVERLAY="/var/cache/portage/layman/sunrise /var/cache/portage/local" [...] Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS