Summary: | sys-devel/gcc-4.8.2 fails to create a cross-compiler -- build/gcc/ seems to mix host compiler with target flags | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergey Popov <pinkbyte> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cochet.tina |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00304.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Sergey Popov
2013-11-26 08:57:59 UTC
Have you checked whether this option got removed upstream? No, the problem is that he's cross compiling and -mplt is being applied when building the cross compiler, which is not a mips binary. This is a crossdev bug or something. Nothing for mips@ to do here. (In reply to Matt Turner from comment #2) > No, the problem is that he's cross compiling and -mplt is being applied when > building the cross compiler, which is not a mips binary. > > This is a crossdev bug or something. Nothing for mips@ to do here. Not sure that it's nothing for mips@, cause crosscompiling gcc-4.7.3 went fine, so bug is probably in toolchain.eclass or gcc's ebuild(but i am not sure, cause i am unfamiliar with this eclass and gcc internals at all) and it would be good for us to be aware of it. Also, i wonder, why it calls 'g++' instead of full compiler name(mips64-unknown-linux-gnu-g++), so maybe problem is there - it picks wrong(host) compiler, that does not know anything about -mplt - poof,bang,crash! :-( *** Bug 492972 has been marked as a duplicate of this bug. *** seems to be a target independent issue Only with 4.8? I wonder if somewhere CXXFLAGS is leaking through. 4.7: gcc -c -DIN_GCC -DGENERATOR_FILE -I. -Ibuild -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/gcc -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/gcc/build -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/gcc/../include -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/gcc/../libcpp/include -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/gcc/../libdecnumber -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/gcc/../libdecnumber/dpd -I../libdecnumber \ -DBASEVER="\"4.7.3\"" -DDATESTAMP="\"\"" \ -DREVISION="\"\"" \ -DDEVPHASE="\"\"" -DPKGVERSION="\"(Gentoo 4.7.3-r1 p1.4, pie-0.5.5) \"" \ -DBUGURL="\"<https://bugs.gentoo.org/>\"" -o build/version.o /usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/gcc/version.c 4.8: g++ -c -O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/gcc -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/gcc/build -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/gcc/../include -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/gcc/../libcpp/include -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/gcc/../libdecnumber -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/gcc/../libdecnumber/dpd -I../libdecnumber -I/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/gcc/../libbacktrace \ -DBASEVER="\"4.8.2\"" -DDATESTAMP="\"\"" \ -DREVISION="\"\"" \ -DDEVPHASE="\"\"" -DPKGVERSION="\"(Gentoo 4.8.2 p1.1, pie-0.5.8) \"" \ -DBUGURL="\"<https://bugs.gentoo.org/>\"" -o build/version.o /usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/gcc/version.c Looks like an upstream bug. BUILD_CXXFLAGS is initially set to $(ALL_CXXFLAGS) in gcc/configure.ac. There is later logic to set BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' if host != build. This logic is missing for BUILD_CXXFLAGS so it stays set to $(ALL_CFLAGS). If I'm right it was fixed upstream by http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00304.html |