gcc specs

Christopher James Coleman ug97cjc at cs.bham.ac.uk
Sun Mar 14 13:21:26 PST 2004


On Sun, 14 Mar 2004, Robert Connolly wrote:
> static char CC1_PREPEND_SPEC[] = CC1_SPEC;
> #undef CC1_SPEC
> #define CC1_SPEC CC1_PREPEND_SPEC STD_SSP_EXCLUDE(CC1_SSP)

I am guessing you are trying to re-assign the array pointer referred to as
`CC1_PREPEND_SPEC' to instead point to the list that will be created by
the `STD_SSP_EXCLUDE' macro, is this correct?

I am not too knowledgeable about GCC in particular, but I assume that you
have seen the definition, ``static char CC1_PREPEND_SPEC[] = CC1_SPEC;'',
somewhere else in the GCC source code? ( Sorry if I am way off here, I am
purely speculating ). It does not seem as though this will be the correct
route to take ( for a start, you will not be able to write or overwrite
that variable from a header - you will most likely need to patch the file
you are gaining references from; or is there more code? ). You will
probably need to make this replacement directly into the C file.

I am fairly sure that the macro definition you have made for `CC1_SPEC' is
not valid CPP syntax for a #define. I think that CPP's #define is purely
``#define MACRO_NAME MACRO''. The macros are really working on a slightly
elaborate search-and-replace basis.

I have coursework due at the moment, so I do not have time to look through
the source in order to offer you a solution. However, I hope I have been
able to offer some guidance. Reply if I am on the right lines, but you
need more help - as I am still checking my email every now and then.

- chris



More information about the hlfs-dev mailing list