[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: backport LTCFLAGS
From: |
Ralf Wildenhues |
Subject: |
FYI: backport LTCFLAGS |
Date: |
Thu, 24 Nov 2005 16:31:25 +0100 |
User-agent: |
Mutt/1.5.11 |
This is necessary to complete the Solaris -xarch=v9 bug fix.
Applied to branch-1-5.
Cheers,
Ralf
2005-11-24 Albert Chin-A-Young <address@hidden>
* libtool.m4, ltmain.in: When calling $LTCC, pass default $CFLAGS
through with $LTCFLAGS.
Backport from HEAD 2004-09-05.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.137
diff -u -r1.314.2.137 libtool.m4
--- libtool.m4 20 Nov 2005 12:09:26 -0000 1.314.2.137
+++ libtool.m4 24 Nov 2005 15:28:46 -0000
@@ -157,6 +157,7 @@
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
@@ -227,6 +228,9 @@
# 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_AC_SYS_COMPILER
@@ -1798,6 +1802,9 @@
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
fi
fi
+ if test -z "$LTCFLAGS"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+ fi
# Extract list of available tagged configurations in $ofile.
# Note that this assumes the entire list is on one line.
@@ -4101,7 +4108,7 @@
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC
LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
@@ -4269,6 +4276,9 @@
# A C compiler.
LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
# A language-specific compiler.
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.98
diff -u -r1.334.2.98 ltmain.in
--- ltmain.in 24 Nov 2005 15:22:59 -0000 1.334.2.98
+++ ltmain.in 24 Nov 2005 15:28:47 -0000
@@ -3447,7 +3447,7 @@
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
@@ -3492,7 +3492,7 @@
# 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`
@@ -4923,16 +4923,16 @@
va_end (ap);
}
EOF
- # 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.
- $run $LTCC -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+ # 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.
+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: backport LTCFLAGS,
Ralf Wildenhues <=