diff mbox series

[meta-networking,3/7] samba: Fix warnings in configure tests for rpath checks

Message ID 20220829065649.808556-3-raj.khem@gmail.com
State New
Headers show
Series [meta-python,1/7] python3-netifaces: Fix build with python3 and musl | expand

Commit Message

Khem Raj Aug. 29, 2022, 6:56 a.m. UTC
Add a patch to avoid implicit-function-declaration warnings, they will
soon become errors with clang 15+

set path for privatelibdir

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ith-Werror-implicit-function-declara.patch | 32 +++++++++++++++++++
 .../samba/samba_4.14.14.bb                    |  3 ++
 2 files changed, 35 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/samba/samba/0001-waf-Fix-errors-with-Werror-implicit-function-declara.patch
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-waf-Fix-errors-with-Werror-implicit-function-declara.patch b/meta-networking/recipes-connectivity/samba/samba/0001-waf-Fix-errors-with-Werror-implicit-function-declara.patch
new file mode 100644
index 0000000000..4a89f76782
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0001-waf-Fix-errors-with-Werror-implicit-function-declara.patch
@@ -0,0 +1,32 @@ 
+From 28ec4c9323e67cd114a0465015c9f3c2e64e6829 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Aug 2022 13:05:26 -0700
+Subject: [PATCH] waf: Fix errors with Werror=implicit-function-declaration
+ turned on
+
+Clang-15 turns this option into errors by default, and it results in
+rpath check failures
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ buildtools/wafsamba/samba_waf18.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildtools/wafsamba/samba_waf18.py b/buildtools/wafsamba/samba_waf18.py
+index 7a0a08e..c0d2c3e 100644
+--- a/buildtools/wafsamba/samba_waf18.py
++++ b/buildtools/wafsamba/samba_waf18.py
+@@ -209,7 +209,7 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None):
+         lib_node.parent.mkdir()
+         lib_node.write('int lib_func(void) { return 42; }\n', 'w')
+         main_node = bld.srcnode.make_node('main.c')
+-        main_node.write('int main(void) {return !(lib_func() == 42);}', 'w')
++        main_node.write('int lib_func(void); int main(void) {return !(lib_func() == 42);}', 'w')
+         linkflags = []
+         if version_script:
+             script = bld.srcnode.make_node('ldscript')
+-- 
+2.37.2
+
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb b/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
index 53526a26b6..f88dee6175 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
@@ -22,6 +22,7 @@  SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
            file://0005-samba-build-dnsserver_common-code.patch \
            file://0001-Fix-pyext_PATTERN-for-cross-compilation.patch \
            file://0001-smbtorture-skip-test-case-tfork_cmd_send.patch \
+           file://0001-waf-Fix-errors-with-Werror-implicit-function-declara.patch \
            "
 
 SRC_URI:append:libc-musl = " \
@@ -113,9 +114,11 @@  EXTRA_OECONF += "--enable-fhs \
                  --with-piddir=/run \
                  --with-sockets-dir=/run/samba \
                  --with-modulesdir=${libdir}/samba \
+                 --with-privatelibdir=${libdir}/samba \
                  --with-lockdir=${localstatedir}/lib/samba \
                  --with-cachedir=${localstatedir}/lib/samba \
                  --disable-rpath-install \
+                 --disable-rpath \
                  --with-shared-modules=${SAMBA4_MODULES} \
                  --bundled-libraries=${SAMBA4_LIBS} \
                  ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \