build: duplicate symbols between system libraries aren't interesting
authorAndrew Tridgell <tridge@samba.org>
Tue, 22 Feb 2011 23:20:15 +0000 (10:20 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 23 Feb 2011 00:29:38 +0000 (01:29 +0100)
we expect dups in libpthread, libc and libattr

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Feb 23 01:29:38 CET 2011 on sn-devel-104

buildtools/wafsamba/symbols.py

index 4f4b303..0408d61 100644 (file)
@@ -449,11 +449,21 @@ def symbols_dupcheck(task):
     bld = task.env.bld
     tgt_list = get_tgt_list(bld)
 
+    targets = LOCAL_CACHE(bld, 'TARGET_TYPE')
+
     Logs.info("Checking for duplicate symbols")
     for sym in bld.env.symbol_map:
         subsystems = bld.env.symbol_map[sym]
         if len(subsystems) == 1:
             continue
+        # if all of them are in system libraries, we can ignore them. This copes
+        # with the duplication between libc, libpthread and libattr
+        all_syslib = True
+        for s in subsystems:
+            if s != 'c' and (not s in targets or targets[s] != 'SYSLIB'):
+                all_syslib = False
+        if all_syslib:
+            continue
         Logs.info("symbol %s appears in %s" % (sym, subsystems))