gcc specs

Robert Connolly cendres at videotron.ca
Sun Mar 14 19:44:33 PST 2004


Same example, but maybe this one is more clear.

This compiles for x86:
#define CC1_PREPEND_SPEC "%(cc1_cpu)"
#undef CC1_SPEC
#define CC1_SPEC CC1_PREPEND_SPEC STD_SSP_EXCLUDE(CC1_SSP)

This would work for any arch, but it doesn't compile:
#define CC1_PREPEND_SPEC CC1_SPEC
#undef CC1_SPEC
#define CC1_SPEC CC1_PREPEND_SPEC STD_SSP_EXCLUDE(CC1_SSP)

How else can it store a copy of CC1_SPEC before it gets redefined? It sorta 
looks dangerous if it ever looped, the length of cc1_spec would never stop 
growing. But this header begins with:
#ifndef SSP_SPEC_H
#define SSP_SPEC_H
so it doesn't look like it would ever repeat itself.



More information about the hlfs-dev mailing list