https://github.com/torvalds/linux
Raw File
Tip revision: 11a48a5a18c63fd7621bb050228cebf13566e4d8 authored by Linus Torvalds on 16 February 2020, 21:16:59 UTC
Linux 5.6-rc2
Tip revision: 11a48a5
Makefile.ubsan
# SPDX-License-Identifier: GPL-2.0
ifdef CONFIG_UBSAN
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=shift)
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero)
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable)
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow)
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds)
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size)
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=bool)
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=enum)

ifdef CONFIG_UBSAN_ALIGNMENT
      CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment)
endif

      # -fsanitize=* options makes GCC less smart than usual and
      # increase number of 'maybe-uninitialized false-positives
      CFLAGS_UBSAN += $(call cc-option, -Wno-maybe-uninitialized)
endif
back to top