Opened 6 years ago
Closed 6 years ago
#14179 closed bug (fixed)
gcc 7.3.0 cannot build itself
Reported by: | jessicah | Owned by: | waddlesplash |
---|---|---|---|
Priority: | blocker | Milestone: | Unscheduled |
Component: | Build System | Version: | R1/Development |
Keywords: | Cc: | korli | |
Blocked By: | Blocking: | ||
Platform: | x86-64 |
Description
Building cross-tools on Haiku now fails because of PIC errors after upgrading Haiku to version with 7.3.0:
../configure --build-cross-tools x86_64 ../../buildtools --use-gcc-pipe
Relevant lines:
g++ -c -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -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 -I. -Ibuild -I/Data/buildtools/gcc/gcc -I/Data/buildtools/gcc/gcc/build -I/Data/buildtools/gcc/gcc/../include -I/Data/buildtools/gcc/gcc/../libcpp/include \ -o build/genmddeps.o /Data/buildtools/gcc/gcc/genmddeps.c g++ -c -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -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 -I. -Ibuild -I/Data/buildtools/gcc/gcc -I/Data/buildtools/gcc/gcc/build -I/Data/buildtools/gcc/gcc/../include -I/Data/buildtools/gcc/gcc/../libcpp/include \ -o build/read-md.o /Data/buildtools/gcc/gcc/read-md.c g++ -c -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -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 -I. -Ibuild -I/Data/buildtools/gcc/gcc -I/Data/buildtools/gcc/gcc/build -I/Data/buildtools/gcc/gcc/../include -I/Data/buildtools/gcc/gcc/../libcpp/include \ -o build/errors.o /Data/buildtools/gcc/gcc/errors.c g++ -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -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 ../build-x86_64-unknown-haiku_buildhost/libiberty/libiberty.a /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: build/genmddeps.o: relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: build/read-md.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: build/errors.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:2791: recipe for target 'build/genmddeps' failed
Full build log attached.
Attachments (1)
Change History (3)
by , 6 years ago
comment:1 by , 6 years ago
Cc: | added |
---|
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
OH. This patch hasn't been applied to the buildtools repo; that's the issue.
Fixed in btrev43128.
Note:
See TracTickets
for help on using tickets.
It looks like Jerome added a line to disable building GCC with PIE on x86_64, which appears to be the cause of this issue: https://github.com/haikuports/haikuports/blob/master/sys-devel/gcc/patches/gcc-7.3.0_2018_05_01.patchset#L3248
I'm not sure why this is. The patch message does not indicate what the error exactly was...