From 986b9fbce82698421b8bd14a4224f4c071b6c57e Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 3 Dec 2014 09:03:37 +0200 Subject: [PATCH 1/2] openvswitch: switch patch with patch from ovs trunk After a few discussions with the guys working on OpenVSwitch they've recommended we use the EXTRA_CFLAGS env var for setting flags for the kernel module. They've updated the trunk with a patch to accomodate that. That patch is also in this commit, and replaces a patch that I proposed. Signed-off-by: Alexandru Ardelean --- ...lags-y-instead-of-deprecated-EXTRA_C.patch | 41 +++++++++++++++++++ ...dd-KCFLAGS-var-to-modules-Makefile.m.patch | 39 ------------------ 2 files changed, 41 insertions(+), 39 deletions(-) create mode 100644 net/openvswitch/patches/0004-datapath-Use-ccflags-y-instead-of-deprecated-EXTRA_C.patch delete mode 100644 net/openvswitch/patches/0004-datapath-linux-add-KCFLAGS-var-to-modules-Makefile.m.patch diff --git a/net/openvswitch/patches/0004-datapath-Use-ccflags-y-instead-of-deprecated-EXTRA_C.patch b/net/openvswitch/patches/0004-datapath-Use-ccflags-y-instead-of-deprecated-EXTRA_C.patch new file mode 100644 index 000000000..95891a1a5 --- /dev/null +++ b/net/openvswitch/patches/0004-datapath-Use-ccflags-y-instead-of-deprecated-EXTRA_C.patch @@ -0,0 +1,41 @@ +From 36fd4f214f9ba74aaf0e5fb3e4ba271b946a1550 Mon Sep 17 00:00:00 2001 +From: Thomas Graf +Date: Wed, 26 Nov 2014 15:52:31 +0100 +Subject: [PATCH] datapath: Use ccflags-y instead of deprecated EXTRA_CFLAGS + +This allows users to pass in additional compiler flags through the +environment variable EXTRA_CFLAGS, e.g. + + make EXTRA_CFLAGS=-Wno-error=foo V=1 + +Reported-by: Alexandru Ardelean +Signed-off-by: Thomas Graf +Acked-by: Pravin B Shelar +--- + datapath/linux/Kbuild.in | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/datapath/linux/Kbuild.in b/datapath/linux/Kbuild.in +index 6f6f65f..cb98c11 100644 +--- a/datapath/linux/Kbuild.in ++++ b/datapath/linux/Kbuild.in +@@ -7,11 +7,11 @@ export VERSION = @VERSION@ + include $(srcdir)/../Modules.mk + include $(srcdir)/Modules.mk + +-EXTRA_CFLAGS := -DVERSION=\"$(VERSION)\" +-EXTRA_CFLAGS += -I$(srcdir)/.. +-EXTRA_CFLAGS += -I$(builddir)/.. +-EXTRA_CFLAGS += -g +-EXTRA_CFLAGS += -include $(builddir)/kcompat.h ++ccflags-y := -DVERSION=\"$(VERSION)\" ++ccflags-y += -I$(srcdir)/.. ++ccflags-y += -I$(builddir)/.. ++ccflags-y += -g ++ccflags-y += -include $(builddir)/kcompat.h + + # These include directories have to go before -I$(KSRC)/include. + # NOSTDINC_FLAGS just happens to be a variable that goes in the +-- +2.1.2 + diff --git a/net/openvswitch/patches/0004-datapath-linux-add-KCFLAGS-var-to-modules-Makefile.m.patch b/net/openvswitch/patches/0004-datapath-linux-add-KCFLAGS-var-to-modules-Makefile.m.patch deleted file mode 100644 index bbc758d56..000000000 --- a/net/openvswitch/patches/0004-datapath-linux-add-KCFLAGS-var-to-modules-Makefile.m.patch +++ /dev/null @@ -1,39 +0,0 @@ -From deb44e6e9d64001562ee9395a2c8525848052394 Mon Sep 17 00:00:00 2001 -From: Alexandru Ardelean -Date: Tue, 28 Oct 2014 11:03:53 +0200 -Subject: [PATCH] datapath/linux: add KCFLAGS var to modules Makefile.main.in - -This is mostly required because of GCC 4.9 which seems -to error out with: - openvswitch/datapath/linux/datapath.c:2108:10: - error: macro "DATE" might prevent reproducible builds - -We would have wanted to add '-Wno-error=date-time' directly -but that would be too specific, so we decided to add -a generic make flag and configure it with what we need. - -Signed-off-by: Alexandru Ardelean ---- - datapath/linux/Makefile.main.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in -index 88f144c..0b200b7 100644 ---- a/datapath/linux/Makefile.main.in -+++ b/datapath/linux/Makefile.main.in -@@ -67,10 +67,10 @@ ifeq (,$(wildcard $(CONFIG_FILE))) - endif - - default: -- $(MAKE) -C $(KSRC) M=$(builddir) modules -+ $(MAKE) -C $(KSRC) M=$(builddir) $(KCFLAGS) modules - - modules_install: -- $(MAKE) -C $(KSRC) M=$(builddir) modules_install -+ $(MAKE) -C $(KSRC) M=$(builddir) $(KCFLAGS) modules_install - depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h` - endif - --- -1.8.4.5 - From bc85520865fd96e65077981a20de0ef511a0e468 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 3 Dec 2014 09:03:57 +0200 Subject: [PATCH 2/2] openvswitch: use EXTRA_CFLAGS instead of KCFLAGS The patch we've switched requires EXTRA_CFLAGS to be set instead of KCFLAGS. Signed-off-by: Alexandru Ardelean --- net/openvswitch/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/Makefile b/net/openvswitch/Makefile index 397c1da4b..c0c3e8e15 100644 --- a/net/openvswitch/Makefile +++ b/net/openvswitch/Makefile @@ -136,7 +136,7 @@ define Build/Compile ARCH="$(LINUX_KARCH)" \ SUBDIRS="$(PKG_BUILD_DIR)/datapath/linux" \ PATH="$(TARGET_PATH)" \ - KCFLAGS="$(KCFLAGS)" \ + EXTRA_CFLAGS="$(KCFLAGS)" \ KCC="$(KERNEL_CC)" endef