Date: Mon, 16 Jul 2018 13:21:10 -0700 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Cc: Bryan Drewery <bdrewery@FreeBSD.org> Subject: 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: <B3539689-7913-4790-A1DD-6911DAFAF9D0@yahoo.com>
next in thread | raw e-mail | index | archive | help
I attempted a from-scratch (. . ./arm64.aarch64/ empty) kernel-toolchain = buildkernel targeting aarch64 from amd64 based on head -r336349 . It failed by = ending up using an ld that can only target elf_x86_64_fbsd elf_i386_fbsd : . . . --- buildkernel --- Building = /usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/sys/GENERIC-N= ODBG/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 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/arm64.a= arch64/sys/GENERIC-NODBG/modules/usr/src/sys/modules/accf_data/accf_data.k= ld.meta' .MAKE.LEVEL=3D'4' MAKEFILE=3D'' .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes = verbose' _ERROR_CMD=3D'ld -m aarch64elf -d -warn-common -r -d -o accf_data.kld = accf_data.o; ctfmerge -L VERSION -g -o accf_data.kld accf_data.o; :> = export_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/sy= s/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/arm64.a= arch64/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/tmp/l= egacy/usr/sbin:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch6= 4/tmp/legacy/usr/bin:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.= aarch64/tmp/legacy/bin:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm6= 4.aarch64/tmp/usr/sbin:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm6= 4.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.env.mk /usr/src/share/mk/src.sys.env.mk = /root/src.configs/src.conf.cortexA53-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.mk = /usr/src/share/mk/src.sys.mk /dev/null = /usr/src/sys/modules/accf_data/Makefile /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.mk = /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk = /usr/src/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-N= ODBG' 1 error Detailed context: # uname -apKU FreeBSD FBSDUSSD 12.0-CURRENT FreeBSD 12.0-CURRENT r336349M amd64 = amd64 1200073 1200073 The "M" is mostly for powerpc* family experiments: # 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 # more /usr/src/sys/arm64/conf/GENERIC-NODBG # # GENERIC -- Custom configuration for the arm64/aarch64 # include "GENERIC" ident GENERIC-NODBG makeoptions DEBUG=3D-g # Build kernel with gdb(1) = debug symbols options ALT_BREAK_TO_DEBUGGER options KDB # Enable kernel debugger support # For minimum debugger support (stable branch) use: #options KDB_TRACE # Print a stack trace for a = panic options DDB # Enable the kernel debugger # Extra stuff: #options VERBOSE_SYSINIT # Enable verbose sysinit = messages #options BOOTVERBOSE=3D1 #options BOOTHOWTO=3DRB_VERBOSE #options KTR #options KTR_MASK=3DKTR_TRAP ##options KTR_CPUMASK=3D0xF #options KTR_VERBOSE # 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 = internal structures, required by INVARIANTS nooptions WITNESS # Enable checks to detect = deadlocks and cycles nooptions WITNESS_SKIPSPIN # Don't run witness on spinlocks = for speed nooptions DIAGNOSTIC nooptions MALLOC_DEBUG_MAXZONES # Separate malloc(9) zones nooptions BUF_TRACKING nooptions FULL_BUF_TRACKING # more = ~/sys_build_scripts.amd64-host/make_cortexA53_nodebug_clang_bootstrap-amd6= 4-host.sh -j4 kernel-toolchain buildkernel kldload -n filemon && \ script = ~/sys_typescripts/typescript_make_cortexA53_nodebug_clang_bootstrap-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.cortexA53-clang-bootstrap.amd64= -host" \ WITH_META_MODE=3Dyes \ MAKEOBJDIRPREFIX=3D"/usr/obj/cortexA53_clang/arm64.aarch64" \ make $* # 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${VERS= ION_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 # more ~/src.configs/make.conf CFLAGS.gcc+=3D -v =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?B3539689-7913-4790-A1DD-6911DAFAF9D0>