* m4/libtool.m4, config/ltmain.in: When calling $LTCC,

pass default $CFLAGS through with $LTCFLAGS.
This commit is contained in:
Albert Chin-A-Young 2004-09-05 17:35:16 +00:00 committed by Gary V. Vaughan
parent 875f854504
commit 0aef25d740
4 changed files with 20 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2004-09-05 Albert Chin-A-Young <china@thewrittenword.com>
* m4/libtool.m4, config/ltmain.in: When calling $LTCC,
pass default $CFLAGS through with $LTCFLAGS.
2004-09-03 David Edelsohn <dje@watson.ibm.com>
* config/ltmain.in (func_mode_link): Use $pic_object as

2
NEWS
View File

@ -4,6 +4,8 @@ New in 1.9d: 2004-??-??; CVS version 1.9c, Libtool team:
* If non-pic objects were not compiled, and libtool is called in link mode,
libtool no longer silently creates an empty archive, but rather falls
back to pic objects.
* When compiling C glue code with $LTCC, libtool now saves the setting of
$compiler_flags from the C tag, and passes those flags to $LTCC.
* libtool uses automake's $(mkdir_p), and can support `make -j' on
multi-processor hosts if automake discovered a multithreadable mkdir. If
it still doesn't work for you, install GNU mkdir (in GNU coreutils).

View File

@ -60,6 +60,7 @@
# host-triplet: @host_triplet@
# shell: $SHELL
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
# $progname: (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
# automake: $automake_version
@ -300,6 +301,7 @@ func_help ()
s:\$progname:'$progname':;
s:\$SHELL:'"$SHELL"':;
s:\$LTCC:'"$LTCC"':;
s:\$LTCFLAGS:'"$LTCFLAGS"':;
s:\$LD:'"$LD"':;
s/\$with_gnu_ld/'"$with_gnu_ld"'/;
s/\$automake_version/'"`automake --version 2>/dev/null |$SED 1q`"'/;
@ -1044,8 +1046,8 @@ static const void *lt_preloaded_setup() {
esac
# Now compile the dynamic symbol file.
$show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$my_dlsyms\")"
$run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' || exit $?
$show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$my_dlsyms\")"
$run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' || exit $?
# Clean up the generated files.
$show "$RM $output_objdir/$my_dlsyms $nlist ${nlist}S ${nlist}T"
@ -4708,7 +4710,7 @@ func_mode_link ()
int main() { return 0; }
EOF
$RM conftest
$LTCC -o conftest conftest.c $deplibs
$LTCC $LTCFLAGS -o conftest conftest.c $deplibs
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
@ -4753,7 +4755,7 @@ EOF
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$RM conftest
$LTCC -o conftest conftest.c $i
$LTCC $LTCFLAGS -o conftest conftest.c $i
# Did it work?
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
@ -6144,7 +6146,7 @@ EOF
# 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.
$run $LTCC -s -o $cwrapper $cwrappersource
$run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
;;
esac
$RM $output

6
m4/libtool.m4 vendored
View File

@ -170,6 +170,7 @@ old_CFLAGS="$CFLAGS"
# Set sane defaults for various variables
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$LD" && LD=ld
test -z "$ac_objext" && ac_objext=o
@ -435,6 +436,7 @@ double_quote_subst='$double_quote_subst'
delay_variable_subst='$delay_variable_subst'
_LT_CONFIG_STATUS_DECLARATIONS
LTCC='$LTCC'
LTCFLAGS='$LTCFLAGS'
compiler='$compiler_DEFAULT'
# Quote evaled strings.
@ -628,12 +630,16 @@ m4_defun([_LT_TAG_COMPILER],
[AC_REQUIRE([AC_PROG_CC])dnl
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU C compiler?])dnl
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
# If no C compiler flags were specified, use CFLAGS.
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
# Allow CC to be a program name with arguments.
compiler=$CC
])# _LT_TAG_COMPILER