This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC] Support for spec predicate expressions
- From: DJ Delorie <dj at redhat dot com>
- To: thorpej at wasabisystems dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Oct 2002 12:15:20 -0500
- Subject: Re: [PATCH/RFC] Support for spec predicate expressions
- References: <20021028120858.E19682@dhcp7.wlan.shagadelic.org> <200210282034.g9SKYdU20886@greed.delorie.com> <20021030084841.F24032@dhcp7.wlan.shagadelic.org>
We should decide in advance if the predicate is allowed to call
do_spec_1 itself (currently, that function is static), and if the
argument to the predicate is allowed to itself be a spec. These
would allow for more computationally extensive specs processing.
Allowing the predicate to call do_spec_1 itself would allow, for
example, arbitrary specs to be determined computationally at run time,
perhaps even by reading a file.
Allowing the arguments to be parsed would allow, for example, passing
the value of a switch to the predicate, like:
%{?foo(%{march=:%*}) {} {}}
We may also need a hook for adding objects to be linked in with xgcc,
for target-specific or language-specific predicates. We currently
have EXTRA_GCC_OBJS but it only has allowance for per-host objects.
This, of course, can be added later.