Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2019 12:20:18 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        freebsd-ppc@freebsd.org, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>
Subject:   buildworld for 32-bit powerpc via devel/freebsd-gcc9@powerpc (not clang): still gets the bss-plt being forced due to crtbeginS.o (build stopped)
Message-ID:  <1617745A-F1C4-4565-9D71-E5B2B714637D@yahoo.com>
References:  <1617745A-F1C4-4565-9D71-E5B2B714637D.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
As this avoided using system-clang (or any clang), the -secure-plt =
leading
to bss-plt being forced issue for 32-bit powerpc appears to *NOT* be
clang-specific at all!


I was just curious to see what would be reported. (The system-clang
and devel/binutils@powerpc combination completed buildworld buildkernel.
It reported forcing bss-plt but did not stop early.)

(I have left my old xtoolchain-gcc naming in directory names.)

--- libc.so.7.full ---
/usr/local/bin/powerpc-unknown-freebsd13.0-ld: bss-plt forced due to =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/tmp/usr/lib/crtbeginS.o
collect2: error: ld returned 1 exit status
*** [libc.so.7.full] Error code 1


For reference:

# /usr/local/bin/powerpc-unknown-freebsd13.0-ld -v
GNU ld (GNU Binutils) 2.33.1


For reference for the link:

# Meta data file =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/lib/libc/libc.so.7.full.meta
CMD @echo building shared library libc.so.7
CMD @rm -f libc.so.7 libc.so
CMD /usr/local/bin/powerpc-unknown-freebsd13.0-gcc9 -gdwarf-2 =
--sysroot=3D/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/po=
werpc.powerpc/tmp -B/usr/local/powerpc-unknown-freebsd13.0/bin/  -
Wl,--secure-plt -nodefaultlibs -Wl,--version-script=3DVersion.map    =
-shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o =
libc.so.7.full -Wl,-soname,libc.so.7  `NM=3D'/usr/local/powerpc-unkno
wn-freebsd13.0/bin/nm' NMFLAGS=3D'' lorder trivial-vdso_tc.pico . . .
. . . wmemset.pico |  tsort -q`  -lcompiler_rt  -lssp_nonshared
CWD =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/lib/libc
TARGET libc.so.7.full
-- command output --
building shared library libc.so.7
/usr/local/bin/powerpc-unknown-freebsd13.0-ld: bss-plt forced due to =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/tmp/usr/lib/crtbeginS.o
collect2: error: ld returned 1 exit status

*** Error code 1
. . .
E 36494 /usr/local/bin/powerpc-unknown-freebsd13.0-ld
R 36494 /etc/libmap.conf
R 36494 /var/run/ld-elf.so.hints
R 36494 /lib/libc.so.7
R 36494 =
/usr/local/libexec/gcc/powerpc-unknown-freebsd13.0/9.2.0/liblto_plugin.so
R 36494 Version.map
R 36494 libc.so.7.full
W 36494 libc.so.7.full
R 36494 =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/tmp/usr/lib/crti.o
R 36494 =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/tmp/usr/lib/crti.o
R 36494 =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/tmp/usr/lib/crtbeginS.o
R 36494 =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/tmp/usr/lib/crtbeginS.o
. . .


For reference for building crtbeginS.o (much gcc9 detail included from =
using -v):

# Meta data file =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/lib/csu/powerpc/crtbeginS.o.meta
CMD /usr/local/bin/powerpc-unknown-freebsd13.0-gcc9 -gdwarf-2 =
--sysroot=3D/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/po=
werpc.powerpc/tmp -B/usr/local/powerpc-unknown-freebsd13.0/bin/ -O
2 -pipe -I/usr/src/lib/csu/common  -I/usr/src/lib/libc/include =
-DCRT_IRELOC_SUPPRESS    -g -std=3Dgnu99 -Wno-format-zero-length  =
-Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter =
-Wstrict-
prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type =
-Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter =
-Wcast-align -Wchar-subscripts -Winline -Wnested-externs =
-Wredundant-decl
s -Wold-style-definition -Wno-pointer-sign -Wno-error=3Daddress =
-Wno-error=3Darray-bounds -Wno-error=3Dattributes =
-Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered =
-Wno-error=3Ddeprecated-dec
larations -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline=
 -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing =
-Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable =
-Wno-erro
r=3Dunused-function -Wno-error=3Dunused-value =
-Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare =
-Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare =
-Wno-error=3Dunused-const-variable
-Wno-error=3Dbool-operation -Wno-error=3Ddeprecated =
-Wno-error=3Dexpansion-to-defined -Wno-error=3Dformat-overflow =
-Wno-error=3Dformat-truncation -Wno-error=3Dimplicit-fallthrough =
-Wno-error=3Dint-in-bool-context -
Wno-error=3Dmemset-elt-size -Wno-error=3Dnoexcept-type =
-Wno-error=3Dnonnull -Wno-error=3Dpointer-compare =
-Wno-error=3Dstringop-overflow -Wno-error=3Daggressive-loop-optimizations =
-Wno-error=3Dcast-function-type -Wn
o-error=3Dcatch-value -Wno-error=3Dmultistatement-macros =
-Wno-error=3Drestrict -Wno-error=3Dsizeof-pointer-memaccess =
-Wno-error=3Dstringop-truncation   -v    -I/usr/src/lib/csu/powerpc =
-DSHARED -fpic -c -o crtb
eginS.o  /usr/src/lib/csu/common/crtbegin.c
CWD =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/lib/csu/powerpc
TARGET crtbeginS.o
-- command output --
Using built-in specs.
COLLECT_GCC=3D/usr/local/bin/powerpc-unknown-freebsd13.0-gcc9
Target: powerpc-unknown-freebsd13.0
Configured with: =
/wrkdirs/usr/ports/devel/freebsd-gcc9/work-powerpc/gcc-9.2.0/configure =
--target=3Dpowerpc-unknown-freebsd13.0 --disable-nls =
--enable-languages=3Dc,c++ --enable-gnu-indirect-function --ena
ble-initfini-array --program-prefix=3Dpowerpc-unknown-freebsd13.0- =
--program-suffix=3D9 --without-headers --with-gmp=3D/usr/local =
--with-pkgversion=3D'FreeBSD Ports Collection for powerpc' =
--with-system-zlib
--with-gxx-include-dir=3D/usr/include/c++/v1/ --with-sysroot=3D/ =
--with-as=3D/usr/local/bin/powerpc-unknown-freebsd13.0-as =
--with-ld=3D/usr/local/bin/powerpc-unknown-freebsd13.0-ld =
--prefix=3D/usr/local --local
statedir=3D/var --mandir=3D/usr/local/man =
--infodir=3D/usr/local/share/info/ --build=3Dx86_64-unknown-freebsd13.0
Thread model: posix
gcc version 9.2.0 (FreeBSD Ports Collection for powerpc)
COLLECT_GCC_OPTIONS=3D'-gdwarf-2' '-B' =
'/usr/local/powerpc-unknown-freebsd13.0/bin/' '-O2' '-pipe' '-I' =
'/usr/src/lib/csu/common' '-I' '/usr/src/lib/libc/include' '-D' =
'CRT_IRELOC_SUPPRESS' '-g' '-std=3Dg
nu99' '-Wno-format-zero-length' '-Wsystem-headers' '-Wall' =
'-Wno-format-y2k' '-Wextra' '-Wstrict-prototypes' '-Wmissing-prototypes' =
'-Wpointer-arith' '-Wreturn-type' '-Wcast-qual' '-Wwrite-strings' '-
Wswitch' '-Wshadow' '-Wunused-parameter' '-Wcast-align' =
'-Wchar-subscripts' '-Winline' '-Wnested-externs' '-Wredundant-decls' =
'-Wold-style-definition' '-Wno-pointer-sign' '-Wno-error=3Daddress' =
'-Wno-er
ror=3Darray-bounds' '-Wno-error=3Dattributes' '-Wno-error=3Dbool-compare' =
'-Wno-error=3Dcast-align' '-Wno-error=3Dclobbered' =
'-Wno-error=3Ddeprecated-declarations' '-Wno-error=3Denum-compare' =
'-Wno-error=3Dextra' '-W
no-error=3Dinline' '-Wno-error=3Dlogical-not-parentheses' =
'-Wno-error=3Dstrict-aliasing' '-Wno-error=3Duninitialized' =
'-Wno-error=3Dunused-but-set-variable' '-Wno-error=3Dunused-function' =
'-Wno-error=3Dunused-value
' '-Wno-error=3Dmisleading-indentation' '-Wno-error=3Dnonnull-compare' =
'-Wno-error=3Dshift-negative-value' '-Wno-error=3Dtautological-compare' =
'-Wno-error=3Dunused-const-variable' '-Wno-error=3Dbool-operation' '-
Wno-error=3Ddeprecated' '-Wno-error=3Dexpansion-to-defined' =
'-Wno-error=3Dformat-overflow' '-Wno-error=3Dformat-truncation' =
'-Wno-error=3Dimplicit-fallthrough' '-Wno-error=3Dint-in-bool-context' =
'-Wno-error=3Dmemse
t-elt-size' '-Wno-error=3Dnoexcept-type' '-Wno-error=3Dnonnull' =
'-Wno-error=3Dpointer-compare' '-Wno-error=3Dstringop-overflow' =
'-Wno-error=3Daggressive-loop-optimizations' =
'-Wno-error=3Dcast-function-type' '-Wno
-error=3Dcatch-value' '-Wno-error=3Dmultistatement-macros' =
'-Wno-error=3Drestrict' '-Wno-error=3Dsizeof-pointer-memaccess' =
'-Wno-error=3Dstringop-truncation' '-v' '-I' '/usr/src/lib/csu/powerpc' =
'-D' 'SHARED' '
-fpic' '-c' '-o' 'crtbeginS.o'
 /usr/local/libexec/gcc/powerpc-unknown-freebsd13.0/9.2.0/cc1 -quiet -v =
