Date: Mon, 26 Sep 2016 16:48:50 -0700 From: Mark Millard <markmi@dsl-only.net> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org> Subject: devel/powerpc64-gcc cross-build of libc++ based stable/11 -r306344 buildworld failed: call to . . . lacks nop, can't restore toc; recompile with -fPIC Message-ID: <BBE377CB-94A3-4960-9661-A9BDF173AF8E@dsl-only.net>
next in thread | raw e-mail | index | archive | help
So far I'm unable to use powerpc64-gcc (as of /usr/ports -r422765) to = build stable/11 -r306344 on amd64 -r306344 : See the > iostream.cpp:(.text.startup+0x1c): call to = `std::__1::ios_base::Init::Init()' lacks nop, can't restore toc; = recompile with -fPIC in the later extraction from the build log. The version of ld (and other = such) in use is: > # /usr/local/bin/powerpc64-freebsd-ld --version > GNU ld (GNU Binutils) 2.25.1 . . . This is because of reported problems with 2.27 for powerpc64. (It will = still be a while before I've access to the powerpc64's again.) As for the log file material. . . > --- all_subdir_lib/libdevdctl --- > Building = /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/lib/libdevdctl/libprivatedev= dctl.so.0.full > --- libprivatedevdctl.so.0.full --- > building shared library libprivatedevdctl.so.0 . . . > --- all_subdir_lib/libdevdctl --- > /usr/local/bin/powerpc64-freebsd-ld: = /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/../lib/libc++/libc++.a(i= ostream.o): In function `_GLOBAL__sub_I__ZNSt3__13cinE': > iostream.cpp:(.text.startup+0x1c): call to = `std::__1::ios_base::Init::Init()' lacks nop, can't restore toc; = recompile with -fPIC > /usr/local/bin/powerpc64-freebsd-ld: final link failed: Bad value > --- all_subdir_lib/libevent --- > COLLECT_GCC_OPTIONS=3D'-isystem' = '/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/include' = '-L/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib' '-B' = '/usr/local/powerpc64-freebsd/bin/' '-O2' '-pipe' '-I' = '/usr/src/lib/libevent' '-D' 'HAVE_CLOCK_GETTIME' '-D' 'HAVE_FCNTL_H' = '-D' 'HAVE_POLL' '-D' 'HAVE_SELECT' '-D' 'HAVE_SETFD' '-D' = 'HAVE_STDARG_H' '-D' 'HAVE_SYS_IOCTL_H' '-D' 'HAVE_SYS_TIME_H' '-D' = 'HAVE_UNISTD_H' '-D' 'HAVE_VASPRINTF' '-D' 'HAVE_WORKING_KQUEUE' '-D' = 'VERSION=3D"1.3b"' '-std=3Dgnu99' '-fstack-protector-strong' = '-Wsystem-headers' '-Wall' '-Wno-format-y2k' '-Wno-uninitialized' = '-Wno-pointer-sign' '-Wno-error=3Dunused-function' = '-Wno-error=3Denum-compare' '-Wno-error=3Dlogical-not-parentheses' = '-Wno-error=3Dbool-compare' '-Wno-error=3Duninitialized' = '-Wno-error=3Darray-bounds' '-Wno-error=3Dclobbered' = '-Wno-error=3Dcast-align' '-Wno-error=3Dextra' '-Wno-error=3Dattributes' = '-Wno-error=3Dinline' '-Wno-error=3Dunused-but-set-variable' = '-Wno-error=3Dunused-value' '-Wno-error=3Dstrict-aliasing' = '-Wno-error=3Daddress' '-v' '-c' '-o' 'signal.o' > --- all_subdir_lib/libdevdctl --- > collect2: error: ld returned 1 exit status > *** [libprivatedevdctl.so.0.full] Error code 1 >=20 > make[5]: stopped in /usr/src/lib/libdevdctl > .ERROR_TARGET=3D'libprivatedevdctl.so.0.full' > = .ERROR_META_FILE=3D'/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/lib/libd= evdctl/libprivatedevdctl.so.0.full.meta' > .MAKE.LEVEL=3D'5' > MAKEFILE=3D'' > .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes= verbose' > .CURDIR=3D'/usr/src/lib/libdevdctl' > .MAKE=3D'make' > .OBJDIR=3D'/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/lib/libdevdctl'= > .TARGETS=3D'all' > DESTDIR=3D'/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp' > LD_LIBRARY_PATH=3D'' > MACHINE=3D'powerpc' > MACHINE_ARCH=3D'powerpc64' > MAKEOBJDIRPREFIX=3D'/usr/obj/xtoolchain/powerpc.powerpc64' > MAKESYSPATH=3D'/usr/src/share/mk' > MAKE_VERSION=3D'20160606' > = PATH=3D'/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/legacy/usr/sbin:= /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/legacy/usr/bin:/usr/obj/= xtoolchain/powerpc.powerpc64/usr/src/tmp/legacy/bin:/usr/obj/xtoolchain/po= werpc.powerpc64/usr/src/tmp/usr/sbin:/usr/obj/xtoolchain/powerpc.powerpc64= /usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin' > SRCTOP=3D'/usr/src' > OBJTOP=3D'/usr/obj/xtoolchain/powerpc.powerpc64/usr/src' > .MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk = /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk = /root/src.configs/src.conf.powerpc64-xtoolchain.amd64-host = /usr/src/share/mk/bsd.mkopt.mk /root/src.configs/make.conf = /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk = /etc/src.conf /usr/src/lib/libdevdctl/Makefile = /usr/src/share/mk/bsd.lib.mk /usr/src/share/mk/bsd.init.mk = /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk = /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk = /usr/src/lib/libdevdctl/../Makefile.inc /usr/src/share/mk/bsd.own.mk = /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.libnames.mk = /usr/src/share/mk/src.libnames.mk /usr/src/share/mk/src.opts.mk = /usr/src/share/mk/bsd.symver.mk /usr/src/share/mk/bsd.nls.mk = /usr/src/share/mk/bsd.files.mk /usr/src/share/mk/bsd.incs.mk = /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.links.mk = /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk = /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk = /usr/src/share/mk/bsd.sys.mk' > .PATH=3D'. /usr/src/lib/libdevdctl' > 1 error Context details: > # freebsd-version -ku; uname -apKU > 11.0-PRERELEASE > 11.0-PRERELEASE > FreeBSD FreeBSDx64 11.0-PRERELEASE FreeBSD 11.0-PRERELEASE #7 = r306344M: Mon Sep 26 10:29:55 PDT 2016 = markmi@FreeBSDx64:/usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODBG = amd64 amd64 1100503 1100503 > # svnlite info /usr/src | grep "Re[lv][ai:]" > Relative URL: ^/stable/11 > Revision: 306344 > Last Changed Rev: 306344 > # svnlite info /usr/ports | grep "Re[lv][ai:]" > Relative URL: ^/head > Revision: 422765 > Last Changed Rev: 422765 But I have avoided the recent 2.27 of devel/binutils and = devel/powerpc64-binutils : > # svnlite info /usr/ports/devel/powerpc64-binutils/ | grep = "Re[lv][ai:]" > Relative URL: ^/head/devel/powerpc64-binutils > Revision: 407342 > Last Changed Rev: 407342 > # svnlite info /usr/ports/devel/binutils/ | grep "Re[lv][ai:]" > Relative URL: ^/head/devel/binutils > Revision: 416639 > Last Changed Rev: 416639 As for src.conf and related. . . > # more = ~/sys_build_scripts.amd64-host/make_powerpc64vtsc_nodebug_incl_clang_xtool= chain-amd64-host.sh=20 > kldload -n filemon && \ > script = ~/sys_typescripts/typescript_make_powerpc64vtsc_nodebug_incl_clang_xtoolch= ain-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \ > env __MAKE_CONF=3D"/root/src.configs/make.conf" = SRC_ENV_CONF=3D"/root/src.configs/src.conf.powerpc64-xtoolchain.amd64-host= " \ > WITH_META_MODE=3Dyes \ > MAKEOBJDIRPREFIX=3D"/usr/obj/xtoolchain" \ > make $* > # more ~/src.configs/src.conf.powerpc64-xtoolchain.amd64-host=20 > TO_TYPE=3Dpowerpc64 > TOOLS_TO_TYPE=3D${TO_TYPE} > VERSION_CONTEXT=3D11.0 > # > KERNCONF=3DGENERIC64vtsc-NODEBUG > TARGET=3Dpowerpc > .if ${.MAKE.LEVEL} =3D=3D 0 > TARGET_ARCH=3D${TO_TYPE} > .export TARGET_ARCH > .endif > # > WITHOUT_CROSS_COMPILER=3D > WITHOUT_SYSTEM_COMPILER=3D > # > WITH_LIBCPLUSPLUS=3D > WITHOUT_BINUTILS_BOOTSTRAP=3D > WITHOUT_CLANG_BOOTSTRAP=3D > WITH_CLANG=3D > WITH_CLANG_IS_CC=3D > WITH_CLANG_FULL=3D > WITH_CLANG_EXTRAS=3D > WITH_LLDB=3D > # > WITH_BOOT=3D > # powerpc64 LIB32 builds via gcc 4.9 or later variants that I've tried > # but the LIB32 does not work [crtbeginS code problem(s)] > WITHOUT_LIB32=3D > # > WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=3D > WITHOUT_GCC_BOOTSTRAP=3D > WITHOUT_GCC=3D > WITHOUT_GCC_IS_CC=3D > WITHOUT_GNUCXX=3D > # > NO_WERROR=3D > #WERROR=3D > MALLOC_PRODUCTION=3D > # > WITH_DEBUG_FILES=3D > # > # > # For TO (so-called "cross") stages . . . > # So-called-cross via ${TO_TYPE}-xtoolchain-gcc/${TO_TYPE}-gcc. . . > # TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . = . > # > CROSS_TOOLCHAIN=3D${TO_TYPE}-gcc > X_COMPILER_TYPE=3Dgcc > CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ > .if ${.MAKE.LEVEL} =3D=3D 0 > = XCC=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-gc= c > = XCXX=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-g= ++ > = XCPP=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-c= pp > .export XCC > .export XCXX > .export XCPP > XAS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as > XAR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar > XLD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld > XNM=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm > XOBJCOPY=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy > XOBJDUMP=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump > XRANLIB=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib > XSIZE=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size > #NO-SUCH: XSTRINGS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings > XSTRINGS=3D/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings > .export XAS > .export XAR > .export XLD > .export XNM > .export XOBJCOPY > .export XOBJDUMP > .export XRANLIB > .export XSIZE > .export XSTRINGS > .endif > # > # > # =46rom based on clang (via system). . . > # > .if ${.MAKE.LEVEL} =3D=3D 0 > CC=3D/usr/bin/clang > CXX=3D/usr/bin/clang++ > CPP=3D/usr/bin/clang-cpp > .export CC > .export CXX > .export CPP > .endif > # more /etc/make.conf > WANT_QT_VERBOSE_CONFIGURE=3D1 > # > DEFAULT_VERSIONS+=3Dperl5=3D5.22 > WRKDIRPREFIX=3D/usr/obj/portswork > WITH_DEBUG=3D > WITH_DEBUG_FILES=3D > MALLOC_PRODUCTION=3D > # svnlite status /usr/src > M = /usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp > M /usr/src/lib/csu/powerpc64/Makefile > ? /usr/src/sys/amd64/conf/GENERIC-NODBG > ? /usr/src/sys/amd64/include/include > ? /usr/src/sys/arm/conf/RPI2-NODBG > ? /usr/src/sys/arm/include/include > M /usr/src/sys/boot/ofw/Makefile.inc > M /usr/src/sys/boot/powerpc/Makefile.inc > M /usr/src/sys/boot/powerpc/kboot/Makefile > M /usr/src/sys/boot/uboot/Makefile.inc > M /usr/src/sys/conf/Makefile.powerpc > M /usr/src/sys/conf/kern.mk > M /usr/src/sys/conf/kmod.mk > ? /usr/src/sys/powerpc/conf/GENERIC64-NODBG > ? /usr/src/sys/powerpc/conf/GENERIC64vtsc > ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODEBUG > ? /usr/src/sys/powerpc/conf/GENERICvtsc > ? /usr/src/sys/powerpc/conf/GENERICvtsc-NODEBUG > ? /usr/src/sys/powerpc/include/include > M /usr/src/sys/powerpc/ofw/ofw_machdep.c > M /usr/src/sys/powerpc/powerpc/exec_machdep.c > ? /usr/src/sys/x86/include/include The include/include's were not added by me. They just point back to the = parent include. The rest of the powerpc64 stuff I've been using for a long time, some of = it is for booting PowerMac G5's reliably. Other powerpc64/powerpc parts = are mostly tied to my clang 3.8.0 investigations for targeting powerpc64 = and powerpc. =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BBE377CB-94A3-4960-9661-A9BDF173AF8E>