]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (C_compiler): copy $CC before it is overwritten with
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Mon, 16 Nov 1998 08:10:45 +0000 (08:10 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Mon, 16 Nov 1998 08:10:45 +0000 (08:10 +0000)
  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

ChangeLog
NEWS
ltmain.in

index dbc866ad6e96d191e94e8fb856944867ef6c5e58..597a90acd48e40c01efc8513c70645b0c7179d81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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
diff --git a/NEWS b/NEWS
index bb8b77beb32eaea9ad4ba55fd59dd71a1758bb99..e27f2ad09c59556c9bdaaa1dea21b3f6240cb70e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,8 @@ still much porting to do.  See PORTING for details (some plans for the
 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
index 3b80f0b63dcd98e5931ae6f51504dd3839083bb0..60001ccc0d744de0393d48a0d0638802e0bb256c 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -557,6 +557,7 @@ compiler."
   # 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"
@@ -1337,7 +1338,7 @@ compiler."
            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
@@ -1365,7 +1366,7 @@ EOF
            # 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"
@@ -1387,7 +1388,7 @@ EOF
               # 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`
@@ -1838,8 +1839,8 @@ dld_preloaded_symbols[] =
           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}%"`