summaryrefslogtreecommitdiff
blob: ee5c645861de8f490ce63173034682551021b6a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- busybox-1.4.2/Makefile
+++ busybox-1.4.2/Makefile
@@ -564,7 +564,8 @@
       cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
       -o $@ \
       -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-      -Wl,--start-group $(busybox-all) -Wl,--end-group
+      -Wl,--start-group $(busybox-all) -Wl,--end-group \
+      $(LDLIBS)
 
 # Generate System.map
 quiet_cmd_sysmap = SYSMAP
--- busybox-1.4.2/Makefile.flags
+++ busybox-1.4.2/Makefile.flags
@@ -28,4 +28,8 @@
 ifeq ($(CONFIG_STATIC),y)
 LDFLAGS += -static
 endif
+
+ifeq ($(CONFIG_SELINUX),y)
+LDLIBS += -lselinux -lsepol
+endif
 #LDFLAGS += -nostdlib