]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Add FAQ, and FAQ entry for flags stripped at library link time.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 28 Mar 2010 16:04:10 +0000 (18:04 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 31 Mar 2010 19:53:50 +0000 (21:53 +0200)
* 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>.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
doc/libtool.texi
libltdl/config/ltmain.m4sh

index 9fa30c8885370e96a7d7145d432091d126d7848a..0d94edf1385462a539b857c06852316997f3a6f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+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.
index 47a22fa070206472ee00947cb1bb3d3a9f60f9be..323bf4e5dc17630fdb8bc5ffb8bdc8bca5187bf9 100644 (file)
@@ -95,6 +95,7 @@ GNU Libtool.
 * 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.
@@ -186,6 +187,10 @@ Using libltdl
 * 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.
@@ -886,7 +891,7 @@ employ command line options that begin with @code{--lt-}. (In fact, the
 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:
 
@@ -1405,7 +1410,9 @@ linking.
 
 @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
@@ -1593,7 +1600,9 @@ supplies the same interface (@pxref{Linking with dlopened modules}).
 
 @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}
@@ -4937,6 +4946,46 @@ autoconf --trace 'LT_SUPPORTED_TAG:$1'
 @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
index e70a318affc1ca31c610be31a879459cbf7b4d0d..9e6646fadbf9f3b8acb74ab772b719237b8eedaf 100644 (file)
@@ -4483,17 +4483,17 @@ func_mode_link ()
        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"