Date: Mon, 16 Jul 2018 15:31:50 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Mark Millard <marklmi@yahoo.com>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: New kernel-toolchain buildkernel problem for amd64 -> aarch64 cross build ( after -r336348 ) : ld used for addf_data only can target: elf_x86_64_fbsd elf_i386_fbsd Message-ID: <81184558-6b23-085b-19e3-b11569808174@FreeBSD.org> In-Reply-To: <B3539689-7913-4790-A1DD-6911DAFAF9D0@yahoo.com> References: <B3539689-7913-4790-A1DD-6911DAFAF9D0@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9hQNWkjsIiiFcIPhNDnsTlDwnzJBg9A99 Content-Type: multipart/mixed; boundary="B00CnU7wHsjjMXqvoeTfgybVZDaFqJEtr"; protected-headers="v1" From: Bryan Drewery <bdrewery@FreeBSD.org> To: Mark Millard <marklmi@yahoo.com>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Message-ID: <81184558-6b23-085b-19e3-b11569808174@FreeBSD.org> Subject: Re: New kernel-toolchain buildkernel problem for amd64 -> aarch64 cross build ( after -r336348 ) : ld used for addf_data only can target: elf_x86_64_fbsd elf_i386_fbsd References: <B3539689-7913-4790-A1DD-6911DAFAF9D0@yahoo.com> In-Reply-To: <B3539689-7913-4790-A1DD-6911DAFAF9D0@yahoo.com> --B00CnU7wHsjjMXqvoeTfgybVZDaFqJEtr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 7/16/18 1:21 PM, Mark Millard wrote: > I attempted a from-scratch (. . ./arm64.aarch64/ empty) kernel-toolchai= n buildkernel > targeting aarch64 from amd64 based on head -r336349 . It failed by endi= ng up > using an ld that can only target elf_x86_64_fbsd elf_i386_fbsd : I probably extended the LLVM_TARGET_ALL=3Dno in cross-compiler too far. I= thought I had left that out for kernel-toolchain but apparently not. Try this patch and kernel-toolchain after applying please: http://people.freebsd.org/~bdrewery/patches/cross-compiler-fix.diff >=20 > . . . > --- buildkernel --- > Building /usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/s= ys/GENERIC-NODBG/modules/usr/src/sys/modules/accf_data/accf_data.kld > --- accf_data.kld --- > ld: unrecognised emulation mode: aarch64elf > Supported emulations: elf_x86_64_fbsd elf_i386_fbsd > *** [accf_data.kld] Error code 1 >=20 > make[4]: stopped in /usr/src/sys/modules/accf_data > .ERROR_TARGET=3D'accf_data.kld' > .ERROR_META_FILE=3D'/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm6= 4.aarch64/sys/GENERIC-NODBG/modules/usr/src/sys/modules/accf_data/accf_da= ta.kld.meta' > .MAKE.LEVEL=3D'4' > MAKEFILE=3D'' > .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dye= s verbose' > _ERROR_CMD=3D'ld -m aarch64elf -d -warn-common -r -d -o accf_data.kld a= ccf_data.o; ctfmerge -L VERSION -g -o accf_data.kld accf_data.o; :> expor= t_syms; awk -f /usr/src/sys/conf/kmod_syms.awk accf_data.kld export_syms= | xargs -J% objcopy % accf_data.kld;' > .CURDIR=3D'/usr/src/sys/modules/accf_data' > .MAKE=3D'make' > .OBJDIR=3D'/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64= /sys/GENERIC-NODBG/modules/usr/src/sys/modules/accf_data' > .TARGETS=3D'all' > DESTDIR=3D'' > LD_LIBRARY_PATH=3D'' > MACHINE=3D'arm64' > MACHINE_ARCH=3D'aarch64' > MAKEOBJDIRPREFIX=3D'/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm6= 4.aarch64/sys/GENERIC-NODBG/modules' > MAKESYSPATH=3D'/usr/src/share/mk' > MAKE_VERSION=3D'20180512' > PATH=3D'/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/tm= p/legacy/usr/sbin:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aa= rch64/tmp/legacy/usr/bin:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/a= rm64.aarch64/tmp/legacy/bin:/usr/obj/cortexA53_clang/arm64.aarch64/usr/sr= c/arm64.aarch64/tmp/usr/sbin:/usr/obj/cortexA53_clang/arm64.aarch64/usr/s= rc/arm64.aarch64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin' > SRCTOP=3D'/usr/src' > OBJTOP=3D'/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/= sys/GENERIC-NODBG/modules/usr/src' > .MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys= =2Eenv.mk /usr/src/share/mk/src.sys.env.mk /root/src.configs/src.conf.cor= texA53-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src= /share/mk/src.sys.obj.mk /usr/src/share/mk/auto.obj.mk /usr/src/share/mk/= bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.m= k /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/accf_data/M= akefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.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/sys/modules/accf_data/../Makefile.inc /usr/src/share/mk/bsd.own.mk /= usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src= /sys/conf/kern.opts.mk /usr/src/sys/conf/config.mk /usr/src/share/mk/bsd.= links.mk /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze= =2Emk /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk /usr/s= rc/sys/conf/kern.mk' > .PATH=3D'. /usr/src/sys/modules/accf_data /usr/src/sys/netinet /usr/obj= /cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/sys/GENERIC-NODBG' > 1 error >=20 >=20 >=20 > Detailed context: >=20 > # uname -apKU > FreeBSD FBSDUSSD 12.0-CURRENT FreeBSD 12.0-CURRENT r336349M amd64 amd= 64 1200073 1200073 >=20 > The "M" is mostly for powerpc* family experiments: >=20 > # svnlite status /usr/src/ | sort > ? /usr/src/sys/amd64/conf/GENERIC-DBG > ? /usr/src/sys/amd64/conf/GENERIC-NODBG > ? /usr/src/sys/arm/conf/GENERIC-DBG > ? /usr/src/sys/arm/conf/GENERIC-NODBG > ? /usr/src/sys/arm64/conf/GENERIC-DBG > ? /usr/src/sys/arm64/conf/GENERIC-NODBG > ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-DBG > ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG > ? /usr/src/sys/powerpc/conf/GENERICvtsc-DBG > ? /usr/src/sys/powerpc/conf/GENERICvtsc-NODBG > M /usr/src/Makefile.libcompat > M /usr/src/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp > M /usr/src/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp > M /usr/src/crypto/openssl/crypto/armcap.c > M /usr/src/lib/libkvm/kvm_powerpc.c > M /usr/src/lib/libkvm/kvm_private.c > M /usr/src/release/Makefile.vm > M /usr/src/release/scripts/mk-vmimage.sh > M /usr/src/release/tools/vmimage.subr > M /usr/src/secure/lib/libcrypto/Makefile > M /usr/src/stand/defs.mk > M /usr/src/stand/powerpc/boot1.chrp/Makefile > M /usr/src/stand/powerpc/kboot/Makefile > M /usr/src/sys/arm64/arm64/identcpu.c > M /usr/src/sys/conf/kmod.mk > M /usr/src/sys/conf/ldscript.powerpc > M /usr/src/sys/powerpc/aim/mmu_oea64.c > M /usr/src/sys/powerpc/ofw/ofw_machdep.c >=20 > # more /usr/src/sys/arm64/conf/GENERIC-NODBG > # > # GENERIC -- Custom configuration for the arm64/aarch64 > # >=20 > include "GENERIC" >=20 > ident GENERIC-NODBG >=20 > makeoptions DEBUG=3D-g # Build kernel with gdb(1) de= bug symbols >=20 > options ALT_BREAK_TO_DEBUGGER >=20 > options KDB # Enable kernel debugger suppor= t >=20 > # For minimum debugger support (stable branch) use: > #options KDB_TRACE # Print a stack trace for a pan= ic > options DDB # Enable the kernel debugger >=20 > # Extra stuff: > #options VERBOSE_SYSINIT # Enable verbose sysinit messag= es > #options BOOTVERBOSE=3D1 > #options BOOTHOWTO=3DRB_VERBOSE > #options KTR > #options KTR_MASK=3DKTR_TRAP > ##options KTR_CPUMASK=3D0xF > #options KTR_VERBOSE >=20 > # Disable any extra checking for. . . > nooptions DEADLKRES # Enable the deadlock resolver > nooptions INVARIANTS # Enable calls of extra sanity = checking > nooptions INVARIANT_SUPPORT # Extra sanity checks of intern= al structures, required by INVARIANTS > nooptions WITNESS # Enable checks to detect deadl= ocks and cycles > nooptions WITNESS_SKIPSPIN # Don't run witness on spinlock= s for speed > nooptions DIAGNOSTIC > nooptions MALLOC_DEBUG_MAXZONES # Separate malloc(9) zones > nooptions BUF_TRACKING > nooptions FULL_BUF_TRACKING >=20 >=20 > # more ~/sys_build_scripts.amd64-host/make_cortexA53_nodebug_clang_boot= strap-amd64-host.sh -j4 kernel-toolchain buildkernel > kldload -n filemon && \ > script ~/sys_typescripts/typescript_make_cortexA53_nodebug_clang_bootst= rap-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \ > env __MAKE_CONF=3D"/root/src.configs/make.conf" SRCCONF=3D"/dev/null" S= RC_ENV_CONF=3D"/root/src.configs/src.conf.cortexA53-clang-bootstrap.amd64= -host" \ > WITH_META_MODE=3Dyes \ > MAKEOBJDIRPREFIX=3D"/usr/obj/cortexA53_clang/arm64.aarch64" \ > make $* >=20 >=20 > # more ~/src.configs/src.conf.cortexA53-clang-bootstrap.amd64-host > TO_TYPE=3Daarch64 > TOOLS_TO_TYPE=3D${TO_TYPE} > VERSION_CONTEXT=3D12.0 > # > KERNCONF=3DGENERIC-NODBG > TARGET=3Darm64 > .if ${.MAKE.LEVEL} =3D=3D 0 > TARGET_ARCH=3D${TO_TYPE} > .export TARGET_ARCH > .endif > # > WITH_CROSS_COMPILER=3D > WITHOUT_SYSTEM_COMPILER=3D > WITHOUT_SYSTEM_LINKER=3D > # > WITH_LIBCPLUSPLUS=3D > WITH_LLD_BOOTSTRAP=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 > WITH_LLD=3D > WITH_LLD_IS_LD=3D > WITH_LLDB=3D > # > WITH_BOOT=3D > WITHOUT_LIB32=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_REPRODUCIBLE_BUILD=3D > WITH_DEBUG_FILES=3D > # > #CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-unknown-freebsd${V= ERSION_CONTEXT}/bin/ > XCFLAGS+=3D -mcpu=3Dcortex-a53 > XCXXFLAGS+=3D -mcpu=3Dcortex-a53 > # There is no XCPPFLAGS but XCPP gets XCFLAGS content. > ACFLAGS.arm64cpuid.S+=3D -mcpu=3Dcortex-a53+crypto > ACFLAGS.aesv8-armx.S+=3D -mcpu=3Dcortex-a53+crypto > ACFLAGS.ghashv8-armx.S+=3D -mcpu=3Dcortex-a53+crypto >=20 >=20 > # more ~/src.configs/make.conf > CFLAGS.gcc+=3D -v >=20 >=20 >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) >=20 --=20 Regards, Bryan Drewery --B00CnU7wHsjjMXqvoeTfgybVZDaFqJEtr-- --9hQNWkjsIiiFcIPhNDnsTlDwnzJBg9A99 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAltNHNgACgkQNddxu25G l8+O9gf9Hz8QsXdsaRARH4qjLWrxuqAV11YV1w/VXG6+nb7fHwPItKOO7JtA8oAV SnNxU7b2F5iSxnZbWBD8g5tX+kZdL5eqNc8EYqGwxiaGsjFlSsocBivlI37OEZbQ oEiZrohHinMrt+iSUoPelRbXq7HoBJG9egzN3TUE/Yyeh7gKnfGmbp2tXDGrgbIT tWpGeiIPvFruh79tUzapGLktC9O7oYtC0cKuqY0aCJZf8T7/orHtAmnPUaAwBgrE NpRNQ3557r5Poqg823odO5Avx8GARbZ88xGlhy74lvp7YZiYU3Kx83FINaTMJfPR xFmX13AIMOy/RbcvQYoI0PLgMmZHrg== =XBV5 -----END PGP SIGNATURE----- --9hQNWkjsIiiFcIPhNDnsTlDwnzJBg9A99--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?81184558-6b23-085b-19e3-b11569808174>