]> git.proxmox.com Git - ceph.git/blame - ceph/src/nasm-wrapper
compile with GCC 12 not 11
[ceph.git] / ceph / src / nasm-wrapper
CommitLineData
f67539c2
TL
1#!/usr/bin/env bash
2
3set -e
4
5refine_nasm_options=""
6while [ -n "$*" ]; do
7 case "$1" in
8 -f )
9 shift
20effc67 10 refine_nasm_options+=" -f $1"
f67539c2
TL
11 shift
12 ;;
13 -c | --param* | -m* | -pipe | -thread )
14 # unknown options under nasm & yasm
15 shift
16 ;;
17 -g* )
18 # ignore debug format
19 shift
20 ;;
20effc67
TL
21 -MD )
22 # before CMake v3.18, its ninja build rule always passes `-MD $DEP_FILE``
23 # to ASM_COMPILER. both nasm and GNU assembler accepts this option, but
24 # somehow the ninja generator fails to pass the <DEPFILE> argument. so
25 # just drop it.
26 shift
27 ;;
f67539c2
TL
28 -W* )
29 # Warning/error option
30 shift
31 ;;
32 -f* )
33 shift
34 ;;
35 -I | -isystem )
36 shift
20effc67 37 refine_nasm_options+=" -i $1"
f67539c2
TL
38 shift
39 ;;
1e59de90
TL
40 -O* )
41 # ignore C optimisations
42 shift
43 ;;
f67539c2
TL
44 * )
45 # Keep other options
20effc67 46 refine_nasm_options+=" $1"
f67539c2
TL
47 shift
48 ;;
49 esac
50done
51
52nasm $refine_nasm_options
53
54true