[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] cc-option in Config.mk and -Og



Hi,

I discover an issue with cc-option in Config.mk.

# cc-option: Check if compiler supports first option, else fall back to second. 
                                  
# This is complicated by the fact that unrecognised -Wno-* options:             
                                  
#   (a) are ignored unless the compilation emits a warning; and                 
                                  
#   (b) even then produce a warning rather than an error                        
                                  
# To handle this we do a test compile, passing the option-under-test, on a code 
                                  
# fragment that will always produce a warning (integer assigned to pointer).    
                                  
# We then grep for the option-under-test in the compiler's output, the presence
# of which would indicate an "unrecognized command-line option" warning/error.

Doug submitted a patch to use -Og if that option is available, which
contains such line:

 $(call cc-option-add,CFLAGS,CC,-Og)

However the output of -O option is different from what cc-option
expects:

$  echo 'void*p=1;' | gcc -Og -S -o /dev/null -x c -
cc1: error: argument to '-O' should be a non-negative integer

So that it always thinks -Og is supported.

Any thought on how to solve this?

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.