FYI: Unable to build -r501994 ports' lang/gcc8 on clang 8 based powerpc64 system (no -O1 use): "does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or ..."

Mark Millard marklmi at yahoo.com
Sun May 19 04:11:22 UTC 2019


This was in a poudriere bulk build on a head -r347549 based powerpc64
system with system clang 8 for cc and c++ and base/binutils
for ld. I was attempting a build with the -O1 changes disabled. (Note:
the system is self hosting for buildworld buildkernel via the clang 8
and base/binutils combination.)

So having issues with building lang/gcc8 is not limited  to gcc 4.2.1's
tool chain for powerpc64. (I've not yet tested -O1 use as the bulk build
still has lots of other things to build.)

. . .
c++: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
/usr/bin/ld: libbackend.a(ipa-inline.o)(.text+0x540): sibling call optimization to `_ZN16function_summaryIP14ipa_fn_summaryE3getEP11cgraph_node' does not allow automatic multiple TOCs; recompile with 
-mminimal-toc or -fno-optimize-sibling-calls, or make `_ZN16function_summaryIP14ipa_fn_summaryE3getEP11cgraph_node' extern
/usr/bin/ld: libbackend.a(ipa-inline.o)(.text+0xa58): sibling call optimization to `_ZN16function_summaryIP14ipa_fn_summaryE3getEP11cgraph_node' does not allow automatic multiple TOCs; recompile with 
-mminimal-toc or -fno-optimize-sibling-calls, or make `_ZN16function_summaryIP14ipa_fn_summaryE3getEP11cgraph_node' extern
. . .
/usr/bin/ld: libbackend.a(ipa-inline.o)(.text+0x1150): sibling call optimization to `_ZN10hash_tableIN8hash_mapI8int_hashIiLi0ELin1EEP16ipa_call_summary21simple_hashmap_traitsI19default_hash_traitsIS2
_ES4_EE10hash_entryE11xcallocatorE19find_slot_with_hashERKij13insert_option' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `_ZN10hash_tab
leIN8hash_mapI8int_hashIiLi0ELin1EEP16ipa_call_summary21simple_hashmap_traitsI19default_hash_traitsIS2_ES4_EE10hash_entryE11xcallocatorE19find_slot_with_hashERKij13insert_option' extern
/usr/bin/ld: libbackend.a(ipa-inline.o)(.text+0x1224): sibling call optimization to `_ZN10hash_tableIN8hash_mapI8int_hashIiLi0ELin1EEP16ipa_call_summary21simple_hashmap_traitsI19default_hash_traitsIS2
_ES4_EE10hash_entryE11xcallocatorE19find_slot_with_hashERKij13insert_option' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `_ZN10hash_tab
leIN8hash_mapI8int_hashIiLi0ELin1EEP16ipa_call_summary21simple_hashmap_traitsI19default_hash_traitsIS2_ES4_EE10hash_entryE11xcallocatorE19find_slot_with_hashERKij13insert_option' extern
. . .


For reference . . .

# cc -v
FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on LLVM 8.0.0)
Target: powerpc64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

# c++ -v
FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on LLVM 8.0.0)
Target: powerpc64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

# ld -v
GNU ld (GNU Binutils) 2.32


I used:

# svnlite diff /usr/ports/lang/gcc8/ | more
Index: /usr/ports/lang/gcc8/Makefile
===================================================================
--- /usr/ports/lang/gcc8/Makefile       (revision 501994)
+++ /usr/ports/lang/gcc8/Makefile       (working copy)
@@ -62,7 +62,7 @@
 
 .elif ${ARCH} == powerpc64
 CONFIGURE_ENV+=        UNAME_m="powerpc64"
-MAKE_ARGS+=    CFLAGS_FOR_TARGET="-O1" CXXFLAGS_FOR_TARGET="-O1" BOOT_CFLAGS="-O1" # PR235975
+#MAKE_ARGS+=   CFLAGS_FOR_TARGET="-O1" CXXFLAGS_FOR_TARGET="-O1" BOOT_CFLAGS="-O1" # PR235975
 
 .elif ${ARCH} == powerpcspe
 CONFIGURE_ARGS+=       --with-cpu=8548 --enable-e500_double --without-fp
@@ -80,7 +80,7 @@
 CONFIGURE_ARGS+=--with-build-config=bootstrap-debug
 ALL_TARGET=    bootstrap-lean
 .endif
-INSTALL_TARGET=        install-strip
+#INSTALL_TARGET=       install-strip
 .if ${UID} != 0
 BINMODE=       755
 .endif


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ports mailing list