aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-11-18 23:44:36 +0100
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-11-18 23:44:36 +0100
commit00a681fb154f4a5102e7283b3ddb5061e83b33a9 (patch)
tree9fb89bde7fe203c1563cc00fe2a1295867b65904
parenta842da477214c1f8f3a21ae87a155d83cb90ca92 (diff)
downloadbusybox-00a681fb154f4a5102e7283b3ddb5061e83b33a9.tar.gz
busybox: Updates for compatibility with 4.2 build system
Change-Id: Idc9666e10630188c1da492994d4b36d33df40646 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--Android.mk4
-rw-r--r--include/platform.h2
-rw-r--r--networking/route.c1
3 files changed, 4 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index 62ae50249..3ccbb2d8b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -218,7 +218,7 @@ BB_TC_DIR := $(realpath $(shell dirname $(TARGET_TOOLS_PREFIX)))
BB_TC_PREFIX := $(shell basename $(TARGET_TOOLS_PREFIX))
BB_LDFLAGS := -nostdlib -Bdynamic -Wl,-z,muldefs$(shell if test $(PLATFORM_SDK_VERSION) -lt 16; then echo -ne ',-T../../$(BUILD_SYSTEM)/armelf.x'; fi),-dynamic-linker,/system/bin/linker,-z,nocopyreloc,--no-undefined ../../$(TARGET_CRTBEGIN_DYNAMIC_O) ../../$(TARGET_CRTEND_O) -L../../$(TARGET_OUT_STATIC_LIBRARIES)
# FIXME remove -fno-strict-aliasing once all aliasing violations are fixed
-BB_COMPILER_FLAGS := $(subst -I ,-I../../,$(subst -include ,-include ../../,$(TARGET_GLOBAL_CFLAGS))) -I../../bionic/libc/include -I../../bionic/libc/kernel/common -I../../bionic/libc/arch-arm/include -I../../bionic/libc/kernel/arch-arm -I../../bionic/libm/include -fno-stack-protector -Wno-error=format-security -fno-strict-aliasing
+BB_COMPILER_FLAGS := $(subst -I ,-I../../,$(subst -include ,-include ../../,$(TARGET_GLOBAL_CFLAGS))) -I../../bionic/libc/include -I../../bionic/libc/kernel/common -I../../bionic/libc/arch-arm/include -I../../bionic/libc/kernel/arch-arm -I../../bionic/libm/include -fno-stack-protector -Wno-error=format-security -fno-strict-aliasing -U_FORTIFY_SOURCE
BB_LDLIBS := dl m c gcc
ifneq ($(strip $(SHOW_COMMANDS)),)
BB_VERBOSE="V=1"
@@ -230,7 +230,7 @@ droid: busybox
systemtarball: symlinks
-busybox: $(TARGET_CRTBEGIN_DYNAMIC_O) $(TARGET_CRTEND_O) $(TARGET_OUT_STATIC_LIBRARIES)/libm.so $(TARGET_OUT_STATIC_LIBRARIES)/libc.so $(TARGET_OUT_STATIC_LIBRARIES)/libdl.so
+busybox: $(TARGET_CRTBEGIN_DYNAMIC_O) $(TARGET_CRTEND_O) $(TARGET_OUT_SHARED_LIBRARIES)/libm.so $(TARGET_OUT_SHARED_LIBRARIES)/libc.so $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
cd external/busybox && \
sed -e "s|^CONFIG_CROSS_COMPILER_PREFIX=.*|CONFIG_CROSS_COMPILER_PREFIX=\"$(BB_TC_PREFIX)\"|;s|^CONFIG_EXTRA_CFLAGS=.*|CONFIG_EXTRA_CFLAGS=\"$(BB_COMPILER_FLAGS)\"|" configs/android_defconfig >.config && \
export PATH=$(BB_TC_DIR):$(PATH) && \
diff --git a/include/platform.h b/include/platform.h
index aa1bc331b..92b2cccf6 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -225,7 +225,7 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING;
# define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4))
# define move_to_unaligned16(u16p, v) do { \
uint16_t __t = (v); \
- memcpy((u16p), &__t, 4); \
+ memmove((u16p), &__t, 4); \
} while (0)
# define move_to_unaligned32(u32p, v) do { \
uint32_t __t = (v); \
diff --git a/networking/route.c b/networking/route.c
index b7b5a02e6..446f451ba 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -33,6 +33,7 @@
//usage: "\n -e Display other/more information"
//usage: "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family"
+#include <sys/socket.h>
#include <net/route.h>
#include <net/if.h>