mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
toolchain/toolchain-wrapper: reproducible builds: handle debug info paths in GCC <7
In GCC8 the flag -ffile-prefix-map handles cleaning up both the __FILE__ macros and the debug info paths. In GCC7 or below we are manually handling the __FILE__ macros, but not debug info paths. Use -fdebug-prefix-map to clean them up. This option exists since GCC 4.3.0, which is our minimal supported GCC version. See for more detail: https://reproducible-builds.org/docs/build-path/ Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle (Essensium/Mind)
parent
cd84e1bcf9
commit
409e30a70f
@@ -26,6 +26,7 @@ TOOLCHAIN_WRAPPER_OPTS += -Wl,--build-id=none
|
|||||||
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
|
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
|
||||||
TOOLCHAIN_WRAPPER_OPTS += -ffile-prefix-map=$(BASE_DIR)=buildroot
|
TOOLCHAIN_WRAPPER_OPTS += -ffile-prefix-map=$(BASE_DIR)=buildroot
|
||||||
else
|
else
|
||||||
|
TOOLCHAIN_WRAPPER_OPTS += -fdebug-prefix-map=$(BASE_DIR)=buildroot
|
||||||
TOOLCHAIN_WRAPPER_OPTS += -D__FILE__=\"\" -D__BASE_FILE__=\"\" -Wno-builtin-macro-redefined
|
TOOLCHAIN_WRAPPER_OPTS += -D__FILE__=\"\" -D__BASE_FILE__=\"\" -Wno-builtin-macro-redefined
|
||||||
endif
|
endif
|
||||||
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_7),)
|
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_7),)
|
||||||
|
|||||||
Reference in New Issue
Block a user