Hi, the approach I take in my configure scripts is to protect well-known options with -Xlinker, -Xcompiler or -XCClinker as appropriate. This is as part of a macro that switches configure compilations from using the compiler(s) as-is to instead use the libtool wrapper as soon as possible, already during configure. I understand why libtool decided to simply strip unknown options, but I think this decision made some assumptions regarding ever-improving libtool, i.e. keeping up with new compiler options eventually, that simply did not materialize. Kind regards, Thomas > On Mar 21, 2023, at 15:29 , Carlos Galvez wrote: > > Hi! > > I'm using libtool 2.4.6. I realize that it's removing a very important linker flag, making my linking fail. > > The command I send is: > > ../../libtool --tag=CC --mode=link /path/to/gcc -no-canonical-prefixes ... > > And what libtool prints is: > > libtool: link: /path/to/gcc -shared ... > > Why is the "-no-canonical-prefixes" flag removed from the linking command? If I manually execute linking outside libtool, and add the required flag, linking works successfully. > > Thanks! > _______________________________________________ > Bug-libtool mailing list > Bug-libtool@gnu.org > https://lists.gnu.org/mailman/listinfo/bug-libtool