-I /usr/src/lib/csu/common -I /usr/src/lib/libc/include -I =
/usr/src/lib/csu/powerpc -isysroot /usr/obj/powerpcvtsc_xtoolchain-gc
c/powerpc.powerpc/usr/src/powerpc.powerpc/tmp -D__PPC__ -D__ppc__ =
-D__PowerPC__ -D__powerpc__ -Acpu=3Dpowerpc -Amachine=3Dpowerpc -D =
CRT_IRELOC_SUPPRESS -D SHARED /usr/src/lib/csu/common/crtbegin.c -quiet
 -dumpbase crtbegin.c -auxbase-strip crtbeginS.o -gdwarf-2 -g -O2 =
-Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k -Wextra =
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wretu
rn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter =
-Wcast-align -Wchar-subscripts -Winline -Wnested-externs =
-Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-error=3D
address -Wno-error=3Darray-bounds -Wno-error=3Dattributes =
-Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered =
-Wno-error=3Ddeprecated-declarations -Wno-error=3Denum-compare =
-Wno-error=3Dextra -Wn
o-error=3Dinline -Wno-error=3Dlogical-not-parentheses =
-Wno-error=3Dstrict-aliasing -Wno-error=3Duninitialized =
-Wno-error=3Dunused-but-set-variable -Wno-error=3Dunused-function =
-Wno-error=3Dunused-value -Wno-error=3Dm
isleading-indentation -Wno-error=3Dnonnull-compare =
-Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare =
-Wno-error=3Dunused-const-variable -Wno-error=3Dbool-operation =
-Wno-error=3Ddeprecated -Wno-e
rror=3Dexpansion-to-defined -Wno-error=3Dformat-overflow =
-Wno-error=3Dformat-truncation -Wno-error=3Dimplicit-fallthrough =
-Wno-error=3Dint-in-bool-context -Wno-error=3Dmemset-elt-size =
-Wno-error=3Dnoexcept-type -Wn
o-error=3Dnonnull -Wno-error=3Dpointer-compare =
-Wno-error=3Dstringop-overflow -Wno-error=3Daggressive-loop-optimizations =
-Wno-error=3Dcast-function-type -Wno-error=3Dcatch-value =
-Wno-error=3Dmultistatement-macros -
Wno-error=3Drestrict -Wno-error=3Dsizeof-pointer-memaccess =
-Wno-error=3Dstringop-truncation -std=3Dgnu99 -version -fpic -o - |
 /usr/local/bin/powerpc-unknown-freebsd13.0-as -v -I =
