aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libbpf/20-trailing-ldflags.patch
blob: 7f65ef5645ad39950f5afd3ac57744d2a492362d (plain) (blame)
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
diff --git a/src/Makefile b/src/Makefile
index e9021fe..1d86ecd 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -54,11 +54,7 @@ INSTALL = install
 
 DESTDIR ?=
 
-ifeq ($(shell uname -m),x86_64)
-	LIBSUBDIR := lib64
-else
-	LIBSUBDIR := lib
-endif
+LIBSUBDIR := lib
 
 PREFIX ?= /usr
 LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)
@@ -77,9 +73,9 @@ $(OBJDIR)/libbpf.so.$(VERSION): $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION)
 	ln -sf $(^F) $@
 
 $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(OBJS)
-	$(CC) -shared $(ALL_LDFLAGS) -Wl,--version-script=$(VERSION_SCRIPT) \
+	$(CC) -shared -Wl,--version-script=$(VERSION_SCRIPT) \
 				     -Wl,-soname,libbpf.so.$(VERSION) \
-				     $^ -o $@
+				     $^ -o $@ $(ALL_LDFLAGS) 
 
 $(OBJDIR)/libbpf.pc:
 	sed -e "s|@PREFIX@|$(PREFIX)|" \