This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Objective C and STRUCTURE_SIZE_BOUNDARY
- To: nickc at cygnus dot com (Nick Clifton)
- Subject: Re: Objective C and STRUCTURE_SIZE_BOUNDARY
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Fri, 28 May 1999 17:37:56 +0100 (BST)
- Cc: ovidiu at cup dot hp dot com, pb at nexus dot co dot uk, egcs at egcs dot cygnus dot com
> : Is there a way to find out at runtime what was the option passed to
> : the compiler at the build time?
>
> Sadly no. This feature was never really intended for widespread use.
> Some people have found that changing the default boundary (from 32 to
> 8) produces better code *under certain circumstances*. The best way
> to use this feature is to use the default value whenever possible, and
> to only use the non-default value when speed is critical and access to
> the affected structures can be localised to user controlled source
> files.
Assuming you only support -mstructure_size_boundary=8 to set it to
eight (i.e. no whitespace, zeroes, other number bases or trailing junk),
you can do:
#define STRUCTURE_SIZE_BOUNDARY __ARM_STRUCTURE_SIZE_BOUNDARY__
#undef __ARM_STRUCTURE_SIZE_BOUNDARY__ /* Just in caers we build a native... */
#define __ARM_STRUCTURE_SIZE_BOUNDARY__ arm_structure_size_boundary
and in CPP_SPECS:
%{structure_size_boundary=8:!-D__ARM_STRUCTURE_SIZE_BOUNDARY__=8} \
%{!structure_size_boundary=8:!-D__ARM_STRUCTURE_SIZE_BOUNDARY__=32} \