Skip to content

Commit 0b1e194

Browse files
committed
toolchain/musl: fix build regression on x86_64
Fix whitespace mangling which broke matching opcodes in the CFI patch Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent be7ab68 commit 0b1e194

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

toolchain/musl/patches/100-tools-Rework-adding-of-CFI-annotations.patch

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
11731173
if (in_function)
11741174
--- a/tools/add-cfi.x86_64.awk
11751175
+++ b/tools/add-cfi.x86_64.awk
1176-
@@ -1,169 +1,246 @@
1176+
@@ -1,169 +1,247 @@
11771177
-# Insert GAS CFI directives ("control frame information") into x86-64 asm input
11781178
+# Insert GAS CFI directives ("control frame information") into x86-64 asm input.
11791179

@@ -1291,7 +1291,9 @@ Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
12911291
+ # Canonicalize whitespace.
12921292
+ gsub(/[ \t]+/, " ") # Mawk doesn't understand \s.
12931293
gsub(/ *, */, ",")
1294-
gsub(/ *: */, ": ")
1294+
- gsub(/ *: */, ": ")
1295+
+ if (match(":", $1))
1296+
+ sub(/ *: */, ": ")
12951297
gsub(/ $/, "")
12961298
gsub(/^ /, "")
12971299
}
@@ -1507,7 +1509,7 @@ Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
15071509
}
15081510
}
15091511
}
1510-
@@ -171,24 +248,41 @@ function adjust_sp_offset(delta) {
1512+
@@ -171,24 +249,41 @@ function adjust_sp_offset(delta) {
15111513
# IF REGISTER VALUES ARE UNCEREMONIOUSLY TRASHED
15121514
# ...then we want to know about it.
15131515
#

0 commit comments

Comments
 (0)