pass default $CFLAGS through with $LTCFLAGS.
+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
* 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).
# 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
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`"'/;
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"
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
# 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`
# 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
# 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
delay_variable_subst='$delay_variable_subst'
_LT_CONFIG_STATUS_DECLARATIONS
LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
compiler='$compiler_DEFAULT'
# Quote evaled strings.
[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