b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>,
	konstantin.pribluda@gmail.com
Subject: Re: [B.A.T.M.A.N.] Problem compiling batman for openwrt
Date: Thu, 13 Feb 2014 18:44:21 +0100	[thread overview]
Message-ID: <52FD0475.1040705@meshcoding.com> (raw)
In-Reply-To: <CANcKu40YtXgXGSiPnPo9biG=auHFqKNRA3G0WNy3E2MYWyqiNg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 477 bytes --]

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.



Cheers,


-- 
Antonio Quartulli

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 1001-batctl-Add-CFLAGS-to-the-linker-step.patch --]
[-- Type: text/x-patch; name="1001-batctl-Add-CFLAGS-to-the-linker-step.patch", Size: 1076 bytes --]

From 2c7bfe1299efa97438814bf6826a8f7ab3bc0b16 Mon Sep 17 00:00:00 2001
From: Sven Eckelmann <sven@narfation.org>
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 <sven@narfation.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
 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
 COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
-LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH)
+LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH)
 
 # standard install paths
 PREFIX = /usr/local
-- 
1.8.5.3


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2014-02-13 17:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13 14:15 [B.A.T.M.A.N.] Problem compiling batman for openwrt Konstantin Pribluda
2014-02-13 17:44 ` Antonio Quartulli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FD0475.1040705@meshcoding.com \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=konstantin.pribluda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).