+2010-03-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Add FAQ, and FAQ entry for flags stripped at library link time.
+ * doc/libtool.texi (FAQ, Stripped link flags): New nodes.
+ (Wrapper executables): Replace bug address with macro.
+ (Compile mode, Link mode): Document `-Wc,' and `-Xcompiler '
+ semantics better.
+ * libltdl/config/ltmain.m4sh (func_mode_link): Rewrite comment
+ for the flags that are passed through.
+ Prompted by reports from Simon Richter <Simon.Richter@hogyros.de>,
+ Török Edwin <edwintorok@gmail.com> and
+ Åke Sandgren <ake.sandgren@hpc2n.umu.se>.
+
2010-03-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Fix preloader symbol list declaration in libltdl.
* Dlopened modules:: @code{dlopen}ing libtool-created libraries.
* Using libltdl:: Libtool's portable @code{dlopen} wrapper library.
* Trace interface:: Libtool's trace interface.
+* FAQ:: Frequently Asked Questions
* Troubleshooting:: When libtool doesn't work as advertised.
* Maintaining:: Information used by the libtool maintainer.
* GNU Free Documentation License:: License for this manual.
* Module loaders for libltdl:: Creating user defined module loaders.
* Distributing libltdl:: How to distribute libltdl with your package.
+Frequently Asked Questions
+
+* Stripped link flags:: Dropped flags when creating a library
+
Troubleshooting
* Libtool test suite:: Libtool's self-tests.
wrapper executable will detect any command line options that begin with
@code{--lt-} and abort with an error message if the option is not
recognized). If this presents a problem, please contact the Libtool
-team at @email{bug-libtool@@gnu.org}.
+team at @value{BUGADDR}.
These command line options include:
@item -Wc,@var{flag}
@itemx -Xcompiler @var{flag}
-Pass a flag directly to the compiler.
+Pass a flag directly to the compiler. With @code{-Wc,}, multiple flags
+may be separated by commas, whereas @code{-Xcompiler } passes through
+commas unchanged.
@end table
@node Link mode
@item -Wc,@var{flag}
@itemx -Xcompiler @var{flag}
-Pass a linker-specific flag directly to the compiler.
+Pass a linker-specific flag directly to the compiler. With @code{-Wc,},
+multiple flags may be separated by commas, whereas @code{-Xcompiler }
+passes through commas unchanged.
@item -Wl,@var{flag}
@itemx -Xlinker @var{flag}
@end defmac
+@node FAQ
+@chapter Frequently Asked Questions about libtool
+
+This chapter covers some questions that often come up on the mailing
+lists.
+
+@menu
+* Stripped link flags:: Dropped flags when creating a library
+@end menu
+
+@node Stripped link flags
+@section Why does libtool strip link flags when creating a library?
+
+When creating a shared library, but not when compiling or creating
+a program, @command{libtool} drops some flags from the command line
+provided by the user. This is done because flags unknown to
+@command{libtool} may interfere with library creation or require
+additional support from @command{libtool}, and because omitting
+flags is usually the conservative choice for a successful build.
+
+If you encounter flags that you think are useful to pass, as a
+work-around you can prepend flags with @code{-Wc,} or @code{-Xcompiler }
+to allow them to be passed through to the compiler driver
+(@pxref{Link mode}). Another possibility is to add flags already
+to the compiler command at @command{configure} run time:
+
+@example
+./configure CC='gcc -m64'
+@end example
+
+If you think @command{libtool} should let some flag through by default,
+here's how you can test such an inclusion: grab the Libtool development
+tree, edit the @file{ltmain.m4sh} file in the @file{libltdl/config}
+subdirectory to pass through the flag (search for @samp{Flags to be
+passed through}), re-bootstrap and build with the flags in question
+added to @code{LDFLAGS}, @code{CFLAGS}, @code{CXXFLAGS}, etc. on the
+@command{configure} command line as appropriate. Run the testsuite
+as described in the @file{README} file and report results to
+@value{BUGADDR}.
+
@node Troubleshooting
@chapter Troubleshooting
@cindex troubleshooting
arg="$func_quote_for_eval_result"
;;
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # -F/path gives path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- # -tp=* Portland pgcc target processor selection
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
func_quote_for_eval "$arg"