]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
glibcextract.py: Place un-assemblable @@@ in a comment
authorFangrui Song <maskray@google.com>
Tue, 19 Oct 2021 16:58:16 +0000 (09:58 -0700)
committerFangrui Song <maskray@google.com>
Tue, 19 Oct 2021 16:58:16 +0000 (09:58 -0700)
Unlike GCC, Clang parses asm statements and verifies they are valid
instructions/directives. Place the magic @@@ into a comment to avoid
a parse error.

scripts/glibcextract.py

index 752ff6223b08cbde4b6cce5c34d7d6ffb26e1315..bf49a5e3229608c3acf744e78015c0d18e4b0852 100644 (file)
@@ -45,7 +45,7 @@ def compute_c_consts(sym_data, cc):
             continue
         name = arg[0]
         value = arg[1]
-        out_lines.append('asm ("@@@name@@@%s@@@value@@@%%0@@@end@@@" '
+        out_lines.append('asm ("/* @@@name@@@%s@@@value@@@%%0@@@end@@@ */" '
                          ': : \"i\" ((long int) (%s)));'
                          % (name, value))
     out_lines.append('}')