]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
ltmain.in: Pass through -fdiagnostics-color, -frecord-gcc-switches
authorSam James <sam@gentoo.org>
Sun, 14 Jan 2024 06:27:33 +0000 (06:27 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 14 Jan 2024 06:51:06 +0000 (01:51 -0500)
* -fdiagnostics-color: who doesn't like color? No reason to strip it. This
  makes the link phase stick out like a sore thumb if there's warnings emitted.

* -frecord-gcc-switches: we use it in Gentoo to check if a package respects
  *FLAGS. Note that we do not need to include -grecord-gcc-switches explicitly
  here as -g* is already whitelisted.

* build-aux/ltmain.in: Handle -fdiagnostics-color* & -frecord-gcc-switches.

build-aux/ltmain.in

index fb49d6c8f1167d5bdb1c4db7b92946ca47252ac4..d5157a8de1e2dbfe606a50c1b43485e4b4b3bdd7 100644 (file)
@@ -5406,6 +5406,8 @@ func_mode_link ()
       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
+      # -fdiagnostics-color* simply affects output
+      # -frecord-gcc-switches used to verify flags were respected
       # -fsanitize=*         Clang/GCC memory and address sanitizer
       # -fno-sanitize*       Clang/GCC memory and address sanitizer
       # -shared-libsan       Link with shared sanitizer runtimes (Clang)
@@ -5417,6 +5419,7 @@ func_mode_link ()
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
       -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
+      -fdiagnostics-color*|-frecord-gcc-switches| \
       -fuse-ld=*|-Wa,*|-Werror|-Werror=*)
         func_quote_arg pretty "$arg"
        arg=$func_quote_arg_result