libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test if -c and -o work in 1.4


From: libtool
Subject: test if -c and -o work in 1.4
Date: Wed, 25 Apr 2001 16:13:13 -0500
User-agent: Mutt/1.1.12i

The test to determine if a compiler supports -c and -o creates a
non-writable directory and performs a test compile sending stderr to a
file. If the file is non-empty, even if the object file was written
(CWD is a non-writable directory while -o points to a file in a
writable directory), the test fails. Is this correct?

The IBM xlC compiler complains that the current directory is not
writable (because it's using temporary files?) but still saves the
object file to the path specified with -o. Do we want to assume
success if the object file was created and has non-empty size?

Anyway, if libtool runs and $need_locks="yes", should there be *any*
lock files after libtool completes? If so, why don't you add:
      trap "$run $rm $removelist; exit 0" 0
to:
    if test "$compiler_c_o" = no; then
      output_obj=`$echo "X$srcfile" | \
      $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
      lockfile="$output_obj.lock"
      removelist="$removelist $output_obj $lockfile"
      trap "$run $rm $removelist; exit 1" 1 2 15
in ltmain.in?

In 1.4 on powerpc-ibm-aix4.3.2.0 with xlC 5.0, if I do:
  $ cd tests
  $ sh mdemo-conf.test
  $ sh mdemo-make.test
  $ cd ../mdemo
  $ ls *lock
  foo1.o.lock  foo2.o.lock  sub.o.lock

Is this correct? Because the lock files don't get cleaned up, I'm
getting the following behaviour while running 'make check':
  PASS: depdemo-unst.test
  PASS: mdemo-conf.test
  PASS: mdemo-make.test
  FAIL: mdemo-exec.test
  FAIL: mdemo-inst.test
  PASS: mdemo-unst.test
  === Running dryrun.test
  = Running gmake clean in ../mdemo
  = Making object files in ../mdemo (dry run)
  = Making object files in ../mdemo
  gmake[3]: Entering directory `/opt/build/libtool-1.4/mdemo'
  /bin/sh ./libtool --mode=compile xlc -DPACKAGE=\"mdemo\"
  -DVERSION=\"0.1\" -DHAVE_DLFCN_H=1 -DHAVE_MATH_H=1  -I.
  -I/opt/build/libtool-1.4/tests/../mdemo
  -I/opt/build/libtool-1.4/tests/../mdemo/../libltdl    -g -c foo1.c
  Waiting for foo1.o.lock to be removed
  Waiting for foo1.o.lock to be removed
  Waiting for foo1.o.lock to be removed
  ...

-- 
albert chin (address@hidden)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]