[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: AC_OBJEXT again
RE: AC_OBJEXT again
Wed, 13 Dec 2000 19:20:07 +0100
> -----Original Message-----
> From: Akim Demaille [mailto:address@hidden
> Sent: Wednesday, December 13, 2000 1:40 PM
> To: Alexandre Oliva
> Cc: Peter Eisentraut; Morten Eriksen; address@hidden
> Subject: Re: AC_OBJEXT again
> | But I'm also a bit unsure as to whether we should use
> | given that this macro will tell the compiler to create an executable
> | named `conftest', and this may disable whatever default
> extension the
> | compiler might have selected.
> Good point.
> | The bad side of this is that, if we
> | leave the decision up to the compiler, we'll get a.out or
> a.exe, which
> | is out of autoconf's file namespace.
> Bad point.
> So the real question is, what happens when you use -o conftest? Will
> the cross-compiler and native Win compilers produce conftest, or/and
> conftest.exe? As long as conftest.exe is created when one `-o
> conftest', we're doing good.
Problem in fact is that, IMNSHO, EXEEXT is a HOST OS characteristic; I think
it's not too difficult to think of a Win32 cross-compiler hosted on UNIX
that obey strictly the '-o conftest' options, expecting its user to *know*
that Win32 *needs* the file to be named conftest.exe, and thus thinking it
will use '-o conftest.exe' :-)
Remember the need for AC_EXEEXT is mainly in generating the Makefile so that
we can put the right extension in the rules targets so that the '-o $@' and
install rulles will be correct.
In fact as long as the compiler accepts to generate 'conftest.foobar' when
given '-o conftest.foobar' and the HOST needs a file to be named
'xxx.foobar' so that to execute it then all is OK; OTOH, if '-o
conftest.foobar' fails or generate plain 'conftest' fo such a host, then the
compiler is broken (and we thus may need to rewrite the compile rule to use
'-o `basename $@ .foobar`' and add an "mv `basename $@ .foobar` $@"...
(don't laugh! I've had to do this kind of trick trying to work with some
braindead cross-compiler :-])
So I think EXEEXT should use the HOST name and a (config.exeext?) table
knowing that some known hosts link "*-cygwin*" or "*-mingw*"... *need*
".exe", *then* check that "-o conftest.exe" really creates conftest.exe.
On the contrary OBJEXT is really a BUILD (in fact compiler) characteristic,
so the proposed patch is fine.
97 bis, rue de Colombes
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
Re: AC_OBJEXT again, Earnie Boyd, 2000/12/13
RE: AC_OBJEXT again,
Bernard Dautrevaux <=
- Re: AC_CYGWIN etc. (Was: AC_OBJEXT again), (continued)
- Re: AC_OBJEXT again, Lars J. Aas, 2000/12/13
- Re: AC_OBJEXT again, Alexandre Oliva, 2000/12/12
- OBJ and EXE and cross-compilation (Was: AC_OBJEXT again), Akim Demaille, 2000/12/12
- Re: OBJ and EXE and cross-compilation (Was: AC_OBJEXT again), Ralf Corsepius, 2000/12/12
- Re: OBJ and EXE and cross-compilation (Was: AC_OBJEXT again), Mo DeJong, 2000/12/12
- Re: OBJ and EXE and cross-compilation (Was: AC_OBJEXT again), Akim Demaille, 2000/12/13