From fc34baaf6f4cbd9619b5cf941972d11b52d408e2 Mon Sep 17 00:00:00 2001 From: Izaak Beekman Date: Mon, 16 Dec 2024 09:05:45 -0500 Subject: [PATCH] Sanitize more options passed to fparse-llvm --- src/fparse-llvm.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/fparse-llvm.in b/src/fparse-llvm.in index 12eac17..ac398ca 100755 --- a/src/fparse-llvm.in +++ b/src/fparse-llvm.in @@ -104,6 +104,7 @@ for arg in "$@"; do FORTRAN_CONFIG_FILE="${arg#--config_file=}" shift || true #echo "args remaining: $*" + # Begin sanitizing options/flags that cause the frontend plugin to throw an error elif [[ $arg == -- ]]; then shift #forward_remaining_args=true @@ -114,6 +115,18 @@ for arg in "$@"; do elif [[ $arg == -g ]]; then shift || true #echo "args remaining: $*" + elif [[ $arg == -c ]]; then + shift || true + #echo "args remaining: $*" + elif [[ $arg == -s ]]; then + shift || true + #echo "args remaining: $*" + elif [[ $arg == -shared || $arg == -static ]]; then + shift || true + #echo "args remaining: $*" + elif [[ $arg == -Wl,* ]]; then + shift || true + #echo "args remaining: $*" elif [[ -n ${arg:-} ]]; then args+=("${arg}") shift || true