safec: Pass Qunused-arguments when using clang
PATCH 1/3 safec: Pass Qunused-arguments when using clang
Fixes build issue since clang does not respect some options
Signed-off-by Khem Raj <[email protected]>
--- meta-oe/recipes-core/safec/safec_3.7.1.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-oe/recipes-core/safec/safec_3.7.1.bb +3 -0
@@ -10,6 +10,9 @@ SRCREV = "f9add9245b97c7bda6e28cceb0ee37fb7e254fd8" SRC_URI = "git://github.com/rurban/safeclib.git;branch=master;protocol=https \ file://0001-strpbrk_s-Remove-unused-variable-len.patch \ " +# arm-yoe-linux-gnueabi-clang: error: argument unused during compilation: '-mretpoline' [-Werror,-Wunused-command-line-argument] +# arm-yoe-linux-gnueabi-clang: error: argument unused during compilation: '-fstack-clash-protection' [-Werror,-Wunused-command-line-argument] +TUNE_CCARGS:append:toolchain-clang = " -Qunused-arguments" COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm|aarch64|mips).*-linux'
PATCH 2/3 net-snmp: Do not pass LDFLAGS to compiler
This fixed issues like incompatible hash sections it was added in 2009 [1], however these errors are not seen in todays OE builds
On the contrary it regresses build with clang since it rejects the options which results in some configure test failures, resulting finally in build/compile failures
arm-yoe-linux-gnueabi-clang: warning: -Wl,-O1: 'linker' input unused [-Wunused-command-line-argument]
[1] https://git.openembedded.org/openembedded/commit/?id=07f750c6382476b799201b5ca47f93a5f7aa7e84
Signed-off-by Khem Raj <[email protected]>
Cc Jan Luebbe <[email protected]>
--- meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb | 2 -- 1 file changed, 2 deletions(-)
meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb +0 -2
@@ -46,8 +46,6 @@ PARALLEL_MAKE = "" CCACHE = "" CLEANBROKEN = "1" -TARGET_CC_ARCH += "${LDFLAGS}" - PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} des smux" PACKAGECONFIG[des] = "--enable-des, --disable-des" PACKAGECONFIG[elfutils] = "--with-elf, --without-elf, elfutils"
PATCH 3/3 ruli: Fix build with clang
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- meta-networking/recipes-support/ruli/ruli_0.36.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta-networking/recipes-support/ruli/ruli_0.36.bb +4 -0
@@ -18,6 +18,10 @@ SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz SRC_URI[md5sum] = "e73fbfdeadddb68a703a70cea5271468" SRC_URI[sha256sum] = "11d32def5b514748fbd9ea8c88049ae99e1bb358efc74eb91a4d268a3999dbfa" +# -shared is passed via CFLAGS, clang complains since its used during linking +# and not compiling +CFLAGS:append:toolchain-clang = " -Wno-error=unused-command-line-argument" + EXTRA_OEMAKE = 'CC="${CC}" CPPFLAGS="${CFLAGS}" OOP_BASE_DIR="${STAGING_EXECPREFIXDIR}" \ INSTALL_BASE_DIR="${D}${exec_prefix}" \ OOP_LIB_DIR=${STAGING_EXECPREFIXDIR}/${baselib} \