diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-23 12:12:03 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-23 12:12:03 +0000 |
commit | b0f54743e36af163ae2530c381c485bb29df13dc (patch) | |
tree | cda4cfeaae6e47fe4f14c1b566092be4da9affc4 /Makefile.flags | |
parent | 40514a0309939f2446f0d4ed9600cad5de396e7f (diff) | |
parent | ba88826c66411affc1da3614742b454654f7298a (diff) | |
download | busybox-w32-b0f54743e36af163ae2530c381c485bb29df13dc.tar.gz busybox-w32-b0f54743e36af163ae2530c381c485bb29df13dc.tar.bz2 busybox-w32-b0f54743e36af163ae2530c381c485bb29df13dc.zip |
Merge branch 'busybox' into merge
Conflicts:
Makefile.flags
Diffstat (limited to 'Makefile.flags')
-rw-r--r-- | Makefile.flags | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/Makefile.flags b/Makefile.flags index b653d55c1..2a3aa5812 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -97,6 +97,13 @@ CFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_CFLAGS))) | |||
97 | #")) | 97 | #")) |
98 | endif | 98 | endif |
99 | 99 | ||
100 | # Note: both "" (string consisting of two quote chars) and empty string | ||
101 | # are possible, and should be skipped below. | ||
102 | ifneq ($(subst "",,$(CONFIG_SYSROOT)),) | ||
103 | CFLAGS += --sysroot=$(CONFIG_SYSROOT) | ||
104 | export SYSROOT=$(CONFIG_SYSROOT) | ||
105 | endif | ||
106 | |||
100 | ifeq ($(CONFIG_PLATFORM_MINGW32),y) | 107 | ifeq ($(CONFIG_PLATFORM_MINGW32),y) |
101 | # These defintions are not strictly needed, but they help shut up fnmatch.c warnings | 108 | # These defintions are not strictly needed, but they help shut up fnmatch.c warnings |
102 | CFLAGS += -Iwin32 -DHAVE_STRING_H=1 -DHAVE_CONFIG_H=0 -fno-builtin-stpcpy | 109 | CFLAGS += -Iwin32 -DHAVE_STRING_H=1 -DHAVE_CONFIG_H=0 -fno-builtin-stpcpy |
@@ -104,17 +111,25 @@ EXEEXT = .exe | |||
104 | ifeq ($(CONFIG_WIN32_NET),y) | 111 | ifeq ($(CONFIG_WIN32_NET),y) |
105 | LDLIBS += ws2_32 | 112 | LDLIBS += ws2_32 |
106 | endif | 113 | endif |
107 | else | 114 | endif |
108 | ifneq ($(CONFIG_CROSS_COMPILER_PREFIX),"arm-linux-androideabi-") | 115 | |
116 | # Android has no separate crypt library | ||
117 | CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc - >/dev/null 2>&1 && echo "y") | ||
118 | ifeq ($(CRYPT_AVAILABLE),y) | ||
109 | LDLIBS += m crypt | 119 | LDLIBS += m crypt |
110 | else | 120 | else |
111 | # Android libc has no crypt. TODO: make a generic CONFIG_LINK_WITH_CRYPT option? | ||
112 | LDLIBS += m | 121 | LDLIBS += m |
113 | endif | 122 | endif |
114 | endif | ||
115 | 123 | ||
116 | ifeq ($(CONFIG_PAM),y) | 124 | ifeq ($(CONFIG_PAM),y) |
117 | LDLIBS += pam pam_misc | 125 | # libpam uses libpthread, so for static builds busybox must be linked to |
126 | # libpthread. On some platforms that requires an explicit -lpthread, so | ||
127 | # it should be in LDLIBS. For non-static builds, scripts/trylink will | ||
128 | # take care of removing -lpthread if possible. (Not bothering to check | ||
129 | # CONFIG_STATIC because even in a non-static build it could be that the | ||
130 | # only libpam available is libpam.a, so -lpthread could still be | ||
131 | # needed.) | ||
132 | LDLIBS += pam pam_misc pthread | ||
118 | endif | 133 | endif |
119 | 134 | ||
120 | ifeq ($(CONFIG_SELINUX),y) | 135 | ifeq ($(CONFIG_SELINUX),y) |
@@ -139,6 +154,16 @@ ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox))) | |||
139 | SKIP_STRIP = y | 154 | SKIP_STRIP = y |
140 | endif | 155 | endif |
141 | 156 | ||
157 | ifneq ($(CONFIG_EXTRA_LDFLAGS),) | ||
158 | EXTRA_LDFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_LDFLAGS))) | ||
159 | #")) | ||
160 | endif | ||
161 | |||
162 | ifneq ($(CONFIG_EXTRA_LDLIBS),) | ||
163 | LDLIBS += $(strip $(subst ",,$(CONFIG_EXTRA_LDLIBS))) | ||
164 | #")) | ||
165 | endif | ||
166 | |||
142 | # Busybox is a stack-fatty so make sure we increase default size | 167 | # Busybox is a stack-fatty so make sure we increase default size |
143 | # TODO: use "make stksizes" to find & fix big stack users | 168 | # TODO: use "make stksizes" to find & fix big stack users |
144 | # (we stole scripts/checkstack.pl from the kernel... thanks guys!) | 169 | # (we stole scripts/checkstack.pl from the kernel... thanks guys!) |