blob: 2c90317db4fde86223a2d38d66320ee7ca8d39ac [file] [log] [blame]
Elliott Hughes86d16a02014-09-16 19:06:31 -07001# 32-bit x86.
Ying Wangf25d6772014-01-23 15:17:50 -08002
Elliott Hughes86d16a02014-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 Hughes86d16a02014-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 Hughes86d16a02014-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 Hughes86d16a02014-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 Hughes86d16a02014-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 Ferrisd11eac32014-10-06 15:11:28 -070041 arch-x86/bionic/libgcc_compat.c \
Elliott Hughes7dc2b7b2014-09-10 15:20:40 -070042 arch-x86/bionic/__restore.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080043 arch-x86/bionic/_setjmp.S \
44 arch-x86/bionic/setjmp.S \
45 arch-x86/bionic/__set_tls.c \
46 arch-x86/bionic/sigsetjmp.S \
47 arch-x86/bionic/syscall.S \
Dan Albert5386a742014-08-05 20:53:31 +000048 arch-x86/bionic/vfork.S \
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040049
Varvara Rainchik5a922842014-04-24 15:41:20 +040050## ARCH variant specific source files
51arch_variant_mk := $(LOCAL_PATH)/arch-x86/$(TARGET_ARCH_VARIANT)/$(TARGET_ARCH_VARIANT).mk
52ifeq ($(wildcard $(arch_variant_mk)),)
53 arch_variant_mk := $(LOCAL_PATH)/arch-x86/generic/generic.mk
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040054endif
Varvara Rainchik5a922842014-04-24 15:41:20 +040055include $(arch_variant_mk)
56libc_common_additional_dependencies += $(arch_variant_mk)
Liubov Dmitrieva0a490662012-01-17 12:55:46 +040057
Varvara Rainchik5a922842014-04-24 15:41:20 +040058arch_variant_mk :=
Ying Wangf25d6772014-01-23 15:17:50 -080059
Ying Wangf25d6772014-01-23 15:17:50 -080060libc_crt_target_cflags_x86 := \
61 -m32 \
62 -I$(LOCAL_PATH)/arch-x86/include
63
64libc_crt_target_ldflags_x86 := -melf_i386
65
66libc_crt_target_crtbegin_file_x86 := \
67 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
68
69libc_crt_target_crtbegin_so_file_x86 := \
70 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
71
72libc_crt_target_so_cflags_x86 := \
73 -fPIC