ltp: fix build with ld-is-gold in DISTRO_FEATURES
PATCH 1/1 ltp: fix build with ld-is-gold in DISTRO_FEATURES
* backport one more commit for LD call which conflicts with the 0001-kvm-use-LD-instead-of-hardcoding-ld.patch we already had and replace this 2nd patch with the rebased version which is now merged upstream
* then backport additional patch which introduces KVM_LD variable which we can set to use .bfd suffix in LD when ld-is-gold is in DISTRO_FEATURES to work around gold incompatibility reported:
https://github.com/linux-test-project/ltp/pull/948#issuecomment-1193138866
https://lists.openembedded.org/g/openembedded-core/message/168193
http://errors.yoctoproject.org/Errors/Details/663094/
x86_64-oe-linux-ld --sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/ltp/20220527-r0/recipe-sysroot -z noexecstack -r -T /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/ltp/20220527-r0/git/testcases/kernel/kvm/linker/payload.lds --oformat=elf64-x86-64 -o kvm_pagefault01-payload.o kvm_pagefault01-payload.bin x86_64-oe-linux-ld: error: kvm_pagefault01-payload.bin:1:1: invalid character make: *** [Makefile:53: kvm_pagefault01-payload.o] Error 1
---
depends on "ltp: Add post release runtime fixes" change currently in master-next:
https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=024ce059a64eb2f96dce2880e5708afd25dd45f2
...-access-mode-in-KVM-test-ELF-headers.patch | 40 ++++++++++++
...kvm-use-LD-instead-of-hardcoding-ld.patch} | 26 ++++----
...ile-variable-for-building-KVM-payloa.patch | 63 +++++++++++++++++++
meta/recipes-extended/ltp/ltp_20220527.bb | 13 +++-
4 files changed, 128 insertions(+), 14 deletions(-)
create mode 100644 meta/recipes-extended/ltp/ltp/0001-kvm-Fix-stack-access-mode-in-KVM-test-ELF-headers.patch
rename meta/recipes-extended/ltp/ltp/{0001-kvm-use-LD-instead-of-hardcoding-ld.patch => 0002-kvm-use-LD-instead-of-hardcoding-ld.patch} (60%)
create mode 100644 meta/recipes-extended/ltp/ltp/0003-Add-KVM_LD-Makefile-variable-for-building-KVM-payloa.patchmeta/recipes-extended/ltp/ltp/0001-kvm-Fix-stack-access-mode-in-KVM-test-ELF-headers.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 608fc7bcda43e60536ae1f19842f7affba8f0aea Mon Sep 17 00:00:00 2001 +From: Martin Doucha <[email protected]> +Date: Wed, 1 Jun 2022 16:16:34 +0200 +Subject: [PATCH] kvm: Fix stack access mode in KVM test ELF headers + +When the linker converts guest payload binary into a linkable resource +object file, it somehow defaults to requesting executable stack section +for the final test binary. This trips some build-time security checks +on newer systems. Add explicit linker option to make the stack +non-executable. + +Suggested-by: Fabian Vogt <[email protected]> +Signed-off-by: Martin Doucha <[email protected]> +Reviewed-by: Petr Vorel <[email protected]> +Reviewed-by: Cyril Hrubis <[email protected]> + +Signed-off-by: Martin Jansa <[email protected]> +Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/f9715d7c2e78713e26533c6e0846aaabf5c4095b] +--- + testcases/kernel/kvm/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/testcases/kernel/kvm/Makefile b/testcases/kernel/kvm/Makefile +index 69a9946fe..adab56952 100644 +--- a/testcases/kernel/kvm/Makefile ++++ b/testcases/kernel/kvm/Makefile +@@ -50,11 +50,11 @@ include $(top_srcdir)/include/mk/generic_leaf_target.mk + ifdef VERBOSE + $(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) + objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin +- ld -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin ++ ld -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin + else + @$(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) + @objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin +- @ld -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin ++ @ld -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin + @echo KVM_CC $(target_rel_dir)$@ + endif + @rm $*-payload.elf $*-payload.bin
meta/recipes-extended/ltp/ltp/0002-kvm-use-LD-instead-of-hardcoding-ld.patch renamed from meta/recipes-extended/ltp/ltp/0001-kvm-use-LD-instead-of-hardcoding-ld.patch +14 -12
@@ -1,7 +1,4 @@ -Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/948] -Signed-off-by: Ross Burton <[email protected]> - -From 7670233e43df2aed6d44b96c51b034f8e2d28a19 Mon Sep 17 00:00:00 2001 +From 1cea308a647c2a2f9790b0bac7c523de7aa83270 Mon Sep 17 00:00:00 2001 From: Ross Burton <[email protected]> Date: Tue, 12 Jul 2022 15:03:54 +0100 Subject: [PATCH] kvm: use $(LD) instead of hardcoding ld
@@ -9,29 +6,34 @@ Subject: [PATCH] kvm: use $(LD) instead of hardcoding ld In cross-compiled builds the host ld may not know the required ELF format, so ensure we use $(LD) which will be the cross-capable ld binary. +Closes: https://github.com/linux-test-project/ltp/pull/948 + +Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb] Signed-off-by: Ross Burton <[email protected]> + +Reviewed-by: Petr Vorel <[email protected]> +Reviewed-by: Martin Doucha <[email protected]> +Signed-off-by: Ross Burton <[email protected]> +Signed-off-by: Martin Jansa <[email protected]> --- testcases/kernel/kvm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/kvm/Makefile b/testcases/kernel/kvm/Makefile -index 69a9946fe..4ddef9f95 100644 +index adab56952..d67230735 100644 --- a/testcases/kernel/kvm/Makefile +++ b/testcases/kernel/kvm/Makefile @@ -50,11 +50,11 @@ include $(top_srcdir)/include/mk/generic_leaf_target.mk ifdef VERBOSE $(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin -- ld -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin -+ $(LD) -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin +- ld -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin ++ $(LD) -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin else @$(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) @objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin -- @ld -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin -+ @$(LD) -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin +- @ld -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin ++ @$(LD) -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin @echo KVM_CC $(target_rel_dir)$@ endif @rm $*-payload.elf $*-payload.bin --- -2.34.1 -
meta/recipes-extended/ltp/ltp/0003-Add-KVM_LD-Makefile-variable-for-building-KVM-payloa.patch new file +63 -0
63 lines not on this page · raw message
meta/recipes-extended/ltp/ltp_20220527.bb +11 -2
@@ -28,7 +28,9 @@ SRCREV = "6f88e0f6f1d6eb12c48c902f50f47ecbd3b0f18a" SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ file://0001-Remove-OOM-tests-from-runtest-mm.patch \ file://disable_hanging_tests.patch \ - file://0001-kvm-use-LD-instead-of-hardcoding-ld.patch \ + file://0001-kvm-Fix-stack-access-mode-in-KVM-test-ELF-headers.patch \ + file://0002-kvm-use-LD-instead-of-hardcoding-ld.patch \ + file://0003-Add-KVM_LD-Makefile-variable-for-building-KVM-payloa.patch \ file://0001-nfs05_make_tree-Restore-5-min-timeout.patch \ file://0001-syscalls-migrate_pages03-restore-runtime-to-5m.patch \ file://0001-mountns0-1-3-wait-for-umount-completed-in-thread_b.patch \
@@ -47,6 +49,13 @@ inherit autotools-brokensep pkgconfig # https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36 LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}" +# After 0002-kvm-use-LD-instead-of-hardcoding-ld.patch +# https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb +# it fails with gold also a bit later when trying to use *-payload.bin +# http://errors.yoctoproject.org/Errors/Details/663094/ +# work around this by forcing .bfd linked in LD when ld-is-gold is in DISTRO_FEATURES +KVM_LD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}" + TARGET_CC_ARCH += "${LDFLAGS}" export prefix = "/opt/${PN}"
@@ -59,7 +68,7 @@ EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite " EXTRA_OECONF += " --without-tirpc " do_compile() { - oe_runmake HOSTCC="${CC_FOR_BUILD}" HOST_CFLAGS="${CFLAGS_FOR_BUILD}" HOST_LDFLAGS="${LDFLAGS_FOR_BUILD}" + oe_runmake HOSTCC="${CC_FOR_BUILD}" HOST_CFLAGS="${CFLAGS_FOR_BUILD}" HOST_LDFLAGS="${LDFLAGS_FOR_BUILD}" KVM_LD="${KVM_LD}" } do_install(){
RFC PATCH 1/1 bitbake.conf: introduce LINKER/BUILD_LINKER variables
* makes it a bit easier to replace ld with ld.bfd or some other implementation in LD/BUILD_LD variables without changing this whole variable and without depending on ld-is-gold to set ld symlink to preferred implementation (or when we want to force different one for specific recipe, e.g. forcing bfd where gold fails, like in ltp)
--- meta/conf/bitbake.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +4 -2
@@ -553,7 +553,8 @@ export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" -export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}" +LINKER = "ld" +export LD = "${HOST_PREFIX}${LINKER}${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}" export CCLD = "${CC}" export AR = "${HOST_PREFIX}gcc-ar" export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}"
@@ -570,7 +571,8 @@ export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}" export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}" export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}" export BUILD_CPP = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E" -export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}" +BUILD_LINKER = "ld" +export BUILD_LD = "${BUILD_PREFIX}${BUILD_LINKER} ${BUILD_LD_ARCH}" export BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}" export BUILD_AR = "${BUILD_PREFIX}ar" export BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}"
Re: [OE-core] [RFC][PATCH] bitbake.conf: introduce LINKER/BUILD_LINKER variables
Quoted 6 lines · Martin Jansa
* makes it a bit easier to replace ld with ld.bfd or some other implementation
in LD/BUILD_LD variables without changing this whole variable and without depending on ld-is-gold to set ld symlink to preferred implementation (or when we want to force different one for specific recipe, e.g. forcing bfd where gold fails, like in ltp)
This is fixing bare ld calls but there are perhaps handful of recipes where bare ld is used in most of the cases we rely on compiler driver to do the linking and this confuses that use case.
Quoted 46 lines
Signed-off-by Martin Jansa <[email protected]>--- meta/conf/bitbake.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)meta/conf/bitbake.conf +0
-0@@ -553,7 +553,8 @@ export CC = "${CCACHE}${HOST_PREFIX}gcc${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
export CXX = "${CCACHE}${HOST_PREFIX}g++
${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
export FC = "${CCACHE}${HOST_PREFIX}gfortran
${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"meta/conf/bitbake.conf +2
-1-export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}" +LINKER = "ld" +export LD = "${HOST_PREFIX}${LINKER}${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}" export CCLD = "${CC}" export AR = "${HOST_PREFIX}gcc-ar" export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}"@@ -570,7 +571,8 @@ export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc${BUILD_CC_ARCH}"
exportBUILD_CXX= "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}" exportBUILD_FC= "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}" exportBUILD_CPP= "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E"meta/conf/bitbake.conf +2
-2-export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}" +BUILD_LINKER = "ld" +export BUILD_LD = "${BUILD_PREFIX}${BUILD_LINKER} ${BUILD_LD_ARCH}" export BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}" export BUILD_AR = "${BUILD_PREFIX}ar" export BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group. View/Reply Online (#168601):
https://lists.openembedded.org/g/openembedded-core/message/168601
Mute This Topic: https://lists.openembedded.org/mt/92668261/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
RFC PATCH 1/1 bitbake.conf: change TOOLCHAIN_OPTIONS not to start with space
In reply to Martin Jansa* it was introduced this way in 2007:
https://git.openembedded.org/openembedded-core/commit/?id=0138501213f140198abdead3ffa6b3ba80462c98
but now there are quite a few places which use it after a space (which doesn't hurt):
meta/classes/cmake.bbclass:OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}"
meta/classes/cmake.bbclass:OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS}"
meta/classes/cmake.bbclass:OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
meta/classes/cmake.bbclass:OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}"
meta/classes/kernel-yocto.bbclass: CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1 meta/recipes-bsp/u-boot/u-boot.inc:EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
meta/recipes-devtools/diffstat/diffstat_1.64.bb:LDFLAGS += "${TOOLCHAIN_OPTIONS}"
meta/recipes-devtools/go/go-runtime.inc:GO_EXTLDFLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
meta/recipes-extended/wget/wget.inc:EXTRA_OEMAKE += 'TOOLCHAIN_OPTIONS="${TOOLCHAIN_OPTIONS}" \
meta/recipes-kernel/linux/linux-yocto.inc:KERNEL_CC:append:aarch64 = " ${TOOLCHAIN_OPTIONS}"
meta/recipes-kernel/linux/linux-yocto.inc:KERNEL_LD:append:aarch64 = " ${TOOLCHAIN_OPTIONS}"
meta/recipes-kernel/linux/linux-yocto.inc:KERNEL_CC:append:nios2 = " ${TOOLCHAIN_OPTIONS}"
meta/recipes-kernel/linux/linux-yocto.inc:KERNEL_LD:append:nios2 = " ${TOOLCHAIN_OPTIONS}"
meta/recipes-kernel/linux/linux-yocto.inc:KERNEL_CC:append:arc = " ${TOOLCHAIN_OPTIONS}"
meta/recipes-kernel/linux/linux-yocto.inc:KERNEL_LD:append:arc = " ${TOOLCHAIN_OPTIONS}"
not using space now seems a bit strange to me (noticed when trying to prepend something to TOOLCHAIN_OPTIONS)
* it made more sense when default TOOLCHAIN_OPTIONS were empty, but since 2010 it's almost always used to set --sysroot:
https://git.openembedded.org/openembedded-core/commit/?id=6124cccddfc202124fa76bb677ad3e06f0fefc70
--- meta/classes/cross-canadian.bbclass | 2 +- meta/classes/go.bbclass | 2 +- meta/conf/bitbake.conf | 12 ++++++------ meta/recipes-devtools/go/go-runtime.inc | 2 +- meta/recipes-extended/ltp/ltp_20220527.bb | 2 +- meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-)
meta/classes/cross-canadian.bbclass +1 -1
@@ -104,7 +104,7 @@ INHIBIT_DEFAULT_DEPS = "1" STAGING_DIR_HOST = "${RECIPE_SYSROOT}" -TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}" +TOOLCHAIN_OPTIONS = "--sysroot=${RECIPE_SYSROOT}" PATH:append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}" PKGHIST_DIR = "${TMPDIR}/pkghistory/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/"
meta/classes/go.bbclass +1 -1
@@ -40,7 +40,7 @@ GO_RPATH_LINK = "${@'-Wl,-rpath-link=${STAGING_DIR_TARGET}${libdir}/go/pkg/${TAR GO_RPATH = "${@'-r ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" GO_RPATH:class-native = "${@'-r ${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" GO_RPATH_LINK:class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" -GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" +GO_EXTLDFLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" GO_LINKMODE ?= "" GO_LINKMODE:class-nativesdk = "--linkmode=external" GO_LINKMODE:class-native = "--linkmode=external"
meta/conf/bitbake.conf +6 -6
@@ -547,14 +547,14 @@ HOSTTOOLS_NONFATAL += "git-lfs" CCACHE ??= "" -TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" +TOOLCHAIN_OPTIONS = "--sysroot=${STAGING_DIR_TARGET}" -export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" +export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" +export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" +export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" +export CPP = "${HOST_PREFIX}gcc -E ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" LINKER = "ld" -export LD = "${HOST_PREFIX}${LINKER}${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}" +export LD = "${HOST_PREFIX}${LINKER} ${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}" export CCLD = "${CC}" export AR = "${HOST_PREFIX}gcc-ar" export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}"
meta/recipes-devtools/go/go-runtime.inc +1 -1
@@ -14,7 +14,7 @@ export CGO_CXXFLAGS = "${CXXFLAGS}" export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not f.startswith('-fdebug-prefix-map'), d.getVar('LDFLAGS').split())) }" export GOCACHE = "${B}/.cache" -GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}" +GO_EXTLDFLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${LDFLAGS}" GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"' do_configure() {
meta/recipes-extended/ltp/ltp_20220527.bb +1 -1
@@ -54,7 +54,7 @@ LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse- # it fails with gold also a bit later when trying to use *-payload.bin # http://errors.yoctoproject.org/Errors/Details/663094/ # work around this by forcing .bfd linked in LD when ld-is-gold is in DISTRO_FEATURES -KVM_LD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}" +KVM_LD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '${HOST_PREFIX}ld.bfd ${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}" TARGET_CC_ARCH += "${LDFLAGS}"
meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb +1 -1
@@ -108,7 +108,7 @@ EXTRA_OECONF = " \ --arch=${TARGET_ARCH} \ --target-os='linux' \ --enable-cross-compile \ - --extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \ + --extra-cflags='${CFLAGS} ${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}' \ --extra-ldflags='${LDFLAGS}' \ --sysroot='${STAGING_DIR_TARGET}' \ ${EXTRA_FFCONF} \