blob: e5d70a9d88a3dfb19a4a2a99b68a806eee707cdb [file] [log] [blame]
Elliott Hughes7c02d942014-09-16 19:06:31 -07001# 32-bit x86.
Ying Wangf25d6772014-01-23 15:17:50 -08002
Elliott Hughes7c02d942014-09-16 19:06:31 -07003#
Elliott Hughes7c02d942014-09-16 19:06:31 -07004# Default implementations of functions that are commonly optimized.
5#
6
Ying Wangf25d6772014-01-23 15:17:50 -08007libc_common_src_files_x86 += \
8 bionic/__memcpy_chk.cpp \
9 bionic/__memset_chk.cpp \
10 bionic/__strcpy_chk.cpp \
11 bionic/__strcat_chk.cpp \
Elliott Hughes7c02d942014-09-16 19:06:31 -070012
13libc_freebsd_src_files_x86 += \
Bernhard Rosenkraenzer6f2bde32014-05-23 17:44:18 +020014 upstream-freebsd/lib/libc/string/wmemmove.c \
Ying Wangf25d6772014-01-23 15:17:50 -080015
Elliott Hughes7c02d942014-09-16 19:06:31 -070016#
17# Inherently architecture-specific functions.
18#
Ying Wangf25d6772014-01-23 15:17:50 -080019
Ying Wangf25d6772014-01-23 15:17:50 -080020libc_bionic_src_files_x86 += \
Elliott Hughes36d61882013-11-19 13:31:58 -080021 arch-x86/bionic/__bionic_clone.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080022 arch-x86/bionic/_exit_with_stack_teardown.S \
Christopher Ferris6869d262014-10-06 15:11:28 -070023 arch-x86/bionic/libgcc_compat.c \
Elliott Hughes36f451a2014-09-10 15:20:40 -070024 arch-x86/bionic/__restore.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080025 arch-x86/bionic/setjmp.S \
26 arch-x86/bionic/__set_tls.c \
Christopher Ferris04954a42013-02-26 01:30:00 -080027 arch-x86/bionic/syscall.S \
Dan Albert6a918872014-08-05 20:53:31 +000028 arch-x86/bionic/vfork.S \
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040029
Varvara Rainchik5a922842014-04-24 15:41:20 +040030## ARCH variant specific source files
31arch_variant_mk := $(LOCAL_PATH)/arch-x86/$(TARGET_ARCH_VARIANT)/$(TARGET_ARCH_VARIANT).mk
32ifeq ($(wildcard $(arch_variant_mk)),)
33 arch_variant_mk := $(LOCAL_PATH)/arch-x86/generic/generic.mk
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040034endif
Varvara Rainchik5a922842014-04-24 15:41:20 +040035include $(arch_variant_mk)
36libc_common_additional_dependencies += $(arch_variant_mk)
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040037
Varvara Rainchik5a922842014-04-24 15:41:20 +040038arch_variant_mk :=
Ying Wangf25d6772014-01-23 15:17:50 -080039
Ying Wangf25d6772014-01-23 15:17:50 -080040libc_crt_target_cflags_x86 := \
41 -m32 \
42 -I$(LOCAL_PATH)/arch-x86/include
43
44libc_crt_target_ldflags_x86 := -melf_i386
45
46libc_crt_target_crtbegin_file_x86 := \
47 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
48
49libc_crt_target_crtbegin_so_file_x86 := \
50 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
51
52libc_crt_target_so_cflags_x86 := \
53 -fPIC