From patchwork Sat May 28 08:32:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16304 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 BD93F816D2; Sat, 28 May 2016 10:33:00 +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=iNsBfvPW; 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 7FA34816CF for ; Sat, 28 May 2016 10:32:58 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593C3F1F90000000000002E16.dip0.t-ipconnect.de [IPv6:2003:c5:93c3:f1f9::2e16]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 7E1651C8001; Sat, 28 May 2016 10:32:57 +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=1464424377; bh=SuLGXCLdvwJnqoKwpEjQ3OlxsEZGdclUWkIbhm4KVaQ=; h=From:To:Cc:Subject:Date:From; b=iNsBfvPW1Zf7Y52Oml1qOHUPl3wYycGAlPS0OQs7R75m7wypqILwrUsJnP1mJ90xs l3+f3ahrrS9qNLuyPFgy2vTHYMGKRw/Jeu1TxlmsKkXyL9W8OhGrth6L9T1pdimZxc JgbHkbH0iQINHtmg0dgk0crh+R1l1QBMmwbB9VKo= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 28 May 2016 10:32:48 +0200 Message-Id: <1464424368-18635-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.8.1 Subject: [B.A.T.M.A.N.] [PATCH v3] 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 Tested-by: Martin Weinelt --- v3: - append NOSTDINC_FLAGS with our own flags instead of overwriting it 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..2568fb2 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