/usr/src/lib/csu/common -I /usr/src/lib/libc/include -I =
/usr/src/lib/csu/powerpc -mppc -many -K PIC -mbig -o crtbeginS.o
GNU assembler version 2.33.1 (powerpc-unknown-freebsd13.0) using BFD =
version (GNU Binutils) 2.33.1
GNU C99 (FreeBSD Ports Collection for powerpc) version 9.2.0 =
(powerpc-unknown-freebsd13.0)
        compiled by GNU C version FreeBSD Clang 9.0.0 =
(tags/RELEASE_900/final 372316), GMP version 6.1.2, MPFR version 4.0.2, =
MPC version 1.1.0, isl version none
GGC heuristics: --param ggc-min-expand=3D100 --param =
ggc-min-heapsize=3D131072
ignoring nonexistent directory =
"/usr/local/lib/gcc/powerpc-unknown-freebsd13.0/9.2.0/include-fixed"
ignoring nonexistent directory =
"/usr/local/lib/gcc/powerpc-unknown-freebsd13.0/9.2.0/../../../../powerpc-=
unknown-freebsd13.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/src/lib/csu/common
 /usr/src/lib/libc/include
 /usr/src/lib/csu/powerpc
 /usr/local/lib/gcc/powerpc-unknown-freebsd13.0/9.2.0/include
 =
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerp=
c/tmp/usr/include
End of search list.
GNU C99 (FreeBSD Ports Collection for powerpc) version 9.2.0 =
(powerpc-unknown-freebsd13.0)
        compiled by GNU C version FreeBSD Clang 9.0.0 =
(tags/RELEASE_900/final 372316), GMP version 6.1.2, MPFR version 4.0.2, =
MPC version 1.1.0, isl version none
GGC heuristics: --param ggc-min-expand=3D100 --param =
ggc-min-heapsize=3D131072
Compiler executable checksum: c272cae35a1ab078596359ed10bcfdea
/usr/src/lib/csu/common/crtbegin.c: In function '__do_global_dtors_aux':
/usr/src/lib/csu/common/crtbegin.c:83:21: warning: array subscript 1 is =
above array bounds of 'void (*[1])(void)' [-Warray-bounds]
   83 |   fn =3D __DTOR_LIST__[n];
      |        ~~~~~~~~~~~~~^~~
