#!/bin/bash declare -a args for i in "$@" do if [[ "$i" != -march* ]]; then args+=("$i") fi done ARCH=nehalem if [[ $(uname -m) == "aarch64" ]]; ARCH=armv8-a fi /usr/bin/gcc_real -march=$ARCH "${args[@]}"