]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
yasm-wrapper: refine yasm option usage strategy in yasm-wrapper
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 21 Oct 2020 07:03:15 +0000 (15:03 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 29 Oct 2020 00:57:54 +0000 (08:57 +0800)
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/yasm-wrapper

index fb0dcd1f4d794fb01bc44c2afc98e34c18652fde..a140092e425088e3ec25e8243fdcb711fbfe8f9e 100755 (executable)
@@ -12,15 +12,28 @@ while [ -n "$*" ]; do
            new="$new -f $1"
            shift
            ;;
-       -g* | -f* | -W* | -MD | -MP | -c | -D* | -E | --param* | -O* | -m* | -pipe | -pthread )
+       -c | --param* | -m* | -pipe | -thread )
+           # unknown options under both yasm & nasm
            shift
            ;;
-       -I | -isystem )
+       -D* )
+           # ignore define Macro option
            shift
-           new="$new -i $1"
+           ;;
+       -g* )
+           # ignore debug format
+           shift
+           ;;
+       -W* )
+           # Warning/error option
+           shift
+           ;;
+       -MD | -MP | -E | -O* )
+           # ignore option: nasm support, yasm not support
            shift
            ;;
        -MT )
+           # ignore option: nasm support, yasm not support
            shift
            shift
            ;;
@@ -29,7 +42,16 @@ while [ -n "$*" ]; do
            touch="$1"
            shift
            ;;
+       -f* )
+           shift
+           ;;
+       -I | -isystem )
+           shift
+           new="$new -i $1"
+           shift
+           ;;
        * )
+           # Keep other options
            new="$new $1"
            shift
            ;;