mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] kbuild: support ccflags-y, asflags-y, and cppflags-y
@ 2020-04-15 18:39 Masahiro Yamada
  2020-04-15 18:39 ` [PATCH 2/2] kbuild: prefix compiler flag variables with KBUILD_ Masahiro Yamada
  2020-04-22  6:00 ` [PATCH 1/2] kbuild: support ccflags-y, asflags-y, and cppflags-y Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2020-04-15 18:39 UTC (permalink / raw)
  To: barebox; +Cc: Masahiro Yamada

Some Makefiles use ccflags-y, but it is not actually supported.
Support ccflags-y, asflags-y, and cppflags-y now.

Remove the workaround in drivers/pci/Makefile.

I did not add ldflags-y for now because arch/mips/Makefile is using
it for a different meaning.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 drivers/pci/Makefile | 2 --
 scripts/Makefile.lib | 9 ++++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 3ca670865..d227619ed 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -5,8 +5,6 @@ obj-y		+= pci.o bus.o pci_iomap.o
 
 ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG
 
-CPPFLAGS += $(ccflags-y)
-
 obj-$(CONFIG_PCI_MVEBU)	+= pci-mvebu.o pci-mvebu-phy.o
 obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o
 obj-$(CONFIG_PCIE_DW) += pcie-designware.o pcie-designware-host.o
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index d4c2ed15b..6ab30c486 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -1,5 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 # Backward compatibility
+asflags-y  += $(EXTRA_AFLAGS)
+ccflags-y  += $(EXTRA_CFLAGS)
+cppflags-y += $(EXTRA_CPPFLAGS)
 always-y   += $(always)
 hostprogs  += $(hostprogs-y) $(hostprogs-m)
 
@@ -128,9 +131,9 @@ basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
 modname_flags  = $(if $(filter 1,$(words $(modname))),\
                  -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
 
-_c_flags       = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(target-stem).o)
-_a_flags       = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(target-stem).o)
-_cpp_flags     = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(target-stem).lds)
+_c_flags       = $(CFLAGS) $(ccflags-y) $(CFLAGS_$(target-stem).o)
+_a_flags       = $(AFLAGS) $(asflags-y) $(AFLAGS_$(target-stem).o)
+_cpp_flags     = $(CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(target-stem).lds)
 
 ifeq ($(CONFIG_UBSAN),y)
 _CFLAGS_UBSAN   = $(eval _CFLAGS_UBSAN := $(CFLAGS_UBSAN))$(_CFLAGS_UBSAN)
-- 
2.25.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-22  6:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 18:39 [PATCH 1/2] kbuild: support ccflags-y, asflags-y, and cppflags-y Masahiro Yamada
2020-04-15 18:39 ` [PATCH 2/2] kbuild: prefix compiler flag variables with KBUILD_ Masahiro Yamada
2020-04-22  6:00 ` [PATCH 1/2] kbuild: support ccflags-y, asflags-y, and cppflags-y Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox