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                | 4 ++++
 build-aux/ltmain.in | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 4b1ecc2d..668e122d 100644
--- 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.
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 68593972..6cb738fb 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -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| \
-- 
2.53.0.239.g8d8fc8a987-goog


Reply via email to