[Top][All Lists]

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

Re: MSVC: MSVC needs a hint to force it to compile either as C or C++.

From: Gary V. Vaughan
Subject: Re: MSVC: MSVC needs a hint to force it to compile either as C or C++.
Date: Wed, 23 Jun 2010 12:39:34 +0700

Hallo Ralf, Peter,

On 23 Jun 2010, at 03:16, Ralf Wildenhues wrote:
> * Peter Rosin wrote on Tue, Jun 22, 2010 at 03:07:30PM CEST:
>> Den 2010-06-22 13:54 skrev Gary V. Vaughan:
>>> But compile_tag is never set, so the patch is a NOP!
>>> If this has to be fudged into the libtool tag settings by hand to
>>> support MSVC (or some other nefarious means I'm missing), then
>>> please document that.
>> It happens in a later patch. Way-back-when I did it that way to
>> not get one big unwieldy monster patch. I.e. first add all parts
>> needed, then a final patch that just switches it all on.
>> So, it's not a bit deal for me to have this one dangling. But that
>> said, it is nice to "fire and forget"...
> This one is not fire and forget.  I can live with "fire", but not with
> forget, because the right place to fix this issue is not within Libtool.
> The issue is similar to what Fortran solves with AC_FC_SRCEXT in
> Autoconf, whose result automake uses to to put right before the source
> file name.  Here, the same could be done for -Tc or -Tp, respectively.
> One difference is that the flag is not specific to the file name
> extension, just to the language.
> What am I missing?  Ah yes, someone would need to call such a macro;
> probably the cleanest way would be call it from AC_PROG_CC.  One cheaper
> way could be to hard-code known extensions into 'compile' now, but that
> means this script is getting more uglier.
> And yes, I should apologize for not seeing this four years ago ...

What happened 4 years ago? (pr-msvc-support branched on 2008-08-02)

> Comments?

I won't pretend to understand all the interactions between the various
components of Automake, but I certainly *do* like the simplification
that wrapper scripts always seem to provide (especially when compared
to poking the equivalent functionality into dozens of places over
the several hundred KB of already torturous libtool code).

The compile script by comparison is tiny and easy to understand, and
if we can easily add some of the MSVC support into compile without
obfuscating it, then that seems like a no-brainer to me.  Further if
we're already using a similar idiom for Fortran compilers, then I
also think it's a good idea to reuse an already tried and tested
idiom for this problem rather than invent and debug a new one.

To temper all of this, Peter is the one doing all the work here, and
as long as there is no negative impact on the existing supported
platforms of Autotools, I'm happy to help get the support into our
codebase in whatever form he thinks will be easiest for him to apply
and maintain.

Gary V. Vaughan (address@hidden)

reply via email to

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