From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: nickc@cygnus.com (Nick Clifton) Cc: ovidiu@cup.hp.com, pb@nexus.co.uk, egcs@egcs.cygnus.com Subject: Re: Objective C and STRUCTURE_SIZE_BOUNDARY Date: Fri, 28 May 1999 09:38:00 -0000 Message-id: <199905281637.RAA02035@phal.cygnus.co.uk> References: <199905281619.JAA08587@elmo.cygnus.com> X-SW-Source: 1999-05/msg00812.html > : 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} \ From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: nickc@cygnus.com (Nick Clifton) Cc: ovidiu@cup.hp.com, pb@nexus.co.uk, egcs@egcs.cygnus.com Subject: Re: Objective C and STRUCTURE_SIZE_BOUNDARY Date: Mon, 31 May 1999 21:36:00 -0000 Message-ID: <199905281637.RAA02035@phal.cygnus.co.uk> References: <199905281619.JAA08587@elmo.cygnus.com> X-SW-Source: 1999-05n/msg00813.html Message-ID: <19990531213600.2y5KRDkPfwLDb5qiBhrWwkswtqAzswjmJKtoIbftwSY@z> > : 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} \