]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
wafsamba: let 'use_hostcc=True' result in -D_SAMBA_HOSTCC_
authorStefan Metzmacher <metze@samba.org>
Fri, 3 Apr 2020 09:49:44 +0000 (11:49 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 20 Apr 2021 11:42:37 +0000 (11:42 +0000)
That's easier for the callers.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
buildtools/wafsamba/samba_autoconf.py
buildtools/wafsamba/wafsamba.py

index 276b88780b84af17f27a10ce901e9812ee3f52d7..4d2aea6c94138603b7a71efe7ec9faa9b0e15c02 100644 (file)
@@ -905,9 +905,15 @@ def ADD_EXTRA_INCLUDES(conf, includes):
 
 
 
-def CURRENT_CFLAGS(bld, target, cflags, allow_warnings=False, hide_symbols=False):
+def CURRENT_CFLAGS(bld, target, cflags,
+                   allow_warnings=False,
+                   use_hostcc=False,
+                   hide_symbols=False):
     '''work out the current flags. local flags are added first'''
-    ret = TO_LIST(cflags)
+    ret = []
+    if use_hostcc:
+        ret += ['-D_SAMBA_HOSTCC_']
+    ret += TO_LIST(cflags)
     if not 'EXTRA_CFLAGS' in bld.env:
         list = []
     else:
index d1baa3b4940f3bd4ba5f64dd881ec0d0e60dea81..9c8aa36d61cca0b30084ab51b8f9b4d736faa5b3 100644 (file)
@@ -635,6 +635,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
         target         = modname,
         samba_cflags   = CURRENT_CFLAGS(bld, modname, cflags,
                                         allow_warnings=allow_warnings,
+                                        use_hostcc=use_hostcc,
                                         hide_symbols=hide_symbols),
         depends_on     = depends_on,
         samba_deps     = TO_LIST(deps),