summaryrefslogtreecommitdiffstats
path: root/meta-sota/recipes-support/lshw/files/ldflags.patch
blob: 83e0410f655e4213a17db2ee8474fca40bf23a59 (plain)
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
diff -Naur /home/anton/lshw-old/src/Makefile lshw-B.02.16/src/Makefile
--- /home/anton/lshw-old/src/Makefile	2017-02-07 16:21:52.554738182 +0100
+++ lshw-B.02.16/src/Makefile	2017-02-07 16:22:45.578588072 +0100
@@ -25,9 +25,9 @@
 ifeq ($(SQLITE), 1)
 	CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
 endif
-LDFLAGS=-L./core/ -g
+LDEXTRAS=-L./core/ -g
 ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
-	LDFLAGS+= -Wl,--as-needed
+	LDEXTRAS+= -Wl,--as-needed
 endif
 LDSTATIC=-static
 LIBS=-llshw -lresolv
@@ -37,7 +37,7 @@
 
 export CXXFLAGS
 export LIBS
-export LDFLAGS
+export LDEXTRAS
 
 DATAFILES = pci.ids usb.ids oui.txt manuf.txt
 
@@ -51,7 +51,7 @@
 	+make -C core all
 
 $(PACKAGENAME): core $(PACKAGENAME).o
-	$(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+	$(CXX) $(LDFLAGS) ${LDEXTRAS} -o $@ $(PACKAGENAME).o $(LIBS)
 
 .PHONY: po
 po:
@@ -69,7 +69,7 @@
 static: $(PACKAGENAME)-static
 
 $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
-	$(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+	$(CXX) $(LDSTATIC) $(LDFLAGS) ${LDEXTRAS} -o $@ $(PACKAGENAME).o $(LIBS)
 	$(STRIP) $@
 
 .PHONY: compressed