From: Alexey Samsonov Date: Wed, 11 Feb 2026 08:07:26 +0000 (+0000) Subject: ltmain.in: Handle clang's -resource-dir flag. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f33b1b9a4eaca4419014df5c7208f105349667fc;p=thirdparty%2Flibtool.git ltmain.in: Handle clang's -resource-dir flag. 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. --- diff --git a/NEWS b/NEWS index 0daedf1cd..098b781af 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 d58b232b1..9108006cf 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| \