aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2020-09-12 00:50:29 +0100
committerTomasz Kramkowski <tk@the-tk.com>2020-09-12 00:50:29 +0100
commit13ab608a4bb4b6093c6095a2a0b975a3572855c2 (patch)
tree279ae9151b068a495baad1f0d93f96a63f71ff43
parent8d1175ab41dd64de007628def55e8c4b19c7538c (diff)
downloadpack-13ab608a4bb4b6093c6095a2a0b975a3572855c2.tar.gz
pack-13ab608a4bb4b6093c6095a2a0b975a3572855c2.tar.xz
pack-13ab608a4bb4b6093c6095a2a0b975a3572855c2.zip
build: Fix flag passing to the linker and compiler.
-rw-r--r--default.o.do2
-rw-r--r--link2
2 files changed, 2 insertions, 2 deletions
diff --git a/default.o.do b/default.o.do
index 9135cb8..5c3e0e9 100644
--- a/default.o.do
+++ b/default.o.do
@@ -1,5 +1,5 @@
#!/bin/bash
redo-ifchange "$0" "default.o.do" "$2.c"
. loadargs "compile"
-gcc -std=c11 -MD -MF "$2.d" -c -o "$3" "${args[@]}" "$2.c"
+gcc -std=c11 -MD -MF "$2.d" -c "${args[@]}" -o "$3" "$2.c"
redo-ifchange "$2.d" $(sed ':a;/\\$/{s/[^:]*: //;N;s/ \\\n//;ba}' <"$2.d")
diff --git a/link b/link
index 2b99b87..08006ad 100644
--- a/link
+++ b/link
@@ -1,4 +1,4 @@
#/fake/bash
redo-ifchange "$0" "link" "${deps[@]}"
. loadargs "link"
-gcc -o "$3" "${deps[@]}"
+gcc "${args[@]}" -o "$3" "${deps[@]}"