+1998-11-16 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * ltmain.in (C_compiler): copy $CC before it is overwritten with
+ command-line compiler, so that we can use it to compile C sources
+ generated during the build. This fixes the problem that showed up
+ with -export-dynamic of C++ programs in egcs 1.1.
+ * NEWS: ditto
+
1998-11-12 Alexandre Oliva <oliva@dcc.unicamp.br>
* PORTING: Porting instructions are in the libtool manual already
future in mail/deplibs in the CVS tree).
* Initial support for portable dlopen()ing of modules (see mdemo).
* New option -export-symbols to control symbol exporting when possible.
-* New dlpreopen mechanism.
+* Fixed -export-dynamic problem with C++ programs in egcs 1.1.
+* New dlpreopen structure.
* libtool now supports `-c -o' and subdirectories in sources and
target object names even in platforms whose compilers do not support
this. In this case, file locking occurs to avoid problems with
# libtool link mode
link)
modename="$modename: link"
+ C_compiler="$CC" # save it, to compile generated C sources
CC="$nonopt"
allow_undefined=yes
compile_command="$CC"
int main() { return 0; }
EOF
$rm a.out
- $CC conftest.c $deplibs $extradeplibs
+ $C_compiler conftest.c $deplibs $extradeplibs
if test $? -eq 0 ; then
ldd_output=`ldd a.out`
for i in $deplibs; do
# Error occured in the first compile. Let's try to salvage the situation:
# 1) Is the error in the extradeplibs?
$rm a.out
- $CC conftest.c $extradeplibs
+ $C_compiler conftest.c $extradeplibs
if test $? -ne 0 ; then
echo
echo "*** Warning! Not all libraries necessary to the dependent libraries are"
# If $name is empty we are operating on a -L argument.
if test "$name" != "" ; then
$rm a.out
- $CC conftest.c $i $extradeplibs
+ $C_compiler conftest.c $i $extradeplibs
# Did it work?
if test $? -eq 0 ; then
ldd_output=`ldd a.out`
fi
# Now compile the dynamic symbol file.
- $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")"
- $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
+ $show "(cd $objdir && $C_compiler -c$no_builtin_flag \"$dlsyms\")"
+ $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag "$dlsyms")' || exit $?
# Transform the symbol file into the correct name.
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`