Telling plugins about build,host,target triplet strings
Joseph S. Myers
joseph@codesourcery.com
Wed Sep 5 15:14:00 GMT 2012
On Wed, 5 Sep 2012, Basile Starynkevitch wrote:
> const char* plugin_build_triplet (void);
I think if you want to tell the plugin about the build triplet in this
sort of way, there is some fundamental confusion involved. A compiler
built for a given host and target pair should behave the same independent
of what system it was built on (what the build triplet was) - and
similarly, such a compiler could use plugins built on different systems
from the build system on which the compiler itself was built (whereas all
plugins would need to be configured for the same host and target as the
compiler).
The target triplet is proper information for a plugin to enquire about.
The build triplet definitely is not. The host triplet probably isn't
either (compilers for the same target, and different hosts, should also
behave the same) although there may be some limited use cases where your
plugin is explicitly not following the conventions of GCC proper regarding
host-independence. Your use case for testing sounds like something where
the build infrastructure for your plugin should be determining what to do
depending on the triplets, rather than the plugin itself knowing about
them.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list