This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Convert option variables to structure elements


On Thu, 30 Sep 2010, Steve Ellcey wrote:

> It looks like this patch (r164723) broke the build on hppa2.0w-hp-hpux11.11.
> I am failing with:
> 
> 
> In file included from ./tm.h:29:0,
> >                  from /proj/opensrc/nightly/src/trunk/gcc/c-lang.c:26:
> > /proj/opensrc/nightly/src/trunk/gcc/defaults.h:345:6: error: token "." is not valid in preprocessor expressions
> > /proj/opensrc/nightly/src/trunk/gcc/defaults.h:415:43: error: token "." is not valid in preprocessor expressions
> 
> The lines in defaults.h contain:
> 
> # if SUPPORTS_WEAK
> and
> #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
> 
> And looking through the defines I see:
> 
> gcc/config/pa/som.h:#define SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS)
> obj_gcc/gcc/options.h:#define target_flags global_options.x_target_flags
> obj_gcc/gcc/options.h:#define MASK_GAS (1 << 4)
> obj_gcc/gcc/options.h:#define TARGET_GAS ((target_flags & MASK_GAS) != 0)
> 
> I am not sure how to address this.

As with HARD_FRAME_POINTER_IS_FRAME_POINTER and 
HARD_FRAME_POINTER_IS_ARG_POINTER, and with the powerpc64-linux fix 
(r164764), if a target macro is used in preprocessor conditionals then it 
must not depend on command-line options, and if it does at present you 
need to define a new macro that does not.  Such dependencies have never 
made much logical sense, but now they break the build rather than quietly 
treating target_flags as 0.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]