6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
From a2076079a409141704701ec17a205d89e5b24052 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Sat, 28 May 2016 20:45:02 +0200
Subject: [PATCH] Makefile: fix static linking issue with lintl
When net-tools are build with uClibc-ng and statically linked,
some tools like hostname and route needs to link with -lintl.
Adding -lintl in LDFLAGS place the library before object files:
arm-linux-gcc -O2 -g -Wall -fno-strict-aliasing -static -lintl -Llib -o hostname hostname.o
Add $(LIBS) after object files in the Makefile to place -lintl correctly.
Fixes:
http://autobuild.buildroot.net/results/134/1345b6d366125320b89512e7ce7f142f1a03acf8
Ref:
http://lists.busybox.net/pipermail/buildroot/2016-May/162216.html
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
Makefile | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 171123d..a2baf79 100644
--- a/Makefile
+++ b/Makefile
@@ -158,37 +158,37 @@ subdirs: libdir
@for i in $(SUBDIRS:$(NET_LIB_PATH)/=); do $(MAKE) -C $$i || exit $$? ; done
ifconfig: $(NET_LIB) ifconfig.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ifconfig.o $(NLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ifconfig.o $(LIBS) $(NLIB)
nameif: $(NET_LIB) nameif.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB)
hostname: hostname.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(LIBS) $(DNLIB)
route: $(NET_LIB) route.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(LIBS) $(NLIB)
arp: $(NET_LIB) arp.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ arp.o $(NLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ arp.o $(LIBS) $(NLIB)
rarp: $(NET_LIB) rarp.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rarp.o $(NLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rarp.o $(LIBS) $(NLIB)
slattach: $(NET_LIB) slattach.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ slattach.o $(NLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ slattach.o $(LIBS) $(NLIB)
plipconfig: $(NET_LIB) plipconfig.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ plipconfig.o $(NLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ plipconfig.o $(LIBS) $(NLIB)
netstat: $(NET_LIB) netstat.o statistics.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ netstat.o statistics.o $(NLIB) $(SELIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ netstat.o statistics.o $(LIBS) $(NLIB) $(SELIB)
iptunnel: $(NET_LIB) iptunnel.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ iptunnel.o $(NLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ iptunnel.o $(LIBS) $(NLIB)
ipmaddr: $(NET_LIB) ipmaddr.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ipmaddr.o $(NLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ipmaddr.o $(LIBS) $(NLIB)
mii-tool: $(NET_LIB) mii-tool.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mii-tool.o $(NLIB)
--
2.5.5
|