diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/nasm-wrapper | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/nasm-wrapper')
-rwxr-xr-x | src/nasm-wrapper | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/nasm-wrapper b/src/nasm-wrapper new file mode 100755 index 000000000..84da2cb23 --- /dev/null +++ b/src/nasm-wrapper @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +set -e + +refine_nasm_options="" +while [ -n "$*" ]; do + case "$1" in + -f ) + shift + refine_nasm_options+=" -f $1" + shift + ;; + -c | --param* | -m* | -pipe | -thread ) + # unknown options under nasm & yasm + shift + ;; + -g* ) + # ignore debug format + shift + ;; + -MD ) + # before CMake v3.18, its ninja build rule always passes `-MD $DEP_FILE`` + # to ASM_COMPILER. both nasm and GNU assembler accepts this option, but + # somehow the ninja generator fails to pass the <DEPFILE> argument. so + # just drop it. + shift + ;; + -W* ) + # Warning/error option + shift + ;; + -f* ) + shift + ;; + -I | -isystem ) + shift + refine_nasm_options+=" -i $1" + shift + ;; + -O* ) + # ignore C optimisations + shift + ;; + * ) + # Keep other options + refine_nasm_options+=" $1" + shift + ;; + esac +done + +nasm $refine_nasm_options + +true |