]> Git Repo - qemu.git/commitdiff
build: fix macOS --enable-modules build
authorPaolo Bonzini <[email protected]>
Tue, 20 Oct 2020 09:18:17 +0000 (05:18 -0400)
committerPaolo Bonzini <[email protected]>
Thu, 22 Oct 2020 15:53:52 +0000 (11:53 -0400)
Apple's nm implementation includes empty lines in the output that are not
found in GNU binutils.  This confuses scripts/undefsym.py, though it did
not confuse the scripts/undefsym.sh script that it replaced.  To fix
this, ignore lines that do not have two fields.

Reported-by: Emmanuel Blot <[email protected]>
Tested-by: Emmanuel Blot <[email protected]>
Fixes: 604f3e4e90 ("meson: Convert undefsym.sh to undefsym.py", 2020-09-08)
Signed-off-by: Paolo Bonzini <[email protected]>
.cirrus.yml
scripts/undefsym.py

index 81a2960b1aed7e26d3ac66020b94352062955b78..900437dd2ac6d1bb7f0d41d11e08ce68903c277a 100644 (file)
@@ -40,7 +40,7 @@ macos_xcode_task:
   script:
     - mkdir build
     - cd build
-    - ../configure --extra-cflags='-Wno-error=deprecated-declarations'
+    - ../configure --extra-cflags='-Wno-error=deprecated-declarations' --enable-modules
                    --enable-werror --cc=clang || { cat config.log meson-logs/meson-log.txt; exit 1; }
     - gmake -j$(sysctl -n hw.ncpu)
     - gmake check V=1
index 69a895cd26c19d37dd58c3e4ac18a96069dc46d2..4b6a72d95f47dfe8eadef13700863857b42aa87b 100644 (file)
@@ -15,12 +15,11 @@ def filter_lines_set(stdout, from_staticlib):
     linesSet = set()
     for line in stdout.splitlines():
         tokens = line.split(b' ')
-        if len(tokens) >= 1:
-            if len(tokens) > 1:
-                if from_staticlib and tokens[1] == b'U':
-                    continue
-                if not from_staticlib and tokens[1] != b'U':
-                    continue
+        if len(tokens) >= 2:
+            if from_staticlib and tokens[1] == b'U':
+                continue
+            if not from_staticlib and tokens[1] != b'U':
+                continue
             new_line = b'-Wl,-u,' + tokens[0]
             if not new_line in linesSet:
                 linesSet.add(new_line)
This page took 0.028899 seconds and 4 git commands to generate.