Makefile.include (c1144d29f405ce1f4e6ede6482beb3d0d09750c6) Makefile.include (39e7317e37f7f0be366d1201c283f968c17268da)
1# SPDX-License-Identifier: GPL-2.0
2ifneq ($(O),)
3ifeq ($(origin O), command line)
4 dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
5 ABSOLUTE_O := $(shell cd $(O) ; pwd)
6 OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
7 COMMAND_O := O=$(ABSOLUTE_O)
8ifeq ($(objtree),)

--- 18 unchanged lines hidden (view full) ---

27EXTRA_WARNINGS += -Winit-self
28EXTRA_WARNINGS += -Wmissing-declarations
29EXTRA_WARNINGS += -Wmissing-prototypes
30EXTRA_WARNINGS += -Wnested-externs
31EXTRA_WARNINGS += -Wno-system-headers
32EXTRA_WARNINGS += -Wold-style-definition
33EXTRA_WARNINGS += -Wpacked
34EXTRA_WARNINGS += -Wredundant-decls
1# SPDX-License-Identifier: GPL-2.0
2ifneq ($(O),)
3ifeq ($(origin O), command line)
4 dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
5 ABSOLUTE_O := $(shell cd $(O) ; pwd)
6 OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
7 COMMAND_O := O=$(ABSOLUTE_O)
8ifeq ($(objtree),)

--- 18 unchanged lines hidden (view full) ---

27EXTRA_WARNINGS += -Winit-self
28EXTRA_WARNINGS += -Wmissing-declarations
29EXTRA_WARNINGS += -Wmissing-prototypes
30EXTRA_WARNINGS += -Wnested-externs
31EXTRA_WARNINGS += -Wno-system-headers
32EXTRA_WARNINGS += -Wold-style-definition
33EXTRA_WARNINGS += -Wpacked
34EXTRA_WARNINGS += -Wredundant-decls
35EXTRA_WARNINGS += -Wshadow
36EXTRA_WARNINGS += -Wstrict-prototypes
37EXTRA_WARNINGS += -Wswitch-default
38EXTRA_WARNINGS += -Wswitch-enum
39EXTRA_WARNINGS += -Wundef
40EXTRA_WARNINGS += -Wwrite-strings
41EXTRA_WARNINGS += -Wformat
42
43CC_NO_CLANG := $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)

--- 20 unchanged lines hidden (view full) ---

64EXTRA_WARNINGS += -Wstrict-aliasing=3
65endif
66
67# Hack to avoid type-punned warnings on old systems such as RHEL5:
68# We should be changing CFLAGS and checking gcc version, but this
69# will do for now and keep the above -Wstrict-aliasing=3 in place
70# in newer systems.
71# Needed for the __raw_cmpxchg in tools/arch/x86/include/asm/cmpxchg.h
35EXTRA_WARNINGS += -Wstrict-prototypes
36EXTRA_WARNINGS += -Wswitch-default
37EXTRA_WARNINGS += -Wswitch-enum
38EXTRA_WARNINGS += -Wundef
39EXTRA_WARNINGS += -Wwrite-strings
40EXTRA_WARNINGS += -Wformat
41
42CC_NO_CLANG := $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)

--- 20 unchanged lines hidden (view full) ---

63EXTRA_WARNINGS += -Wstrict-aliasing=3
64endif
65
66# Hack to avoid type-punned warnings on old systems such as RHEL5:
67# We should be changing CFLAGS and checking gcc version, but this
68# will do for now and keep the above -Wstrict-aliasing=3 in place
69# in newer systems.
70# Needed for the __raw_cmpxchg in tools/arch/x86/include/asm/cmpxchg.h
71#
72# See https://lkml.org/lkml/2006/11/28/253 and https://gcc.gnu.org/gcc-4.8/changes.html,
73# that takes into account Linus's comments (search for Wshadow) for the reasoning about
74# -Wshadow not being interesting before gcc 4.8.
75
72ifneq ($(filter 3.%,$(MAKE_VERSION)),) # make-3
73EXTRA_WARNINGS += -fno-strict-aliasing
76ifneq ($(filter 3.%,$(MAKE_VERSION)),) # make-3
77EXTRA_WARNINGS += -fno-strict-aliasing
78EXTRA_WARNINGS += -Wno-shadow
79else
80EXTRA_WARNINGS += -Wshadow
74endif
75
76ifneq ($(findstring $(MAKEFLAGS), w),w)
77PRINT_DIR = --no-print-directory
78else
79NO_SUBDIR = :
80endif
81

--- 43 unchanged lines hidden ---
81endif
82
83ifneq ($(findstring $(MAKEFLAGS), w),w)
84PRINT_DIR = --no-print-directory
85else
86NO_SUBDIR = :
87endif
88

--- 43 unchanged lines hidden ---