From patchwork Fri May 20 12:06:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16259 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 5D40D80729; Fri, 20 May 2016 14:06:40 +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=cX/jsfzD; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:4d88:2000:7::2; 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 [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 2017D80533 for ; Fri, 20 May 2016 14:06:38 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p579E7469.dip0.t-ipconnect.de [87.158.116.105]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 2751A1C8001; Fri, 20 May 2016 14:06:38 +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=1463745998; bh=+oiSaWJogVx8hCZgRrWA2W641c+63vThbZVyzKUb0iE=; h=From:To:Cc:Subject:Date:From; b=cX/jsfzDNYPaNP3CnjLiTKDcAPLWiM7oQCUHnlBTnXBSTvjguCaxocv5v6rREsQW6 zIoRe4Gcr6RQky8wBudiKr/zYIUvxaFLePCz6sQEP9Ae+33eCTce0nZTBRzmKJ2JuV IaWT/lG+wjNQnmRw5zabTo2Gqd6Bw9ufytbcEePU= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 20 May 2016 14:06:24 +0200 Message-Id: <1463745984-16129-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.8.1 Subject: [B.A.T.M.A.N.] [PATCH next v2] 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 set during 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 includes 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 --- v2: - Fixed noise from other patches in context (should now apply cleanly on next) Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5d2c058..fe574de 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/ \ -include $(PWD)/compat.h \ $(CFLAGS) @@ -52,8 +52,12 @@ ifneq ($(REVISION),) NOSTDINC_FLAGS += -DBATADV_SOURCE_VERSION=\"$(REVISION)\" endif +obj-y += net/batman-adv/ + 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) \ @@ -61,7 +65,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