summaryrefslogtreecommitdiff
path: root/packages/uclibc/uclibc-0.9.27/dyn-ldconfig.patch
blob: a053b9ee81f7af43b5a00000df712937e6a65a8d (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

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- uClibc/utils/Makefile~dyn-ldconfig
+++ uClibc/utils/Makefile
@@ -45,7 +45,7 @@
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
 ldconfig:	ldconfig.c
-	$(CC) $(CFLAGS) -Wl,-s -static \
+	$(CC) $(CFLAGS) -Wl,-s $(if $(filter $(UCLIBC_STATIC_LDCONFIG),y),-static) \
 		-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
 		-DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
 		$^ -o $@
--- uClibc/extra/Configs/Config.in~dyn-ldconfig
+++ uClibc/extra/Configs/Config.in
@@ -311,6 +311,15 @@
 	  if you are using an older Linux kernel (2.0.x) that lacks large file 
 	  support.  Enabling this option will increase the size of uClibc.
 
+config UCLIBC_STATIC_LDCONFIG
+	bool "Link ldconfig statically"
+	default y
+	help
+	  If you wish to link the ldconfig binary statically, enable this option.
+	  It being static can be beneficial if you have a library problem and need
+	  ldconfig to recover from it.  If keeping the size down is more important
+	  to you than system recovery, disable this option.
+
 choice
 	prompt "Malloc Implementation"
 	default MALLOC if ! ARCH_HAS_MMU