Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2019 01:21:17 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, "gerald@freebsd.org" <gerald@FreeBSD.org>
Cc:        ports-list freebsd <freebsd-ports@freebsd.org>
Subject:   Re: 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 ..."
Message-ID:  <B211A021-E7F5-4E40-894E-F97BE1323B9D@yahoo.com>
In-Reply-To: <489849A2-9425-4BD9-8D4F-ACE9ECB6CDA7@yahoo.com>
References:  <D50B8528-6BCB-4EC6-9E34-E901E7036CDF@yahoo.com> <489849A2-9425-4BD9-8D4F-ACE9ECB6CDA7@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[It built with GNU ld (GNU Binutils) 2.32 as ld.]

On 2019-May-18, at 21:42, Mark Millard <marklmi at yahoo.com> wrote:

> On 2019-May-18, at 21:11, Mark Millard <marklmi at yahoo.com> wrote:
>=20
>> 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.)
>>=20
>> 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.)
>>=20
>> . . .
>> 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=20
>> -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=20
>> -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_summary21simp=
le_hashmap_traitsI19default_hash_traitsIS2
>> =
_ES4_EE10hash_entryE11xcallocatorE19find_slot_with_hashERKij13insert_optio=
n' 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_tra=
itsI19default_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_summary21simp=
le_hashmap_traitsI19default_hash_traitsIS2
>> =
_ES4_EE10hash_entryE11xcallocatorE19find_slot_with_hashERKij13insert_optio=
n' 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_tra=
itsI19default_hash_traitsIS2_ES4_EE10hash_entryE11xcallocatorE19find_slot_=
with_hashERKij13insert_option' extern
>> . . .
>>=20
>>=20
>> For reference . . .
>>=20
>> # 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
>>=20
>> # 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
>>=20
>> # ld -v
>> GNU ld (GNU Binutils) 2.32
>>=20
>>=20
>> I used:
>>=20
>> # svnlite diff /usr/ports/lang/gcc8/ | more
>> Index: /usr/ports/lang/gcc8/Makefile
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- /usr/ports/lang/gcc8/Makefile       (revision 501994)
>> +++ /usr/ports/lang/gcc8/Makefile       (working copy)
>> @@ -62,7 +62,7 @@
>>=20
>> .elif ${ARCH} =3D=3D powerpc64
>> CONFIGURE_ENV+=3D        UNAME_m=3D"powerpc64"
>> -MAKE_ARGS+=3D    CFLAGS_FOR_TARGET=3D"-O1" CXXFLAGS_FOR_TARGET=3D"-O1"=
 BOOT_CFLAGS=3D"-O1" # PR235975
>> +#MAKE_ARGS+=3D   CFLAGS_FOR_TARGET=3D"-O1" CXXFLAGS_FOR_TARGET=3D"-O1"=
 BOOT_CFLAGS=3D"-O1" # PR235975
>>=20
>> .elif ${ARCH} =3D=3D powerpcspe
>> CONFIGURE_ARGS+=3D       --with-cpu=3D8548 --enable-e500_double =
--without-fp
>> @@ -80,7 +80,7 @@
>> CONFIGURE_ARGS+=3D--with-build-config=3Dbootstrap-debug
>> ALL_TARGET=3D    bootstrap-lean
>> .endif
>> -INSTALL_TARGET=3D        install-strip
>> +#INSTALL_TARGET=3D       install-strip
>> .if ${UID} !=3D 0
>> BINMODE=3D       755
>> .endif
>>=20
>=20
> I managed to not have poudriere using base/binutils but instead:
>=20
> # =
/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils-poud/usr/bin/ld=
 -v
> GNU ld 2.17.50 [FreeBSD] 2007-07-03
>=20
> cc and c++ were as they should have been:
>=20
> # =
/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils-poud/usr/bin/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/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils-poud/usr/bin
>=20
> # =
/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils-poud/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/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils-poud/usr/bin
>=20
> So I was not testing the tools combination that I thought/intended.


Sure enough, with the originally intended linker:

# =
/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils-poud/usr/bin/ld=
 -v                                                                      =
                                            GNU ld (GNU Binutils) 2.32

lang/gcc8 then fine via poudriere bulk.

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B211A021-E7F5-4E40-894E-F97BE1323B9D>