]> git.proxmox.com Git - ceph.git/blob - ceph/src/isa-l/tools/nasm-cet-filter.sh
import quincy beta 17.1.0
[ceph.git] / ceph / src / isa-l / tools / nasm-cet-filter.sh
1 #/bin/sh
2
3 # Filter out unnecessary options added by automake
4
5 while [ -n "$*" ]; do
6 case "$1" in
7 -o )
8 # Supported options with arg
9 options="$options $1 $2"
10 shift
11 object="$1"
12 shift
13 ;;
14 -f | -D )
15 # Supported options with arg
16 options="$options $1 $2"
17 shift
18 shift
19 ;;
20 -I | -i )
21 options="$options $1 $2/"
22 shift
23 shift
24 ;;
25 --prefix* )
26 # Supported options without arg
27 options="$options $1"
28 shift
29 ;;
30 -I* | -i* )
31 options="$options $1/"
32 shift
33 ;;
34 -D* ) # For defines we need to remove spaces
35 case "$1" in
36 *' '* ) ;;
37 *) options="$options $1" ;;
38 esac
39 shift
40 ;;
41 #-blah )
42 # Unsupported options with args - none known
43 -* )
44 # Unsupported options with no args
45 shift
46 ;;
47 * )
48 args="$args $1"
49 shift
50 ;;
51 esac
52 done
53
54 nasm $options $args
55 $CET_LD -r -z ibt -z shstk -o $object.tmp $object
56 mv $object.tmp $object