[build2] guess C compiler type
Boris Kolpackov
boris at codesynthesis.com
Wed Oct 31 12:43:41 UTC 2018
Moldmann Max <MoldmannMax at JohnDeere.com> writes:
> And you might be right that I won't be able to use Build2 with this
> legacy compiler.
You could, just not easily. Specifically, you could either implement
a custom build2 compilation rule for this compiler or write a wrapper
that re-maps GCC options to this compiler's interface. The first one
is quite a bit of work, the second one might not be possible (I am
thinking about /M* options, etc).
> Anyway now it stops here:
> c:\Tools\c166VXv3.0r3/bin\c166.exe -v
> c:\Tools\c166VXv3.0r3/bin\c166.exe --version
> error: unable to obtain c:\Tools\c166VXv3.0r3/bin\c166.exe signature with --version
Strange, based on your previous email, it does support --version option.
The only reason I can think of why this would fail is if it exited with
non-zero code in this case (which would be pretty broken of it).
> Basically it looks to me that we could skip these steps in guess.cxx
> if we have an id override configured?
Even if you specify the compiler id, version, and target overrides,
we still want to obtain the signature since, besides other things,
we use it to calculate the compiler's checksum.
I also think that not supporting something as basic as --version
is pushing the claim that this is a GCC-compatible compiler a bit
too far.
> Also, are we now able to skip the config sub script as we now have
> another way to set the target in the configuration?
The config.sub is (and always was) optional. But, yes, if you specify
the compiler target explicitly, then there should be no reason to use
it.
More information about the users
mailing list