# HG changeset patch # Parent bb3888d55f105217c1d89c2a0362f7573ea48e9e diff --git a/doc/interpreter/mkoctfile.1 b/doc/interpreter/mkoctfile.1 --- a/doc/interpreter/mkoctfile.1 +++ b/doc/interpreter/mkoctfile.1 @@ -67,7 +67,10 @@ Add \fB\-pthread\fP to link command. .TP .B \-W... -Pass flags to the compiler such as \fB\-Wa,\fP\fIOPTION\fP. +Deprecated. Use \fB\-Wa,...\fP instead. +.TP +.B \-Wa,... +Pass flags to the compiler such as \fB\-Wa,-std=c++0x\fP .TP .B \-Wl,... Pass flags to the linker such as \fB\-Wl,-rpath=...\fP diff --git a/scripts/miscellaneous/mkoctfile.m b/scripts/miscellaneous/mkoctfile.m --- a/scripts/miscellaneous/mkoctfile.m +++ b/scripts/miscellaneous/mkoctfile.m @@ -55,8 +55,13 @@ ## The quotes are needed since commas are interpreted as command ## separators. ## +## @item -Wa,@dots{} +## Pass flags though the compiler like "-Wa,-std=c++0x". +## The quotes are needed since commas are interpreted as command +## separators. +## ## @item address@hidden -## Pass flags though the compiler like "-Wa,OPTION". +## Deprecated. Use -Wa,@dots{} instead. ## ## @item -c ## Compile but do not link. diff --git a/src/mkoctfile.cc.in b/src/mkoctfile.cc.in --- a/src/mkoctfile.cc.in +++ b/src/mkoctfile.cc.in @@ -286,7 +286,9 @@ "\n" " -Wl,... Pass flags though the linker like -Wl,-rpath=...\n" "\n" -" -W... Pass flags though the compiler like -Wa,OPTION.\n" +" -W... Deprecated. Use -Wa, instead.\n" +"\n" +" -Wa,... Pass flags though the compiler like -Wa,-std=c++0x.\n" "\n" " -c, --compile Compile, but do not link.\n" "\n" @@ -558,6 +560,10 @@ #endif output_ext = ".mex"; } + else if (starts_wtih (arg, "-Wa,")) + { + pass_on_options += arg.substr(4); + } else if (starts_with (arg, "-W")) { pass_on_options += (" " + arg); diff --git a/src/mkoctfile.in b/src/mkoctfile.in --- a/src/mkoctfile.in +++ b/src/mkoctfile.in @@ -211,7 +211,9 @@ -pthread Add -pthread to link command. - -W... Pass flags to the compiler such as -Wa,OPTION. + -W... Deprecated. Use -Wa instead. + + -Wa, Pass flags to the compiler such as -Wa,-std=c++0x -Wl,... Pass flags to the linker such as -Wl,-rpath=... @@ -340,6 +342,9 @@ incflags="$incflags -I." output_ext=".mex" ;; + -Wa,*) + pass_on_options="$pass_on_options ${1#????}" + ;; -W*) pass_on_options="$pass_on_options $1" ;;