Index: boot/Makefile.build
===================================================================
--- boot/Makefile.build	(revision 476ac3bc8335cf0648fe97908977f18f66363c2e)
+++ boot/Makefile.build	(revision dd162f6c0efea490687e025a11170cead0616973)
@@ -46,5 +46,6 @@
 COMMON_CFLAGS = $(INCLUDES) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
 	-ffreestanding -fno-builtin -nostdlib -nostdinc \
-	-fexec-charset=UTF-8 -finput-charset=UTF-8 -fno-common
+	-fexec-charset=UTF-8 -finput-charset=UTF-8 -fno-common \
+	-fdebug-prefix-map=$(realpath $(ROOT_PATH))=.
 
 GCC_CFLAGS = -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
Index: kernel/Makefile
===================================================================
--- kernel/Makefile	(revision 476ac3bc8335cf0648fe97908977f18f66363c2e)
+++ kernel/Makefile	(revision dd162f6c0efea490687e025a11170cead0616973)
@@ -84,5 +84,6 @@
 COMMON_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
 	-ffreestanding -fno-builtin -nostdlib -nostdinc \
-	-fexec-charset=UTF-8 -finput-charset=UTF-8 -fno-common
+	-fexec-charset=UTF-8 -finput-charset=UTF-8 -fno-common \
+	-fdebug-prefix-map=$(realpath $(ROOT_PATH))=.
 
 GCC_CFLAGS = -std=gnu99 -Wall -Wextra -Wno-unused-parameter \
Index: uspace/Makefile.common
===================================================================
--- uspace/Makefile.common	(revision 476ac3bc8335cf0648fe97908977f18f66363c2e)
+++ uspace/Makefile.common	(revision dd162f6c0efea490687e025a11170cead0616973)
@@ -236,5 +236,6 @@
 COMMON_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
 	-ffreestanding -fno-builtin -nostdlib -nostdinc -fexec-charset=UTF-8 \
-	-finput-charset=UTF-8 -D__$(ENDIANESS)__ -fno-common
+	-finput-charset=UTF-8 -D__$(ENDIANESS)__ -fno-common \
+	-fdebug-prefix-map=$(realpath $(ROOT_PATH))=.
 
 GCC_CFLAGS = -ffunction-sections -Wall -Wextra -Wno-clobbered \
