All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] Problem compiling batman for openwrt
@ 2014-02-13 14:15 Konstantin Pribluda
  2014-02-13 17:44 ` Antonio Quartulli
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Pribluda @ 2014-02-13 14:15 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi all,

I try to compile  2013.4 against trunk of openwrt,  and habe problem
with batctl:
----------------------%<-------------------
CPPFLAGS="-I/home/ko5tik/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include
-I/home/ko5tik/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include
-I/home/ko5tik/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include
-I/home/ko5tik/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/include"
CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc
-fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable
-msoft-float -ffunction-sections -fdata-sections -flto"
LDFLAGS="-L/home/ko5tik/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib
-L/home/ko5tik/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib
-L/home/ko5tik/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
-L/home/ko5tik/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/lib
-Wl,--gc-sections -fuse-linker-plugin" make -C
/home/ko5tik/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/batman-adv/batctl-2013.4.0
REVISION="" CC="mips-openwrt-linux-uclibc-gcc"
DESTDIR="/home/ko5tik/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/batman-adv/batman-adv-2013.4.0/ipkg-install"
batctl install
make[4]: Entering directory
`/home/ko5tik/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/batman-adv/batctl-2013.4.0'
mips-openwrt-linux-uclibc-gcc
-L/home/ko5tik/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib
-L/home/ko5tik/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib
-L/home/ko5tik/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
-L/home/ko5tik/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/lib
-Wl,--gc-sections -fuse-linker-plugin  main.o bat-hosts.o functions.o
sys.o debug.o ping.o traceroute.o tcpdump.o hash.o vis.o debugfs.o
ioctl.o list-batman.o translate.o -lm -o batctl
/tmp/ccSxljUB.s: Assembler messages:
/tmp/ccSxljUB.s:3002: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccSxljUB.s:3018: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccSxljUB.s:3117: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccSxljUB.s:3141: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccSxljUB.s:3151: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccSxljUB.s:3205: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccSxljUB.s:3242: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccSxljUB.s:3298: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccSxljUB.s:3314: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccuGt0iL.s: Assembler messages:
/tmp/ccuGt0iL.s:666: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:677: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:736: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:752: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:775: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:838: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:859: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:876: Error: opcode not supported on this processor:
mips1 (mips1) `ext $3,$3,24,4'
/tmp/ccuGt0iL.s:880: Warning: Macro instruction expanded into multiple
instructions
/tmp/ccuGt0iL.s:909: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:941: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:945: Warning: Macro instruction expanded into multiple
instructions
/tmp/ccuGt0iL.s:971: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:975: Warning: Macro instruction expanded into multiple
instructions
/tmp/ccuGt0iL.s:1004: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1032: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1063: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1083: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1091: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,28,4'
/tmp/ccuGt0iL.s:1098: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1116: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1249: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1278: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1294: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1317: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1356: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1373: Error: opcode not supported on this processor:
mips1 (mips1) `ext $3,$3,24,4'
/tmp/ccuGt0iL.s:1377: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccuGt0iL.s:1411: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1415: Warning: Macro instruction expanded into
multiple instructions
/tmp/ccuGt0iL.s:1440: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
/tmp/ccuGt0iL.s:1472: Error: opcode not supported on this processor:
mips1 (mips1) `ext $2,$2,24,4'
lto-wrapper: mips-openwrt-linux-uclibc-gcc returned 1 exit status
/home/ko5tik/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.6.4/../../../../mips-openwrt-linux-uclibc/bin/ld:
lto-wrapper failed
---------------------------%<-------------------------------------------

Adding ARCH=...  to build comman in Makefile:

MAKE_BATCTL_ARGS += \
        REVISION="" \
        CC="$(TARGET_CC)" \
        ARCH="$(LINUX_KARCH)" \
        DESTDIR="$(PKG_INSTALL_DIR)" \
        batctl install


does not help.    Do I miss something?


regards,

----[ Konstantin Pribluda http://www.pribluda.de ]----------------
JTec quality components: http://www.pribluda.de/projects/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] Problem compiling batman for openwrt
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Antonio Quartulli @ 2014-02-13 17:44 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking,
	konstantin.pribluda


[-- 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 --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-13 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.