]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
ltmain.in: Handle clang's -resource-dir flag.
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 11 Feb 2026 08:07:26 +0000 (08:07 +0000)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Fri, 13 Feb 2026 16:39:48 +0000 (18:39 +0200)
When Clang is used to cross compile, the user may list
-resource-dir flag that Clang driver uses to discover
target-specific headers and runtime libraries.

* build-aux/ltmain.in: Pass clang's '-resource-dir=*' flag for
  choosing compiler resource files, such as runtime libraries
  through libtool unchanged.
* NEWS: Update.

NEWS
build-aux/ltmain.in

diff --git a/NEWS b/NEWS
index 0daedf1cd35526344d2675cbbd43a4110b9e9f12..098b781af50d3a7017d5edef6cd5a4ea5ee5c617 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** New features:
+
+  - Pass 'resource-dir=*' flag for Clang.
+
 ** Bug fixes:
 
   - Store cygpath file path conversions correctly for MSYS2 and MSVC.
index d58b232b1754d1161e3c76de5f26e789aa50fb6c..9108006cf228e6b2f5a6fb284fbdb51e88d3eaef 100644 (file)
@@ -5660,6 +5660,7 @@ func_mode_link ()
       # -fuse-ld=*           Linker select flags for GCC
       # -static-*            direct GCC to link specific libraries statically
       # -fcilkplus           Cilk Plus language extension features for C/C++
+      # -resource-dir=*      for selecting compiler resource directory with clang
       # -rtlib=*             select c runtime lib with clang
       # --unwindlib=*        select unwinder library with clang
       # -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
@@ -5668,7 +5669,7 @@ func_mode_link ()
       -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=*|--target=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \
-      -stdlib=*|-rtlib=*|--unwindlib=*| \
+      -stdlib=*|-resource-dir=*|-rtlib=*|--unwindlib=*| \
       -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
       -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \
       -fdiagnostics-color*|-frecord-gcc-switches| \