Add SYSROOT, EXTRA_{LDFLAGS,LDLIBS} config opts; sample Android NDK config
Signed-off-by: Rob Walker <rwalker@rwalker.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
69d81a1c1b
commit
bf6343796e
27
Config.in
27
Config.in
@ -600,12 +600,39 @@ config CROSS_COMPILER_PREFIX
|
|||||||
|
|
||||||
Native builds leave this empty.
|
Native builds leave this empty.
|
||||||
|
|
||||||
|
config SYSROOT
|
||||||
|
string "Path to sysroot"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
If you want to build BusyBox with a cross compiler, then you
|
||||||
|
might also need to specify where /usr/include and /usr/lib
|
||||||
|
will be found.
|
||||||
|
|
||||||
|
For example, BusyBox can be built against an installed
|
||||||
|
Android NDK, platform version 9, for ARM ABI with
|
||||||
|
|
||||||
|
CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
|
||||||
|
|
||||||
|
Native builds leave this empty.
|
||||||
|
|
||||||
config EXTRA_CFLAGS
|
config EXTRA_CFLAGS
|
||||||
string "Additional CFLAGS"
|
string "Additional CFLAGS"
|
||||||
default ""
|
default ""
|
||||||
help
|
help
|
||||||
Additional CFLAGS to pass to the compiler verbatim.
|
Additional CFLAGS to pass to the compiler verbatim.
|
||||||
|
|
||||||
|
config EXTRA_LDFLAGS
|
||||||
|
string "Additional LDFLAGS"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Additional LDFLAGS to pass to the linker verbatim.
|
||||||
|
|
||||||
|
config EXTRA_LDLIBS
|
||||||
|
string "Additional LDLIBS"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Additional LDLIBS to pass to the linker with -l.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu 'Debugging Options'
|
menu 'Debugging Options'
|
||||||
|
@ -104,6 +104,11 @@ else
|
|||||||
LDLIBS += m
|
LDLIBS += m
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_SYSROOT),)
|
||||||
|
CFLAGS += --sysroot=$(CONFIG_SYSROOT)
|
||||||
|
export SYSROOT=$(CONFIG_SYSROOT)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_PAM),y)
|
ifeq ($(CONFIG_PAM),y)
|
||||||
# libpam uses libpthread, so for static builds busybox must be linked to
|
# libpam uses libpthread, so for static builds busybox must be linked to
|
||||||
# libpthread. On some platforms that requires an explicit -lpthread, so
|
# libpthread. On some platforms that requires an explicit -lpthread, so
|
||||||
@ -137,6 +142,16 @@ ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox)))
|
|||||||
SKIP_STRIP = y
|
SKIP_STRIP = y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_EXTRA_LDFLAGS),)
|
||||||
|
EXTRA_LDFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_LDFLAGS)))
|
||||||
|
#"))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_EXTRA_LDLIBS),)
|
||||||
|
LDLIBS += $(strip $(subst ",,$(CONFIG_EXTRA_LDLIBS)))
|
||||||
|
#"))
|
||||||
|
endif
|
||||||
|
|
||||||
# Busybox is a stack-fatty so make sure we increase default size
|
# Busybox is a stack-fatty so make sure we increase default size
|
||||||
# TODO: use "make stksizes" to find & fix big stack users
|
# TODO: use "make stksizes" to find & fix big stack users
|
||||||
# (we stole scripts/checkstack.pl from the kernel... thanks guys!)
|
# (we stole scripts/checkstack.pl from the kernel... thanks guys!)
|
||||||
|
1016
configs/android_ndk_defconfig
Normal file
1016
configs/android_ndk_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user