From 3b90ddfefea36d9f7f08ff11cd0cb099aa32b02b Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Wed, 28 Feb 2024 08:37:53 +0000 Subject: [PATCH] 8326685: Linux builds not reproducible if two builds configured in different build folders Reviewed-by: ihse, erikj --- make/autoconf/flags-cflags.m4 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 74480c56046..efc8025a074 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -115,6 +115,11 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS], # Add debug prefix map gcc system include paths, as they cause # non-deterministic debug paths depending on gcc path location. DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS + + # Add debug prefix map for OUTPUTDIR to handle the scenario when + # it is not located within WORKSPACE_ROOT + outputdir_slash="${OUTPUTDIR%/}/" + DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS -fdebug-prefix-map=${outputdir_slash}=" ] ) fi