Problem compiling batman for openwrt

Message ID (mailing list archive)
State Not Applicable, archived

Commit Message

Antonio Quartulli Feb. 13, 2014, 5:44 p.m. UTC
  On 13/02/14 15:15, Konstantin Pribluda wrote:
> Hi all,
> I try to compile  2013.4 against trunk of openwrt,  and habe problem
> with batctl:

Hi Konstantin,

due to some CFLAGS problem (related to lto) batctl-2013.4.0 does not
compile unless you apply the attached patch (you can save and put it in
the patches folder within the batman-adv package).

The new batman-adv/batctl-2014.0.0 already includes this fix.



From 2c7bfe1299efa97438814bf6826a8f7ab3bc0b16 Mon Sep 17 00:00:00 2001
From: Sven Eckelmann <>
Date: Tue, 7 May 2013 14:51:02 +0200
Subject: [PATCH] batctl: Add CFLAGS to the linker step

The GCC manual states for different parameters that the options for compilation
must also be used when linking. The options for compilation are stored in
CFLAGS and added to LINK.o to fix the behavior.

Option which need this are for example -fPIC/-fPIE or -flto.

Signed-off-by: Sven Eckelmann <>
Signed-off-by: Marek Lindner <>
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 311e70e..233f453 100755
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@  RM ?= rm -f
 INSTALL ?= install
 MKDIR ?= mkdir -p
 # standard install paths
 PREFIX = /usr/local