From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Doug Goldstein <cardoe@cardoe.com>, Wei Liu <wei.liu2@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: cc-option in Config.mk and -Og
Date: Fri, 6 May 2016 16:58:00 +0100 [thread overview]
Message-ID: <20160506155800.GO2111@citrix.com> (raw)
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@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2016-05-06 15:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 15:58 Wei Liu [this message]
2016-05-06 16:00 ` cc-option in Config.mk and -Og Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160506155800.GO2111@citrix.com \
--to=wei.liu2@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=cardoe@cardoe.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.