]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Add -Wa,* link-mode flag for assembler pass-thru
authoraakropotkin <alex.ameen.tx@gmail.com>
Fri, 19 Nov 2021 03:24:47 +0000 (21:24 -0600)
committeraakropotkin <alex.ameen.tx@gmail.com>
Fri, 19 Nov 2021 03:24:47 +0000 (21:24 -0600)
* build-aux/ltmain.in: add -Wa,* as link-mode flag.
Add help messages for -Wa,* and -Xassember in link mode.
Add help message for -Xcompiler in compile mode.
* doc/libtool.texi: document -Xassembler and -Wa,* for link-mode.

build-aux/ltmain.in
doc/libtool.texi

index fa2e1b5f5b3a497fed328d5c30c453e2f3d40f1a..0a9adc8495ea570a046f7a86d0c16d338e84e82d 100644 (file)
@@ -1751,7 +1751,8 @@ This mode accepts the following additional options:
   -prefer-non-pic   try to build non-PIC objects only
   -shared           do not build a '.o' file suitable for static linking
   -static           only build a '.o' file suitable for static linking
-  -Wc,FLAG          pass FLAG directly to the compiler
+  -Wc,FLAG
+  -Xcompiler FLAG   pass FLAG directly to the compiler
 
 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
 from the given SOURCEFILE.
@@ -1857,6 +1858,8 @@ The following components of LINK-COMMAND are treated specially:
   -weak LIBNAME     declare that the target provides the LIBNAME interface
   -Wc,FLAG
   -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wa,FLAG
+  -Xassembler FLAG  pass linker-specific FLAG directly to the assembler
   -Wl,FLAG
   -Xlinker FLAG     pass linker-specific FLAG directly to the linker
   -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
@@ -5392,10 +5395,11 @@ func_mode_link ()
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
       # -fuse-ld=*           Linker select flags for GCC
+      # -Wa,*                Pass flags directly to the assembler
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*|-fuse-ld=*)
+      -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
         func_quote_arg pretty "$arg"
        arg=$func_quote_arg_result
         func_append compile_command " $arg"
index 6d88690ca38ceddfb4975909fbeb068bf16af018..3caab10499da0fcab7705be1334ea7155765871b 100644 (file)
@@ -1616,6 +1616,12 @@ Pass a linker-specific flag directly to the compiler.  With @code{-Wc,},
 multiple flags may be separated by commas, whereas @code{-Xcompiler }
 passes through commas unchanged.
 
+@item -Wa,@var{flag}
+@itemx -Xassembler @var{flag}
+Pass a linker-specific flag directly to the assembler.  With @code{-Wa,},
+multiple flags may be separated by commas, whereas @code{-Xassembler }
+passes through commas unchanged.
+
 @item -Wl,@var{flag}
 @itemx -Xlinker @var{flag}
 Pass a linker-specific flag directly to the linker.