libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Ensure cwrapper compiles without warnings under -std=c99.


From: Charles Wilson
Subject: Re: [PATCH] Ensure cwrapper compiles without warnings under -std=c99.
Date: Tue, 06 May 2008 22:47:47 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

Ralf Wildenhues wrote:
In addition to Eric's review, here's some extremely picky nits:

-# func_emit_wrapper arg
+# func_emit_wrapper_part1 arg

Isn't that .libs/_libs aka $objdir here?  This is not new here, but
further below.

Capitalization, period at end of the sentence.

# func_emit_wrapper_part1 [ARG=no]
#
# Emit the first part of a libtool wrapper script on stdout.
# For more information, see the description associated with
# func_emit_wrapper(), below.


# func_emit_wrapper_part2 [ARG=no]
#
# Emit the second part of a libtool wrapper script on stdout.
# For more information, see the description associated with
# func_emit_wrapper(), below.


Please refer to arguments in all caps: ARG (as is done elsewhere).

See above (.libs).


# func_emit_wrapper [ARG=no]
#
# Emit a libtool wrapper script on stdout.
# Don't directly open a file because we may want to
# incorporate the script contents within a cygwin/mingw
# wrapper executable.  Must ONLY be called from within
# func_mode_link because it depends on a number of variables
# set therein.
#
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
# variable will take.  If 'yes', then the emitted script
# will assume that the directory in which it is stored is
# the $objdir directory.  This is a cygwin/mingw-specific
# behavior.

 I wonder whether this needs to be repeated.

Yes, so did I:

http://lists.gnu.org/archive/html/libtool-patches/2008-04/msg00161.html > I'm not sure if all the documentation needs to be duplicated for all three functions, but...

See attached update (to be applied "on top of" previous patch.

Unresolved:

(1) whether func_emit_wrapper_part1 should even TAKE an argument

(2) whether the cwrapper src, when printing a const char*, should use puts() in preference to printf("%s",...)

(3) from the message above, the issue listed as #3 /there/ is not addressed by this patch, and might be a good candidate for a followup: If compiling the cwrapper fails, libtool should notice, and at least print some error message right away -- or error-and-die right away, and not later when it tries to strip a non-existent file:

            # we should really use a build-platform specific compiler
            # here, but OTOH, the wrappers (shell script and this C one)
            # are only useful if you want to execute the "real" binary.
            # Since the "real" binary is built for $host, then this
            # wrapper might as well be built for $host, too.
            $opt_dry_run || {
              $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
              $STRIP $cwrapper
            }

(Note to self: update that comment block in the "don't call shell wrapper from cwrapper" patch...because in the new scenario, we WANT to use the $host compiler for the wrapper.exe)

--
Chuck

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index a2b4f9a..42e4905 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -2249,20 +2249,11 @@ func_extract_archives ()
 
 
 
-# func_emit_wrapper_part1 arg
+# func_emit_wrapper_part1 [ARG=no]
 #
-# emit the first part of a libtool wrapper script on stdout
-# don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable.  Must ONLY be called from within
-# func_mode_link because it depends on a number of variable
-# set therein.
-#
-# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the '.lib' directory.  This is a cygwin/mingw-specific
-# behavior.
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
 func_emit_wrapper_part1 ()
 {
        func_emit_wrapper_part1_arg1=no
@@ -2356,20 +2347,11 @@ else
 }
 # end: func_emit_wrapper_part1
 
-# func_emit_wrapper_part2 arg
+# func_emit_wrapper_part2 [ARG=no]
 #
-# emit the second part of a libtool wrapper script on stdout
-# don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable.  Must ONLY be called from within
-# func_mode_link because it depends on a number of variable
-# set therein.
-#
-# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the '.lib' directory.  This is a cygwin/mingw-specific
-# behavior.
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
 func_emit_wrapper_part2 ()
 {
        func_emit_wrapper_part2_arg1=no
@@ -2501,19 +2483,19 @@ fi\
 # end: func_emit_wrapper_part2
 
 
-# func_emit_wrapper arg
+# func_emit_wrapper [ARG=no]
 #
-# emit a libtool wrapper script on stdout
-# don't directly open a file because we may want to
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
 # incorporate the script contents within a cygwin/mingw
 # wrapper executable.  Must ONLY be called from within
-# func_mode_link because it depends on a number of variable
+# func_mode_link because it depends on a number of variables
 # set therein.
 #
-# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
 # variable will take.  If 'yes', then the emitted script
 # will assume that the directory in which it is stored is
-# the '.lib' directory.  This is a cygwin/mingw-specific
+# the $objdir directory.  This is a cygwin/mingw-specific
 # behavior.
 func_emit_wrapper ()
 {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]