[gcc front end] add options

Andi Hellmund mail@andihellmund.com
Tue Feb 1 16:40:00 GMT 2011


On 2/1/2011 4:43 PM, charfi asma wrote:
> Hello,
>
> I built a new gcc front end
> I would like to use the -fopenmp options when compiling my source file
> I could use the C front end options like -S -fdump-tree-all -O*, .... but when I
> use -fopenmp I get this error:
>
> uml1: warning: command line option ‘-fopenmp’ is valid for
> C/C++/Fortran/ObjC/ObjC++ but not for  [enabled by default]
>
> should I modify my lang-specs.h ? If yes what kind of modification ?
>
> here is its content:
>
> {".uml", "@uml", 0, 1, 0},
> {"@uml", "uml1 %i %(invoke_as)", 0, 1, 0},
> {"@uml",  "uml1 %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}",
>      0, 1, 0},
>
>
> thank you very much
>
> Asma
>    
Hey Asma,

I think adding -fopenmp to lang-specs.h wouldn't help since the error 
message comes from uml1 (compiler proper). And by the way, the -f* 
options are usually already included in %{cc1_options}. The original 
definition of the -fopenmp option is available in c.opt (in c-family 
directory of 4.6), but please have a look at the lang.opt file of the 
Fortran front-end for details. This is how this is implemented there:

fopenmp
Fortran
; Documented in C

This then allows the Fortran front-end to "reuse" the definition of the 
C (family) front-ends.

Best regards,
Andre-Marcel



More information about the Gcc-help mailing list