Skip to content

Commit eb9b9a6

Browse files
thesamesamacmel
authored andcommitted
tools: Drop nonsensical -O6
-O6 is very much not-a-thing. Really, this should've been dropped entirely in 49b3cd3 ("tools: Set the maximum optimization level according to the compiler being used") instead of just passing it for not-Clang. Just collapse it down to -O3, instead of "-O6 unless Clang, in which case -O3". GCC interprets > -O3 as -O3. It doesn't even interpret > -O3 as -Ofast, which is a good thing, given -Ofast has specific (non-)requirements for code built using it. So, this does nothing except look a bit daft. Remove the silliness and also save a few lines in the Makefiles accordingly. Reviewed-by: Ian Rogers <[email protected]> Reviewed-by: Jesper Juhl <[email protected]> Signed-off-by: Sam James <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Bill Wendling <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Justin Stitt <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/4f01524fa4ea91c7146a41e26ceaf9dae4c127e4.1725821201.git.sam@gentoo.org Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 89c0a55 commit eb9b9a6

File tree

4 files changed

+2
-16
lines changed

4 files changed

+2
-16
lines changed

tools/lib/api/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
3131
CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -U_FORTIFY_SOURCE -fPIC
3232

3333
ifeq ($(DEBUG),0)
34-
ifeq ($(CC_NO_CLANG), 0)
3534
CFLAGS += -O3
36-
else
37-
CFLAGS += -O6
38-
endif
3935
endif
4036

4137
ifeq ($(DEBUG),0)

tools/lib/subcmd/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ endif
3838

3939
ifeq ($(DEBUG),1)
4040
CFLAGS += -O0
41-
else ifeq ($(CC_NO_CLANG), 0)
42-
CFLAGS += -O3
4341
else
44-
CFLAGS += -O6
42+
CFLAGS += -O3
4543
endif
4644

4745
# Treat warnings as errors unless directed not to

tools/lib/symbol/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
3131
CFLAGS += -ggdb3 -Wall -Wextra -std=gnu11 -U_FORTIFY_SOURCE -fPIC
3232

3333
ifeq ($(DEBUG),0)
34-
ifeq ($(CC_NO_CLANG), 0)
3534
CFLAGS += -O3
36-
else
37-
CFLAGS += -O6
38-
endif
3935
endif
4036

4137
ifeq ($(DEBUG),0)

tools/perf/Makefile.config

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,7 @@ endif
233233

234234
ifeq ($(DEBUG),0)
235235
CORE_CFLAGS += -DNDEBUG=1
236-
ifeq ($(CC_NO_CLANG), 0)
237-
CORE_CFLAGS += -O3
238-
else
239-
CORE_CFLAGS += -O6
240-
endif
236+
CORE_CFLAGS += -O3
241237
else
242238
CORE_CFLAGS += -g
243239
CXXFLAGS += -g

0 commit comments

Comments
 (0)