/usr/src/lib/csu/common/crtbegin.c:68:17: note: while referencing =
'__DTOR_LIST__'
   68 | static crt_func __DTOR_LIST__[] __section(".dtors") __used =3D {
      |                 ^~~~~~~~~~~~~
/usr/src/lib/csu/common/crtbegin.c: In function 'register_classes':
/usr/src/lib/csu/common/crtbegin.c:114:49: warning: array subscript 0 is =
above array bounds of 'void (*[0])(void)' [-Warray-bounds]
  114 |  if (_Jv_RegisterClasses !=3D NULL && __JCR_LIST__[0] !=3D 0)
      |                                     ~~~~~~~~~~~~^~~
/usr/src/lib/csu/common/crtbegin.c:114:49: warning: array subscript 0 is =
above array bounds of 'void (*[0])(void)' [-Warray-bounds]
/usr/src/lib/csu/common/crtbegin.c:105:17: note: while referencing =
'__JCR_LIST__'
  105 | static crt_func __JCR_LIST__[] __section(".jcr") __used =3D { };
      |                 ^~~~~~~~~~~~
=
COMPILER_PATH=3D/usr/local/powerpc-unknown-freebsd13.0/bin/:/usr/local/lib=
exec/gcc/powerpc-unknown-freebsd13.0/9.2.0/:/usr/local/libexec/gcc/powerpc=
-unknown-freebsd13.0/9.2.0/:/usr/local/libexec/gcc/pow
=
erpc-unknown-freebsd13.0/:/usr/local/lib/gcc/powerpc-unknown-freebsd13.0/9=
.2.0/:/usr/local/lib/gcc/powerpc-unknown-freebsd13.0/:/usr/local/lib/gcc/p=
owerpc-unknown-freebsd13.0/9.2.0/../../../../powerpc
-unknown-freebsd13.0/bin/
=
LIBRARY_PATH=3D/usr/local/powerpc-unknown-freebsd13.0/bin/:/usr/local/lib/=
gcc/powerpc-unknown-freebsd13.0/9.2.0/:/usr/obj/powerpcvtsc_xtoolchain-gcc=
/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/lib/
COLLECT_GCC_OPTIONS=3D'-gdwarf-2' '-B' =
'/usr/local/powerpc-unknown-freebsd13.0/bin/' '-O2' '-pipe' '-I' =
'/usr/src/lib/csu/common' '-I' '/usr/src/lib/libc/include' '-D' =
'CRT_IRELOC_SUPPRESS' '-g' '-std=3Dg
nu99' '-Wno-format-zero-length' '-Wsystem-headers' '-Wall' =
'-Wno-format-y2k' '-Wextra' '-Wstrict-prototypes' '-Wmissing-prototypes' =
'-Wpointer-arith' '-Wreturn-type' '-Wcast-qual' '-Wwrite-strings' '-
Wswitch' '-Wshadow' '-Wunused-parameter' '-Wcast-align' =
'-Wchar-subscripts' '-Winline' '-Wnested-externs' '-Wredundant-decls' =
'-Wold-style-definition' '-Wno-pointer-sign' '-Wno-error=3Daddress' =
'-Wno-er
ror=3Darray-bounds' '-Wno-error=3Dattributes' '-Wno-error=3Dbool-compare' =
'-Wno-error=3Dcast-align' '-Wno-error=3Dclobbered' =
'-Wno-error=3Ddeprecated-declarations' '-Wno-error=3Denum-compare' =
'-Wno-error=3Dextra' '-W
no-error=3Dinline' '-Wno-error=3Dlogical-not-parentheses' =
'-Wno-error=3Dstrict-aliasing' '-Wno-error=3Duninitialized' =
'-Wno-error=3Dunused-but-set-variable' '-Wno-error=3Dunused-function' =
'-Wno-error=3Dunused-value
' '-Wno-error=3Dmisleading-indentation' '-Wno-error=3Dnonnull-compare' =
'-Wno-error=3Dshift-negative-value' '-Wno-error=3Dtautological-compare' =
'-Wno-error=3Dunused-const-variable' '-Wno-error=3Dbool-operation' '-
Wno-error=3Ddeprecated' '-Wno-error=3Dexpansion-to-defined' =
'-Wno-error=3Dformat-overflow' '-Wno-error=3Dformat-truncation' =
'-Wno-error=3Dimplicit-fallthrough' '-Wno-error=3Dint-in-bool-context' =
'-Wno-error=3Dmemse
t-elt-size' '-Wno-error=3Dnoexcept-type' '-Wno-error=3Dnonnull' =
'-Wno-error=3Dpointer-compare' '-Wno-error=3Dstringop-overflow' =
'-Wno-error=3Daggressive-loop-optimizations' =
'-Wno-error=3Dcast-function-type' '-Wno
-error=3Dcatch-value' '-Wno-error=3Dmultistatement-macros' =
'-Wno-error=3Drestrict' '-Wno-error=3Dsizeof-pointer-memaccess' =
'-Wno-error=3Dstringop-truncation' '-v' '-I' '/usr/src/lib/csu/powerpc' =
'-D' 'SHARED' '
-fpic' '-c' '-o' 'crtbeginS.o'


=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?1617745A-F1C4-4565-9D71-E5B2B714637D>