IainS <develo...@sandoe-acoustics.co.uk> writes:

> I need to make a test expanded from ASM_OUTPUT_LABEL_REF that is
> language dependent (on objc/objcxx).
>
> It's not clear where the best/proper place to put the code is.
>
> if I put it in  {stub,act}-objc.c that's fine for c, c++, objc and
> objc++ ...
> ... but it means that stub-objc then needs to be linked with jc1 and
> f951
> ... and anyway the test is target-specific so perhaps it belongs
> better somewhere in config/...
>
> if I put it in config/target.c then the c_dialect variable
> (c_language) is not available from jc1 or  f951 - although,
> obviously, a dummy definition could be made to satisfy the reference.
>
> Is there a "best practice" or "known way" to solve this?

In general this can not be done.  gcc has a pretty strong split
between the frontend and the backend.  You can't refer to frontend
structures in the backend.

It's pretty hard to think of any reason why something as low-level as
ASM_OUTPUT_LABEL_REF would want to look at anything in the frontend.
You are probably working at the wrong level.

Ian

Reply via email to