From patchwork Sun May 15 21:46:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16206 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 0D633823C9; Sun, 15 May 2016 23:46:17 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=xDvruCgq; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 8458982356 for ; Sun, 15 May 2016 23:46:15 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593C6DAFD0000000000002E16.dip0.t-ipconnect.de [IPv6:2003:c5:93c6:dafd::2e16]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id E28281C8001; Sun, 15 May 2016 23:46:14 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1463348775; bh=j/Nuw+Ntnpdhh5FOagP5yDmJSaZbVGW2Nm/ghDKwOds=; h=From:To:Cc:Subject:Date:From; b=xDvruCgqxQR/zutznHjq6obitLZXX+00fJ1n1ruFIBn2QGpLPln+HMMd1jjuzt4lg IjjRvhLj6AgJYPRM1K+mBvkElMVjSHoYH/N0VyTBSZM2UUFkkcmHRcVZnLCDaCdTlm F1VQ7JV20P/NQjKoLVGsneWdrRdX216JpIwkhduU= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 15 May 2016 23:46:02 +0200 Message-Id: <1463348762-26642-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.8.1 Subject: [B.A.T.M.A.N.] [PATCH next] batman-adv: Fix build against recent Debian Stretch kernels X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The kernels for Debian stretch require some special CFLAGS settings which are only correctly defined when NOSTDINC_FLAGS is defined inside the execution of the Makefile via kbuild. But batman-adv sets it currently outside to insert compatibility include headers and compat-sources. This can be avoided by making the top Makefile kbuild compatible and redefining the NOSTDINC_FLAGS when kbuild include this Makefile. The actual build of the batman-adv module is then done by adding the subdirectory to obj-y. Signed-off-by: Sven Eckelmann --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 365a7cc..d662573 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ RM ?= rm -f REVISION= $(shell if [ -d "$(PWD)/.git" ]; then \ echo $$(git --git-dir="$(PWD)/.git" describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \ fi) -export NOSTDINC_FLAGS := \ +NOSTDINC_FLAGS := \ -I$(PWD)/compat-include/ \ -I$(PWD)/include/ \ -include $(PWD)/compat.h \ @@ -54,11 +54,13 @@ NOSTDINC_FLAGS += -DBATADV_SOURCE_VERSION=\"$(REVISION)\" endif include $(PWD)/compat-sources/Makefile - +obj-y += net/batman-adv/ export batman-adv-y BUILD_FLAGS := \ - M=$(PWD)/net/batman-adv \ + M=$(PWD) \ + PWD=$(PWD) \ + REVISION=$(REVISION) \ CONFIG_BATMAN_ADV=m \ CONFIG_BATMAN_ADV_DEBUG=$(CONFIG_BATMAN_ADV_DEBUG) \ CONFIG_BATMAN_ADV_BLA=$(CONFIG_BATMAN_ADV_BLA) \ @@ -66,7 +68,7 @@ BUILD_FLAGS := \ CONFIG_BATMAN_ADV_NC=$(CONFIG_BATMAN_ADV_NC) \ CONFIG_BATMAN_ADV_MCAST=$(CONFIG_BATMAN_ADV_MCAST) \ CONFIG_BATMAN_ADV_BATMAN_V=$(CONFIG_BATMAN_ADV_BATMAN_V) \ - INSTALL_MOD_DIR=updates/net/batman-adv/ + INSTALL_MOD_DIR=updates/ all: config $(MAKE) -C $(KERNELPATH) $(BUILD_FLAGS) modules