aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.debug
blob: 107db997ce38991b9503fb68402b3ec7da6ea850 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
DEBUG_CFLAGS	:=
DEBUG_RUSTFLAGS	:=

debug-flags-y	:= -g

ifdef CONFIG_DEBUG_INFO_SPLIT
DEBUG_CFLAGS	+= -gsplit-dwarf
endif

debug-flags-$(CONFIG_DEBUG_INFO_DWARF4)	+= -gdwarf-4
debug-flags-$(CONFIG_DEBUG_INFO_DWARF5)	+= -gdwarf-5
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_AS_IS_GNU),yy)
# Clang does not pass -g or -gdwarf-* option down to GAS.
# Add -Wa, prefix to explicitly specify the flags.
KBUILD_AFLAGS	+= $(addprefix -Wa$(comma), $(debug-flags-y))
endif
DEBUG_CFLAGS	+= $(debug-flags-y)
KBUILD_AFLAGS	+= $(debug-flags-y)

ifdef CONFIG_DEBUG_INFO_DWARF4
DEBUG_RUSTFLAGS	+= -Zdwarf-version=4
else ifdef CONFIG_DEBUG_INFO_DWARF5
DEBUG_RUSTFLAGS	+= -Zdwarf-version=5
endif

ifdef CONFIG_DEBUG_INFO_REDUCED
DEBUG_CFLAGS	+= -fno-var-tracking
DEBUG_RUSTFLAGS	+= -Cdebuginfo=1
ifdef CONFIG_CC_IS_GCC
DEBUG_CFLAGS	+= -femit-struct-debug-baseonly
endif
else
DEBUG_RUSTFLAGS	+= -Cdebuginfo=2
endif

ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZLIB
DEBUG_CFLAGS	+= -gz=zlib
DEBUG_RUSTFLAGS	+= -Zdebuginfo-compression=zlib
KBUILD_AFLAGS	+= -gz=zlib
KBUILD_LDFLAGS	+= --compress-debug-sections=zlib
else ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZSTD
DEBUG_CFLAGS	+= -gz=zstd
DEBUG_RUSTFLAGS	+= -Zdebuginfo-compression=zstd
KBUILD_AFLAGS	+= -gz=zstd
KBUILD_LDFLAGS	+= --compress-debug-sections=zstd
endif

KBUILD_CFLAGS	+= $(DEBUG_CFLAGS)
export DEBUG_CFLAGS

KBUILD_RUSTFLAGS += $(DEBUG_RUSTFLAGS)
export DEBUG_RUSTFLAGS
>mfd: wm831x-spi: Make it explicitly non-modularPaul Gortmaker1-22/+2 2019-02-01mfd: tps80031: Make it explicitly non-modularPaul Gortmaker1-35/+2 2019-02-01mfd: tps65910: Make it explicitly non-modularPaul Gortmaker1-17/+1 2019-02-01mfd: tps65090: Make it explicitly non-modularPaul Gortmaker1-25/+5 2019-02-01mfd: syscon: Make it explicitly non-modularPaul Gortmaker1-11/+1 2019-02-01mfd: sta2x11: Drop unused MODULE_ tags from non-modular codePaul Gortmaker1-6/+4 2019-02-01mfd: rc5t583: Make it explicitly non-modularPaul Gortmaker1-14/+0 2019-02-01mfd: max8925-core: Drop unused MODULE_ tags from non-modular codePaul Gortmaker1-6/+1 2019-02-01mfd: htc-i2cpld: Make it explicitly non-modularPaul Gortmaker1-17/+1 2019-02-01mfd: db8500-prcmu: Drop unused MODULE_ tags from non-modular codePaul Gortmaker1-6/+4 2019-02-01mfd: as3711: Make it explicitly non-modularPaul Gortmaker1-14/+0 2019-02-01mfd: adp5520: Make it explicitly non-modularPaul Gortmaker1-23/+7 2019-02-01mfd: aat2870-core: Make it explicitly non-modularPaul Gortmaker1-37/+3 2019-02-01platform/chrome: cros_ec_lightbar: Instantiate only if the EC has a lightbarEnric Balletbo i Serra1-35/+18 2019-02-01mfd / platform: cros_ec_vbc: Instantiate only if the EC has a VBC NVRAMEnric Balletbo i Serra2-17/+18 2019-02-01mfd / platform: cros_ec: Move device sysfs attributes to its own driverEnric Balletbo i Serra8-17/+81 2019-02-01mfd / platform: cros_ec: Move debugfs attributes to its own driverEnric Balletbo i Serra5-68/+56 2019-02-01mfd / platform: cros_ec: Move vbc attributes to its own driverEnric Balletbo i Serra6-4/+62 2019-02-01mfd / platform: cros_ec: Move lightbar attributes to its own driverEnric Balletbo i Serra7-41/+173 2019-02-01mfd / platform: cros_ec: Use devm_mfd_add_devicesEnric Balletbo i Serra5-46/+3 2019-01-21Linux 5.0-rc3v5.0-rc3Linus Torvalds1-1/+1 2019-01-20pstore/ram: Avoid allocation and leak of platform dataKees Cook1-6/+3 2019-01-20gcc-plugins: arm_ssp_per_task_plugin: fix for GCC 9+Ard Biesheuvel1-0/+18 2019-01-20gcc-plugins: arm_ssp_per_task_plugin: sign extend the SP maskArd Biesheuvel1-2/+3 2019-01-21fix int_sqrt64() for very large numbersFlorian La Roche1-1/+1 2019-01-20x86: uaccess: Inhibit speculation past access_ok() in user_access_begin()Will Deacon1-1/+1 2019-01-20bpf: in __bpf_redirect_no_mac pull mac only if presentWillem de Bruijn2-10/+12 2019-01-19virtio_net: bulk free tx skbsMichael S. Tsirkin1-6/+6 2019-01-19clang-format: Update .clang-format with the latest for_each macro listJason Gunthorpe1-1/+42 2019-01-19net: phy: phy driver features are mandatoryCamelia Groza2-2/+7 2019-01-19isdn: avm: Fix string plus integer warning from ClangNathan Chancellor1-1/+1 2019-01-19powerpc: chrp: Use of_node_is_type to access device_typeRob Herring1-2/+1 2019-01-18net/mlx5e: Fix cb_ident duplicate in indirect block registerEli Britstein1-13/+16 2019-01-18net/mlx5e: Fix wrong (zero) TX drop counter indication for representorTariq Toukan1-0/+1 2019-01-18net/mlx5e: Fix wrong error code return on FEC query failureShay Agroskin1-1/+4 2019-01-18net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet framesCong Wang1-0/+13 2019-01-18tools: bpftool: Cleanup license messThomas Gleixner2-11/+1 2019-01-18bpf: fix inner map masking to prevent oob under speculationDaniel Borkmann1-2/+15