~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/Makefile.debug

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 DEBUG_CFLAGS    :=
  2 DEBUG_RUSTFLAGS :=
  3 
  4 debug-flags-y   := -g
  5 
  6 ifdef CONFIG_DEBUG_INFO_SPLIT
  7 DEBUG_CFLAGS    += -gsplit-dwarf
  8 endif
  9 
 10 debug-flags-$(CONFIG_DEBUG_INFO_DWARF4) += -gdwarf-4
 11 debug-flags-$(CONFIG_DEBUG_INFO_DWARF5) += -gdwarf-5
 12 ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_AS_IS_GNU),yy)
 13 # Clang does not pass -g or -gdwarf-* option down to GAS.
 14 # Add -Wa, prefix to explicitly specify the flags.
 15 KBUILD_AFLAGS   += $(addprefix -Wa$(comma), $(debug-flags-y))
 16 endif
 17 DEBUG_CFLAGS    += $(debug-flags-y)
 18 KBUILD_AFLAGS   += $(debug-flags-y)
 19 
 20 ifdef CONFIG_DEBUG_INFO_DWARF4
 21 DEBUG_RUSTFLAGS += -Zdwarf-version=4
 22 else ifdef CONFIG_DEBUG_INFO_DWARF5
 23 DEBUG_RUSTFLAGS += -Zdwarf-version=5
 24 endif
 25 
 26 ifdef CONFIG_DEBUG_INFO_REDUCED
 27 DEBUG_CFLAGS    += -fno-var-tracking
 28 DEBUG_RUSTFLAGS += -Cdebuginfo=1
 29 ifdef CONFIG_CC_IS_GCC
 30 DEBUG_CFLAGS    += -femit-struct-debug-baseonly
 31 endif
 32 else
 33 DEBUG_RUSTFLAGS += -Cdebuginfo=2
 34 endif
 35 
 36 ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZLIB
 37 DEBUG_CFLAGS    += -gz=zlib
 38 DEBUG_RUSTFLAGS += -Zdebuginfo-compression=zlib
 39 KBUILD_AFLAGS   += -gz=zlib
 40 KBUILD_LDFLAGS  += --compress-debug-sections=zlib
 41 else ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZSTD
 42 DEBUG_CFLAGS    += -gz=zstd
 43 DEBUG_RUSTFLAGS += -Zdebuginfo-compression=zstd
 44 KBUILD_AFLAGS   += -gz=zstd
 45 KBUILD_LDFLAGS  += --compress-debug-sections=zstd
 46 endif
 47 
 48 KBUILD_CFLAGS   += $(DEBUG_CFLAGS)
 49 export DEBUG_CFLAGS
 50 
 51 KBUILD_RUSTFLAGS += $(DEBUG_RUSTFLAGS)
 52 export DEBUG_RUSTFLAGS

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php