Blob Blame History Raw
From f4c0a750d4adebcf2342a44e85f04526c34268c8 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Tue, 6 Dec 2016 18:07:36 +0100
Subject: [PATCH 2/4] WAF: Fix detection of linker features
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Following check of linker feature failed with strict CFLAGS
"-Werrorr=implicit-function-declaration -Werror=implicit-int"

  Checking for rpath library support       : not found
  Checking for -Wl,--version-script support  : not found

../main.c: In function ‘main’:
../main.c:1:26: error: implicit declaration of function ‘lib_func’
    [-Werror=implicit-function-declaration]
 int main(void) {return !(lib_func() == 42);}
                          ^~~~~~~~

Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
---
 buildtools/wafsamba/samba_conftests.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index 045f858e9cdaae7ee5754a2c7fbef6642a7fee59..c9f8fdc0131838b44dc92196fa95c6b2f7aea506 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -286,7 +286,9 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None):
     os.makedirs(subdir)
 
     Utils.writef(os.path.join(subdir, 'lib1.c'), 'int lib_func(void) { return 42; }\n')
-    Utils.writef(os.path.join(dir, 'main.c'), 'int main(void) {return !(lib_func() == 42);}\n')
+    Utils.writef(os.path.join(dir, 'main.c'),
+                 'int lib_func(void);\n'
+                 'int main(void) {return !(lib_func() == 42);}\n')
 
     bld = Build.BuildContext()
     bld.log = conf.log
-- 
2.11.1