[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trouble with MSVC `cl -c -o ...'
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Trouble with MSVC `cl -c -o ...' |
Date: |
Tue, 12 Oct 2004 07:29:27 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
[For bug-autoconf@ readers, the start of the thread is at
http://lists.gnu.org/archive/html/automake/2004-10/msg00017.html]
>>> "Milan" == Milan Tichy <address@hidden> writes:
[...]
Milan> Is it a bug?
Yes. If your compiler does not support -c -o, something in the
tool chain should cope with that. In this case AM_PROG_CC_C_O
is expected to redefine CC as "compile $CC" where `compile' will
do the extra mv you initially offered to do by hand.
However your traces show that `cl' is detected as supporting -c
and -o together.
| configure:3356: checking whether cl and cc understand -c and -o together
| configure:3386: cl -c conftest.c -o conftest.obj >&5
| Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
| Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
|
| conftest.c
| configure:3389: $? = 0
| configure:3391: cl -c conftest.c -o conftest.obj >&5
| Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
| Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
|
| conftest.c
| configure:3394: $? = 0
| configure:3401: cc -c conftest.c >&5
| configure:3404: $? = 0
| configure:3407: cc -c conftest.c -o conftest.obj >&5
| configure:3410: $? = 0
| configure:3412: cc -c conftest.c -o conftest.obj >&5
| configure:3415: $? = 0
| configure:3433: result: yes
That test is actually run by AC_PROG_CC_C_O (which is called by
AM_PROG_CC_C_O) so I'm CCing bug-autoconf.
My impression is that the AC_PROG_CC_C_O test fails to detect
that -c -o does not work because it asks for the output that cl
would produce anyway. Could you confirm that? Just try
something along the lines of
touch a.c b.c
cl -c a.c -o a.obj
ls
cl -c b.c -o x.obj
ls
I guess a.obj and b.obj will be created, but not x.obj. If that
is true, fixing AC_PROG_CC_C_O seems easy enough.
Milan> BTW, according to Automake manual I should use the first one
Milan> (AM_PROG_CC_C_O). Is it alrigth?
Yes. Forget about AC_PROG_CC_C_O, it's called by AM_PROG_CC_C_O.
(You can also remove the superfluous invocations of AC_PROG_MAKE_SET
and AC_PROG_INSTALL, which are already done by AM_INIT_AUTOMAKE.)
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Trouble with MSVC `cl -c -o ...',
Alexandre Duret-Lutz <=