Fix dash compatible syntax issue

This commit is contained in:
Justine Tunney 2023-11-17 16:47:47 -08:00
parent 2c9d2943d6
commit 72ac5f18d9
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
9 changed files with 13 additions and 4 deletions

View file

@ -180,12 +180,12 @@ for x; do
elif [ x"$x" = x"-march=native" ]; then
fatal_error "-march=native can't be used when building fat binaries"
elif [ x"$x" != x"${x#-Xx86_64}" ]; then
x=${x#-Xx86_64} # e.g. -Xx86_64,-msse3,-mavx,-mavx2,-mf16c,-mfma
FLAGS_X86_64="$FLAGS_X86_64 ${x//,/ }"
x=${x#-Xx86_64} # e.g. cosmocc "-Xx86_64 -msse3 -mavx -mavx2 -mf16c -mfma"
FLAGS_X86_64="$FLAGS_X86_64 ${x#-Xx86_64}"
continue
elif [ x"$x" != x"${x#-Xaarch64}" ]; then
x=${x#-Xaarch64}
FLAGS_aarch64="$FLAGS_aarch64 ${x//,/ }"
FLAGS_aarch64="$FLAGS_aarch64 $x"
continue
elif [ x"$x" = x"-dumpversion" ]; then
echo $GCC_VERSION