Date: Sun, 23 Jul 2017 00:42:07 -0700 From: Mark Millard <markmi@dsl-only.net> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: -r321371 amd64 -> powerpc64 cross build: lldb.full link fails with: c++: error: linker command failed with exit code 1, -B/usr/local/powerpc64-freebsd/bin/ in use Message-ID: <98DFB763-0CA4-45B3-98E3-050462A9EC15@dsl-only.net> In-Reply-To: <9EF818CD-73FC-4283-8CC2-4BA21342CFB1@dsl-only.net> References: <9EF818CD-73FC-4283-8CC2-4BA21342CFB1@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2017-Jul-23, at 12:34 AM, Mark Millard <markmi at dsl-only.net> = wrote: > The devel/powerpc64-binutils is failing to link lldb.full for > the clang/llvm 5 based context. (I historically use WITH_LLD > when targeting powerpc64 but do not use lldb since it did not > work overall.) I will simply change to WITHOUT_LLD for now. >=20 > I show the build context before the full error text. >=20 > Build Context: >=20 > # /usr/local/powerpc64-freebsd/bin/ld --version > GNU ld (GNU Binutils) 2.28 > Copyright (C) 2017 Free Software Foundation, Inc. > This program is free software; you may redistribute it under the terms = of > the GNU General Public License version 3 or (at your option) a later = version. > This program has absolutely no warranty. >=20 > # svnlite info /usr/src/ | grep "Re[plv]" > Relative URL: ^/head > Repository Root: svn://svn.freebsd.org/base > Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f > Revision: 321371 > Last Changed Rev: 321371 I should have noted a converted-to-V5 historical patch that I have involved: # svnlite diff /usr/src/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp Index: /usr/src/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp =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/src/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp (revision = 321371) +++ /usr/src/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp (working copy) @@ -60,7 +60,8 @@ static uint16_t applyPPCHighesta(uint64_t V) { return (V + 0x8000) >> = 48; } PPC64::PPC64() { - PltRel =3D GotRel =3D R_PPC64_GLOB_DAT; + GotRel =3D R_PPC64_GLOB_DAT; + PltRel =3D R_PPC64_JMP_SLOT; RelativeRel =3D R_PPC64_RELATIVE; GotEntrySize =3D 8; GotPltEntrySize =3D 8; > # svnlite info /usr/ports/ | grep "Re[plv]" > Relative URL: ^/head > Repository Root: svn://svn.freebsd.org/ports > Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 > Revision: 444872 > Last Changed Rev: 444872 >=20 > # more = ~/sys_build_scripts.amd64-host/make_powerpc64vtsc_nodebug_clang_altbinutil= s-amd64-host.sh=20 > kldload -n filemon && \ > script = ~/sys_typescripts/typescript_make_powerpc64vtsc_nodebug_clang_altbinutils-= amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \ > env __MAKE_CONF=3D"/root/src.configs/make.conf" SRCCONF=3D"/dev/null" = SRC_ENV_CONF=3D"/root/src.configs/src.conf.powerpc64-clang_altbinutils-boo= tstrap.amd64-host" \ > WITH_META_MODE=3Dyes \ > MAKEOBJDIRPREFIX=3D"/usr/obj/powerpc64vtsc_clang_altbinutils" \ > make $* >=20 > # more /root/src.configs/make.conf > CFLAGS.gcc+=3D -v >=20 > # more = /root/src.configs/src.conf.powerpc64-clang_altbinutils-bootstrap.amd64-hos= t > TO_TYPE=3Dpowerpc64 > TOOLS_TO_TYPE=3D${TO_TYPE} > VERSION_CONTEXT=3D12.0 > # > KERNCONF=3DGENERIC64vtsc-NODBG > TARGET=3Dpowerpc > .if ${.MAKE.LEVEL} =3D=3D 0 > TARGET_ARCH=3D${TO_TYPE} > .export TARGET_ARCH > .endif > # > WITH_CROSS_COMPILER=3D > WITHOUT_SYSTEM_COMPILER=3D > # > WITH_LIBCPLUSPLUS=3D > WITHOUT_BINUTILS_BOOTSTRAP=3D > WITH_ELFTOOLCHAIN_BOOTSTRAP=3D > WITH_CLANG_BOOTSTRAP=3D > WITH_CLANG=3D > WITH_CLANG_IS_CC=3D > WITH_CLANG_FULL=3D > WITH_CLANG_EXTRAS=3D > WITHOUT_LLD_BOOTSTRAP=3D > WITH_LLD=3D > WITHOUT_LLD_IS_LD=3D > WITH_LLDB=3D > # > WITH_BOOT=3D > WITH_LIB32=3D > # > WITHOUT_GCC_BOOTSTRAP=3D > WITHOUT_GCC=3D > WITHOUT_GCC_IS_CC=3D > WITHOUT_GNUCXX=3D > # > NO_WERROR=3D > MALLOC_PRODUCTION=3D > # > # Avoid converts between pointers to integer types with different sign = [-Werror,-Wpointer-sign] > # and such from blocking the build. > WERROR=3D > # > WITH_REPRODUCIBLE_BUILD=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_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ > .if ${.MAKE.LEVEL} =3D=3D 0 > # > # Note: The WITH_CROSS_COMPILER picks up the CROSS_BINUTILS_PREFIX > # binding automatically. > # > XAS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as > XAR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar > 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 XNM > .export XOBJCOPY > .export XOBJDUMP > .export XRANLIB > .export XSIZE > .export XSTRINGS > XLD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld > .export XLD > .endif >=20 >=20 > The error text: >=20 > --- all_subdir_lib --- > --- test_01 --- > (cd /usr/src/lib/libxo/tests && DEPENDFILE=3D.depend.test_01 = NO_SUBDIR=3D1 make -f /usr/src/lib/libxo/tests/Makefile = _RECURSING_PROGS=3Dt PROG=3Dtest_01 ) > Building = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib/lib= xo/tests/test_01.o > --- all_subdir_usr.bin --- > --- all_subdir_usr.bin/clang/lldb --- > c++: error: linker command failed with exit code 1 (use -v to see = invocation) > --- all_subdir_lib --- > Building = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib/lib= xo/tests/test_01.full > --- all_subdir_usr.bin --- > *** [lldb.full] Error code 1 >=20 > make[5]: stopped in /usr/src/usr.bin/clang/lldb > .ERROR_TARGET=3D'lldb.full' > = .ERROR_META_FILE=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.power= pc64/usr/src/usr.bin/clang/lldb/lldb.full.meta' > .MAKE.LEVEL=3D'5' > MAKEFILE=3D'' > .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes= verbose' > _ERROR_CMD=3D'c++ -target powerpc64-unknown-freebsd12.0 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/tmp -B/usr/local/powerpc64-freebsd/bin/ -O2 -pipe = -I/usr/src/contrib/llvm/tools/lldb/include = -I/usr/src/contrib/llvm/tools/clang/include -DCLANG_ENABLE_ARCMT = -DCLANG_ENABLE_STATIC_ANALYZER -I/usr/src/lib/clang/include = -I/usr/src/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL = -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS = -DLLVM_DEFAULT_TARGET_TRIPLE=3D\"powerpc64-unknown-freebsd12.0\" = -DLLVM_HOST_TRIPLE=3D\"powerpc64-unknown-freebsd12.0\" = -DDEFAULT_SYSROOT=3D\"\" -ffunction-sections -fdata-sections -g = -fstack-protector-strong -Wno-empty-body -Wno-string-plus-int = -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value = -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion = -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch = -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses = -Qunused-arguments -std=3Dc++11 -fno-e > xceptions -fno-rtti -stdlib=3Dlibc++ -Wno-c++11-extensions = -Wl,--gc-sections -o lldb.full Driver.o = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib/cla= ng/liblldb/liblldb.a = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib/cla= ng/libclang/libclang.a = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib/cla= ng/libllvm/libllvm.a -ledit -lpanel -lncursesw -lz -lpthread;' > .CURDIR=3D'/usr/src/usr.bin/clang/lldb' > .MAKE=3D'make' > = .OBJDIR=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/= src/usr.bin/clang/lldb' > .TARGETS=3D'all' > = DESTDIR=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/= src/tmp' > LD_LIBRARY_PATH=3D'' > MACHINE=3D'powerpc' > MACHINE_ARCH=3D'powerpc64' > = MAKEOBJDIRPREFIX=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.power= pc64' > MAKESYSPATH=3D'/usr/src/share/mk' > MAKE_VERSION=3D'20170711' > = PATH=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src= /tmp/legacy/usr/sbin:/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powe= rpc64/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpc64vtsc_clang_altbinutils/= powerpc.powerpc64/usr/src/tmp/legacy/bin:/usr/obj/powerpc64vtsc_clang_altb= inutils/powerpc.powerpc64/usr/src/tmp/usr/sbin:/usr/obj/powerpc64vtsc_clan= g_altbinutils/powerpc.powerpc64/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/= usr/bin' > SRCTOP=3D'/usr/src' > = OBJTOP=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/s= rc' > .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-clang_altbinutils-bootstrap.amd64-hos= t /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk = /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk = /usr/src/share/mk/src.sys.mk /dev/null = /usr/src/usr.bin/clang/lldb/Makefile /usr/src/lib/clang/lldb.pre.mk = /usr/src/lib/clang/clang.pre.mk /usr/src/lib/clang/llvm.pre.mk = /usr/src/lib/clang/clang.build.mk /usr/src/share/mk/src.opts.mk = /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.opts.mk = /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/bsd.compiler.mk = /usr/src/share/mk/bsd.linker.mk /usr/src/lib/clang/llvm.build.mk = /usr/src/share/mk/bsd.prog.mk /usr/src/share/mk/bsd.init.mk = /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk = /usr/src/usr.bin/clang/lldb/../Makefile.inc = /usr/src/usr.bin/clang/lldb/../../Makefile.inc = /usr/src/share/mk/bsd.libnames.mk /usr/src/share/mk/sr > c.libnames.mk /usr/src/share/mk/bsd.nls.mk = /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.files.mk = /usr/src/share/mk/bsd.incs.mk /usr/src/share/mk/bsd.links.mk = /usr/src/share/mk/bsd.man.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/usr.bin/clang/lldb = /usr/src/contrib/llvm/tools/lldb/docs = /usr/src/contrib/llvm/tools/lldb/tools/driver' > 1 error >=20 > make[5]: stopped in /usr/src/usr.bin/clang/lldb > .ERROR_TARGET=3D'lldb.full' > = .ERROR_META_FILE=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.power= pc64/usr/src/usr.bin/clang/lldb/lldb.full.meta' > .MAKE.LEVEL=3D'5' > MAKEFILE=3D'' > .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes= verbose' > _ERROR_CMD=3D'c++ -target powerpc64-unknown-freebsd12.0 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/tmp -B/usr/local/powerpc64-freebsd/bin/ -O2 -pipe = -I/usr/src/contrib/llvm/tools/lldb/include = -I/usr/src/contrib/llvm/tools/clang/include -DCLANG_ENABLE_ARCMT = -DCLANG_ENABLE_STATIC_ANALYZER -I/usr/src/lib/clang/include = -I/usr/src/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL = -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS = -DLLVM_DEFAULT_TARGET_TRIPLE=3D\"powerpc64-unknown-freebsd12.0\" = -DLLVM_HOST_TRIPLE=3D\"powerpc64-unknown-freebsd12.0\" = -DDEFAULT_SYSROOT=3D\"\" -ffunction-sections -fdata-sections -g = -fstack-protector-strong -Wno-empty-body -Wno-string-plus-int = -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value = -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion = -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch = -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses = -Qunused-arguments -std=3Dc++11 -fno-e > xceptions -fno-rtti -stdlib=3Dlibc++ -Wno-c++11-extensions = -Wl,--gc-sections -o lldb.full Driver.o = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib/cla= ng/liblldb/liblldb.a = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib/cla= ng/libclang/libclang.a = /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib/cla= ng/libllvm/libllvm.a -ledit -lpanel -lncursesw -lz -lpthread;' > .CURDIR=3D'/usr/src/usr.bin/clang/lldb' > .MAKE=3D'make' > = .OBJDIR=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/= src/usr.bin/clang/lldb' > .TARGETS=3D'all' > = DESTDIR=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/= src/tmp' > LD_LIBRARY_PATH=3D'' > MACHINE=3D'powerpc' > MACHINE_ARCH=3D'powerpc64' > = MAKEOBJDIRPREFIX=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.power= pc64' > MAKESYSPATH=3D'/usr/src/share/mk' > MAKE_VERSION=3D'20170711' > = PATH=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src= /tmp/legacy/usr/sbin:/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powe= rpc64/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpc64vtsc_clang_altbinutils/= powerpc.powerpc64/usr/src/tmp/legacy/bin:/usr/obj/powerpc64vtsc_clang_altb= inutils/powerpc.powerpc64/usr/src/tmp/usr/sbin:/usr/obj/powerpc64vtsc_clan= g_altbinutils/powerpc.powerpc64/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/= usr/bin' > SRCTOP=3D'/usr/src' > = OBJTOP=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/s= rc' > .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-clang_altbinutils-bootstrap.amd64-hos= t /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk = /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk = /usr/src/share/mk/src.sys.mk /dev/null = /usr/src/usr.bin/clang/lldb/Makefile /usr/src/lib/clang/lldb.pre.mk = /usr/src/lib/clang/clang.pre.mk /usr/src/lib/clang/llvm.pre.mk = /usr/src/lib/clang/clang.build.mk /usr/src/share/mk/src.opts.mk = /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.opts.mk = /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/bsd.compiler.mk = /usr/src/share/mk/bsd.linker.mk /usr/src/lib/clang/llvm.build.mk = /usr/src/share/mk/bsd.prog.mk /usr/src/share/mk/bsd.init.mk = /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk = /usr/src/usr.bin/clang/lldb/../Makefile.inc = /usr/src/usr.bin/clang/lldb/../../Makefile.inc = /usr/src/share/mk/bsd.libnames.mk /usr/src/share/mk/sr > c.libnames.mk /usr/src/share/mk/bsd.nls.mk = /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.files.mk = /usr/src/share/mk/bsd.incs.mk /usr/src/share/mk/bsd.links.mk = /usr/src/share/mk/bsd.man.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/usr.bin/clang/lldb = /usr/src/contrib/llvm/tools/lldb/docs = /usr/src/contrib/llvm/tools/lldb/tools/driver' > *** [all_subdir_usr.bin/clang/lldb] Error code 2 =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?98DFB763-0CA4-45B3-98E3-050462A9EC15>