[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool-1.4.2 (finished analysis), autoconf-2.53 (bug)
From: |
Carlo Wood |
Subject: |
libtool-1.4.2 (finished analysis), autoconf-2.53 (bug) |
Date: |
Sat, 27 Jul 2002 04:01:48 +0200 |
User-agent: |
Mutt/1.2.5i |
Ok, the problem in ltmain.sh is this part:
# Calculate the filename of the output object if compiler does
# not support -o with -c
if test "$compiler_c_o" = no; then
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e
's%\.[^.]*$%%'`.${objext}
where 'output_obj' is errornously set
to "foobar.lo" because "srcfile" is just the last
argument passed to g++ (the second argument of
"-MF .deps/foobar.PTlo" in this case).
I think this is certainly a bug, 'srcfile' should
not be set to everything, only to arguments that
LOOK like a source file, and a "-c foo.ext" should
take precendence over any other argument anyway.
The reason that this normally not occuring is because
normally compiler_c_o is not set to 'yes', and here
we see a bug of autoconf. I have:
configure:5584: checking if gcc supports -c -o file.o
configure:5606: g++ -c -g -pipe conftest.cc >&5
Assembler messages:
FATAL: can't create conftest.o: Permission denied
configure:5628: result: no
Where the test is:
# 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 -o out/conftest2.$ac_objext"
compiler_c_o=no
if { (eval echo configure:5606: \"$ac_compile\") 1>&5; (eval $ac_compile)
2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
...etc
The problem here is that autoconf sets CFLAGS while 'ac_compile'
is using g++ (the C++ compiler), which ignores CFLAGS and uses CXXFLAGS.
Hence this test fails...
The 'work around' that I was looking for is thus
to temporarily set AC_LANG_C prior to this test.
--
Carlo Wood <address@hidden>
- libtool-1.4.2 (finished analysis), autoconf-2.53 (bug),
Carlo Wood <=