]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltconfig.in (compiler_c_o): Make sure the compiler does not
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Tue, 27 Apr 1999 09:42:16 +0000 (09:42 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 27 Apr 1999 09:42:16 +0000 (09:42 +0000)
create temporaries in the current directory when output should go
elsewhere.  We must perform locking if it does.

ChangeLog
ltconfig.in

index 331c06e6105d3cfc5665df926e49fb4a5046d48a..78ffcdc4c8b718cadf2c11cbda9208b383e8f0ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+1999-04-27  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * ltconfig.in (compiler_c_o): Make sure the compiler does not
+       create temporaries in the current directory when output should go
+       elsewhere.  We must perform locking if it does.
+
+1999-04-27  Gary V. Vaughan  <gary@oranda.demon.co.uk>
+
+       * ltmain.in (old_archive_cmds): Ensure that there are always .o
+       objects available before running old_archive_cmds.
+
 1999-04-26  Erez Zadok  <ezk@cs.columbia.edu>
 
        * doc/PLATFORMS: Updates for netbsd 1.3.3 and 1.4.
@@ -8,11 +19,6 @@
        would never match; fixed.
        Reported by Stephan Kulow <coolo@itm.mu-luebeck.de>
 
-1999-04-26  Gary V. Vaughan  <gary@oranda.demon.co.uk>
-
-       * ltmain.in (old_archive_cmds): Ensure that there are always .o
-       objects available before running old_archive_cmds.
-
 1999-04-25  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * libtool.m4 (OBJDUMP): Pass it to ltconfig.
index 23a8c67357badf359253decddf221c06f697d933..6d19906db57aa939ae0b93b2324e303a3efda1ae 100755 (executable)
@@ -764,16 +764,26 @@ fi
 
 # Check to see if options -o and -c are simultaneously supported by compiler
 echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
+$rm -r conftest 2>/dev/null
+mkdir conftest
+cd conftest
 $rm conftest*
 echo "int some_variable = 0;" > conftest.c
+mkdir out
+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+# that will create temporary files in the current directory regardless of
+# the output directory.  Thus, making CWD read-only will cause this test
+# to fail, enabling locking or at least warning the user not to do parallel
+# builds.
+chmod -w .
 save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -c -o conftest2.o"
+CFLAGS="$CFLAGS -o out/conftest2.o"
 echo "$progname:@LINENO@: checking if $compiler supports -c -o file.o" >&5
-if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
+if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
 
   # The compiler can only warn and ignore the option if not recognized
   # So say no if there are warnings
-    if test -s conftest.err; then
+    if test -s out/conftest.err; then
       echo "$ac_t"no 1>&6
       compiler_c_o=no
     else
@@ -782,12 +792,17 @@ if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>
     fi
 else
   # Append any errors to the config.log.
-  cat conftest.err 1>&5
+  cat out/conftest.err 1>&5
   compiler_c_o=no
   echo "$ac_t"no 1>&6
 fi
 CFLAGS="$save_CFLAGS"
-$rm conftest*
+chmod u+w .
+$rm conftest* out/*
+rmdir out
+cd ..
+rmdir conftest
+$rm -r conftest 2>/dev/null
 
 if test x"$compiler_c_o" = x"yes"; then
   # Check to see if we can write to a .lo