[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] tools: detect appropriate debug optimization level
On Tue, Apr 26, 2016 at 09:38:45AM -0500, Doug Goldstein wrote: > When building debug use -Og as the optimization level if its available, > otherwise retain the use of -O0. -Og has been added by GCC to enable all > optimizations that to not affect debugging while retaining full > debugability. > > Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx> I think Ian's comment has been addressed in this version: Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> I plan to accept this patch for 4.7, the risk is rather low anyway. I will wait a bit before committing in case Ian has more to say. > --- > change since v2: > - switch back to cc-option-add to not call cc-option on every invocation > change since v1: > - switch to cc-option to only specify -O0 if -Og isn't supported > --- > tools/Rules.mk | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/Rules.mk b/tools/Rules.mk > index 9ef0b47..1b79a6e 100644 > --- a/tools/Rules.mk > +++ b/tools/Rules.mk > @@ -138,6 +138,7 @@ SHLIB_libxenvchan = $(SHDEPS_libxenvchan) > -Wl,-rpath-link=$(XEN_LIBVCHAN) > ifeq ($(debug),y) > # Disable optimizations and enable debugging information for macros > CFLAGS += -O0 -g3 > +$(call cc-option-add,CFLAGS,CC,-Og) > # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>. > PY_CFLAGS += $(PY_NOOPT_CFLAGS) > endif > -- > 2.7.3 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |