Skip to contentSkip to conversation

kbuild: use -fmacro-prefix-map for .S sources

PATCH In review Denys Zagorui 2 participants 5 messages Nov 2, 2020 – Nov 23, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 kbuild: use -fmacro-prefix-map for .S sources

Follow-up to a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path") commit. Assembler sources also use __FILE__ macro so this flag should be also apllied to that sources.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index ee2284a5cad2..81e480fc6805 100644
@@ -946,7 +946,7 @@ KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)
 KBUILD_CFLAGS   += $(call cc-option,-Werror=designated-init)
 
 # change __FILE__ to the relative path from the srctree
-KBUILD_CFLAGS	+= $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
+KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
 
 # ensure -fcf-protection is disabled when using retpoline as it is
 # incompatible with -mindirect-branch=thunk-extern
Signature · 1 line
2.19.0.dirty
#1 lore raw
Quoted 23 lines

Follow-up to a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path") commit. Assembler sources also use __FILE__ macro so this flag should be also apllied to that sources.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -2
index ee2284a5cad2..81e480fc6805 100644
@@ -946,7 +946,7 @@ KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)
 KBUILD_CFLAGS   += $(call cc-option,-Werror=designated-init)
 
 # change __FILE__ to the relative path from the srctree
-KBUILD_CFLAGS  += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
+KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
 
 # ensure -fcf-protection is disabled when using retpoline as it is
 # incompatible with -mindirect-branch=thunk-extern
--
Quoted 1 line

2.19.0.dirty

ping

#3 lore raw
Quoted 8 lines · Denys Zagorui -X (dzagorui - GLOBALLOGIC INC at Cisco)
Quoted 2 lines

ping

Any comments on this ?

Thanks,
Denys

Sorry for the delay. Now applied.

I fixed the first sentence:

Follow-up to a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path") commit.

to

Follow-up to commit a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path").

Quoted 2 lines

Assembler sources also use __FILE__
macro so this flag should be also apllied to that sources.

I fixed "apllied" to "applied".

Maybe, "that sources" should be "those sources".

--
Best Regards
Masahiro Yamada

#4 lore raw
Quoted 9 lines

I fixed the first sentence:

Follow-up to a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path") commit.

to

Follow-up to commit a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path").

ok, i see

Quoted 4 lines
Quoted 2 lines

Assembler sources also use __FILE__
macro so this flag should be also apllied to that sources.

I fixed "apllied" to "applied".

thanks, sorry for this typo

Quoted 1 line

Maybe, "that sources" should be "those sources".

yes

Thanks,
Denys