lkml.org 
[lkml]   [2013]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 07/52] tools/perf/build: Split out feature check: 'volatile-register-var'
    Date
    On Tue,  8 Oct 2013 12:10:37 +0200, Ingo Molnar wrote:
    > -ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var,-Wvolatile-register-var),y)
    > +ifeq ($(feature-volatile-register-var), 1)
    > CFLAGS += -Wvolatile-register-var
    > endif
    >
    > diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
    > index 46b7650..5693299 100644
    > --- a/tools/perf/config/feature-checks/Makefile
    > +++ b/tools/perf/config/feature-checks/Makefile
    > @@ -3,6 +3,7 @@ FILES= \
    > test-hello \
    > test-stackprotector-all \
    > test-stackprotector \
    > + test-volatile-register-var \
    > test-libnuma
    >
    > CC := $(CC) -MD
    > @@ -22,6 +23,9 @@ test-stackprotector-all:
    > test-stackprotector:
    > $(BUILD) -Werror -fstack-protector
    >
    > +test-volatile-register-var:
    > + $(BUILD) -Werror -Wvolatile-register-var

    I'm not sure this test is necessary at all.

    The gcc manpage says this warning is enabled by -Wall, and we add -Wall
    to CFLAGS before doing feature checks. So all gcc versions that support
    -Wvolatile-register-var enables it by default without this check and
    older gcc versions will always fail the feature check.

    Thanks,
    Namhyung


    \
     
     \ /
      Last update: 2013-10-10 08:21    [W:3.913 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site