diff options
Diffstat (limited to 'tools/scripts/Makefile.include')
| -rw-r--r-- | tools/scripts/Makefile.include | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 621578aa12d6..fc74db62fef4 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include | |||
| @@ -43,6 +43,15 @@ ifneq ($(CC), clang) | |||
| 43 | EXTRA_WARNINGS += -Wstrict-aliasing=3 | 43 | EXTRA_WARNINGS += -Wstrict-aliasing=3 |
| 44 | endif | 44 | endif |
| 45 | 45 | ||
| 46 | # Hack to avoid type-punned warnings on old systems such as RHEL5: | ||
| 47 | # We should be changing CFLAGS and checking gcc version, but this | ||
| 48 | # will do for now and keep the above -Wstrict-aliasing=3 in place | ||
| 49 | # in newer systems. | ||
| 50 | # Needed for the __raw_cmpxchg in tools/arch/x86/include/asm/cmpxchg.h | ||
| 51 | ifneq ($(filter 3.%,$(MAKE_VERSION)),) # make-3 | ||
| 52 | EXTRA_WARNINGS += -fno-strict-aliasing | ||
| 53 | endif | ||
| 54 | |||
| 46 | ifneq ($(findstring $(MAKEFLAGS), w),w) | 55 | ifneq ($(findstring $(MAKEFLAGS), w),w) |
| 47 | PRINT_DIR = --no-print-directory | 56 | PRINT_DIR = --no-print-directory |
| 48 | else | 57 | else |
