]> git.proxmox.com Git - ceph.git/blob - ceph/src/isa-l/tools/yasm-cet-filter.sh
import quincy beta 17.1.0
[ceph.git] / ceph / src / isa-l / tools / yasm-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 | -I | -i | -D )
15 # Supported options with arg
16 options="$options $1 $2"
17 shift
18 shift
19 ;;
20 -I* | -i* | --prefix* )
21 # Supported options without arg
22 options="$options $1"
23 shift
24 ;;
25 -D* ) # For defines we need to remove spaces
26 case "$1" in
27 *' '* ) ;;
28 *) options="$options $1" ;;
29 esac
30 shift
31 ;;
32 #-blah )
33 # Unsupported options with args - none known
34 -* )
35 # Unsupported options with no args
36 shift
37 ;;
38 * )
39 args="$args $1"
40 shift
41 ;;
42 esac
43 done
44
45 yasm $options $args
46 $CET_LD -r -z ibt -z shstk -o $object.tmp $object
47 mv $object.tmp $object