blob: e73ed1da4f55d35e4903e0d1d2460ef7efcd696a [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#
4# Various kinds of LP32 cruft.
5#
6
7libc_bionic_src_files_x86 += \
8 bionic/mmap.cpp \
9
10libc_common_src_files_x86 += \
Ying Wangf25d6772014-01-23 15:17:50 -080011 bionic/legacy_32_bit_support.cpp \
12 bionic/ndk_cruft.cpp \
Elliott Hughes8d77bce2014-04-22 13:55:58 -070013 bionic/time64.c \
Elliott Hughes7c02d942014-09-16 19:06:31 -070014
15libc_netbsd_src_files_x86 += \
16 upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
17
18libc_openbsd_src_files_x86 += \
Dan Albert8e613cf2014-06-11 14:17:35 -070019 upstream-openbsd/lib/libc/stdio/putw.c \
Ying Wangf25d6772014-01-23 15:17:50 -080020
Elliott Hughes7c02d942014-09-16 19:06:31 -070021#
22# Default implementations of functions that are commonly optimized.
23#
24
Ying Wangf25d6772014-01-23 15:17:50 -080025libc_common_src_files_x86 += \
26 bionic/__memcpy_chk.cpp \
27 bionic/__memset_chk.cpp \
28 bionic/__strcpy_chk.cpp \
29 bionic/__strcat_chk.cpp \
Elliott Hughes7c02d942014-09-16 19:06:31 -070030
31libc_freebsd_src_files_x86 += \
Bernhard Rosenkraenzer6f2bde32014-05-23 17:44:18 +020032 upstream-freebsd/lib/libc/string/wmemmove.c \
Ying Wangf25d6772014-01-23 15:17:50 -080033
Elliott Hughes7c02d942014-09-16 19:06:31 -070034#
35# Inherently architecture-specific functions.
36#
Ying Wangf25d6772014-01-23 15:17:50 -080037
Ying Wangf25d6772014-01-23 15:17:50 -080038libc_bionic_src_files_x86 += \
Elliott Hughes36d61882013-11-19 13:31:58 -080039 arch-x86/bionic/__bionic_clone.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080040 arch-x86/bionic/_exit_with_stack_teardown.S \
Christopher Ferris6869d262014-10-06 15:11:28 -070041 arch-x86/bionic/libgcc_compat.c \
Elliott Hughes36f451a2014-09-10 15:20:40 -070042 arch-x86/bionic/__restore_rt.S \
43 arch-x86/bionic/__restore.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080044 arch-x86/bionic/_setjmp.S \
45 arch-x86/bionic/setjmp.S \
46 arch-x86/bionic/__set_tls.c \
47 arch-x86/bionic/sigsetjmp.S \
48 arch-x86/bionic/syscall.S \
Dan Albert6a918872014-08-05 20:53:31 +000049 arch-x86/bionic/vfork.S \
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040050
Varvara Rainchik5a922842014-04-24 15:41:20 +040051## ARCH variant specific source files
52arch_variant_mk := $(LOCAL_PATH)/arch-x86/$(TARGET_ARCH_VARIANT)/$(TARGET_ARCH_VARIANT).mk
53ifeq ($(wildcard $(arch_variant_mk)),)
54 arch_variant_mk := $(LOCAL_PATH)/arch-x86/generic/generic.mk
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040055endif
Varvara Rainchik5a922842014-04-24 15:41:20 +040056include $(arch_variant_mk)
57libc_common_additional_dependencies += $(arch_variant_mk)
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040058
Varvara Rainchik5a922842014-04-24 15:41:20 +040059arch_variant_mk :=
Ying Wangf25d6772014-01-23 15:17:50 -080060
Ying Wangf25d6772014-01-23 15:17:50 -080061libc_crt_target_cflags_x86 := \
62 -m32 \
63 -I$(LOCAL_PATH)/arch-x86/include
64
65libc_crt_target_ldflags_x86 := -melf_i386
66
67libc_crt_target_crtbegin_file_x86 := \
68 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
69
70libc_crt_target_crtbegin_so_file_x86 := \
71 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
72
73libc_crt_target_so_cflags_x86 := \
74 -fPIC