This is the mail archive of the 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: [patch] Separate {OS,CPU}_CPP_BUILTINS macros into C-family and language-independent macros


> -----Original Message-----
> From: FX [] 
> Sent: Wednesday, November 03, 2010 3:27 PM
> To:; gfortran List
> Cc: Michael Meissner; Rainer Orth;; 
>; Weddington, Eric
> Subject: [patch] Separate {OS,CPU}_CPP_BUILTINS macros into 
> C-family and language-independent macros
> See below for the description of the patch; this take n+1 
> incorporates suggestions by Michael Meissner and Rainer Orth, 
> with the following exceptions:
>   -- As avr.c includes new headers (cpplib.h and 
> cppbuiltin.h), I wanted to update its dependencies in the 
> target configuration file (t-avr), but to my surprise, this 
> file doesn't contain any mention of avr.o. In fact, I failed 
> to find any by grepping the whole tree, so I'm a little 
> unsure how this can work (and apparently it does). Could the 
> maintainers help me here?

Hmm. AFAICT, in looking through the history of that file, the first time that it contained any dependency information was June 23, 2009 (revision 148868) and it wasn't for avr.o. I don't think it ever contained dependency information for avr.o. 

> The attached patch fixes PR 42954: when Fortran moved to 
> using libcpp directly from the front-end (instead of calling 
> cc1 to do its preprocessing), we lost all target-specific CPP 
> built-in macros. The issue is that part of the code in 
> C-only flags, and thus cannot be moved to a directory outside 
> gcc/c-family/.
> The patch moves this C-only code to specific 
> TARGET_CPU_CPP_BUILTINS_CFAMILY macros. I manually audited 
> all the targets in config/ twice, to check that I did not 
> leave any code behind. I have bootstrapped and regtested an 
> all-language compiler on x86_64-linux and i686-darwin. I have 
> also built C and Fortran cross-compilers (make all-gcc && 
> make fortran) for the following targets (which cover all 
> gcc/config/ files changed):
> avr-elf
> In all cases, the cross-compiler built successfully and 
> seemed to work. In each case, I checked a few of the 
> target-specific macros (but did not check all of them).

That's news to me: I didn't know that you could now build the Fortran compiler for the AVR. (Not that anyone would seriously use it, but.. you never know.) Last I heard, the Fortran FE couldn't be built for the AVR because that port only has 32-bit doubles. See gcc bug #34040.

Thanks for doing this work. :-)

Eric Weddington

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