summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Make.defaults2
-rw-r--r--shim.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/Make.defaults b/Make.defaults
index 799a549d..4a82fb9e 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -88,11 +88,13 @@ ifeq ($(ARCH),arm)
TIMESTAMP_LOCATION := 72
endif
+MACRO_PREFIX_MAP := -fmacro-prefix-map="$(TOPDIR)/"="$(DEBUGSRC)"
CFLAGS = -ggdb $(OPTIMIZATIONS) -fno-stack-protector -fno-strict-aliasing -fpic \
-fshort-wchar -Wall -Wsign-compare -Werror -fno-builtin \
-Werror=sign-compare -ffreestanding -std=gnu89 \
$(if $(filter-out undefined,$(FANALYZER)),-fanalyzer,) \
$(if $(filter-out undefined,$(COLOR)),-fdiagnostics-color=always,) \
+ $(MACRO_PREFIX_MAP) \
-I$(shell $(CC) $(ARCH_CFLAGS) -print-file-name=include) \
"-DDEFAULT_LOADER=L\"$(DEFAULT_LOADER)\"" \
"-DDEFAULT_LOADER_CHAR=\"$(DEFAULT_LOADER)\"" \
diff --git a/shim.h b/shim.h
index b97cd407..55b0aa28 100644
--- a/shim.h
+++ b/shim.h
@@ -95,6 +95,10 @@
#endif
#endif
+#ifndef DEBUGSRC
+#define DEBUGSRC L"/usr/src/debug/shim-" VERSIONSTR "." EFI_ARCH
+#endif
+
#define FALLBACK L"\\fb" EFI_ARCH L".efi"
#define MOK_MANAGER L"\\mm" EFI_ARCH L".efi"