diff options
author | Bruce Beare <bruce.j.beare@intel.com> | 2011-05-03 21:04:40 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2011-07-07 22:51:37 +0200 |
commit | a0aec0bd3083280dcba0c3aaba39602425228e2a (patch) | |
tree | 8199c08d85ef8ac76ce4fb38b2d4131431eb43e1 /libc/Android.mk | |
parent | 3eb26578550127c5f1cd8443f74d18054a180a24 (diff) | |
download | bionic-a0aec0bd3083280dcba0c3aaba39602425228e2a.zip bionic-a0aec0bd3083280dcba0c3aaba39602425228e2a.tar.gz bionic-a0aec0bd3083280dcba0c3aaba39602425228e2a.tar.bz2 |
x86: Enable -fstack-protector
Change-Id: Iff9e3a3ba0e2d0faa7c6d98154aa5be0cc8a6c50
Orig-Change-Id: Ib69514c3afcb4c1f5e5f3f8cd91acfd145a0866c
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Diffstat (limited to 'libc/Android.mk')
-rw-r--r-- | libc/Android.mk | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libc/Android.mk b/libc/Android.mk index 1425673..cea874f 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -540,18 +540,24 @@ ifneq ($(filter arm x86,$(TARGET_ARCH)),) # that will call __cxa_finalize(&__dso_handle) in order to ensure that # static C++ destructors are properly called on dlclose(). # + +libc_crt_target_so_cflags := $(libc_crt_target_cflags) +ifeq ($(TARGET_ARCH),x86) + # This flag must be added for x86 targets, but not for ARM + libc_crt_target_so_cflags += -fPIC +endif GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_so.o $(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.S @mkdir -p $(dir $@) - $(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $< + $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $< ALL_GENERATED_SOURCES += $(GEN) GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_so.o $(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S @mkdir -p $(dir $@) - $(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $< + $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $< ALL_GENERATED_SOURCES += $(GEN) -endif # TARGET_ARCH == x86 +endif # TARGET_ARCH == x86 || TARGET_ARCH == arm GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o |