[Info-vax] C and C++ and clanger-free clanging
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Fri Jul 5 16:47:29 EDT 2019
On 2019-07-04 22:13:27 +0000, Dave Froble said:
> On 7/4/2019 5:00 PM, Stephen Hoffman wrote:
>> On 2019-07-04 14:50:09 +0000, Dave Froble said:
>>
>>> Well, where else would one reasonably put such?
>>
>> Where else? On OpenVMS, in the build procedures.
>>
>> That's fairly common, too.
>
> If you lose the build procedure, then what? Lots of work to figure out
> what's required.
The build procedures and the compilers are part of your source code pool.
>> Embedding the settings directly into the source code tends to be
>> somewhat brittle.
>
> How so? The settings are for the particular source code, right? What
> could be better than keeping them together?
If you're building conditionally for a particular target Alpha
processor and have all that in the source code—which I don't think is
even possible with BASIC—you'll have to edit the settings in the source
code.
BASIC doesn't have 64-bit support either, but that's another case where
I've used conditional builds for 32- and 64-bit builds with C code.
BASIC support for conditionals—%VARIANT mixed with %IF-%THEN-%ELSE-%END
%IF—is reasonable, but that still means /VARIANT differences in the
build procedures to use that to control the build.
BASIC /ARCHITECTURE and to a lesser extent /OPTIMIZE, too. (Oddly, I
don't think there's a way to sniff the compiler settings, short of
hacking around this with the variant stuff.)
Same source code, but built differently for different targets.
>> Works well, right up until you're dealing with architecture-specific or
>> build-specific or version-specific
>> switches/controls/settings/qualifiers.
>
> Guess I don't get out much. None of that makes any sense to me.
VSI reports performance improvements with an EV6 build, and I've seen
similar in some of the local code.
>> I've used the C preprocessor to build Fortran code, as have various
>> other folks.
>
> Nor does that make sense to me.
Think of it as a variant to editing the source code under the control
of the build procedure. Pun fully intended, of course. Fortran
preprocessing is... lacking.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list