Android.mk revision 3cfb52aab2548df635e9672218cc433e14922fd3
1e210488e0d4082b9a0c55195c22191f29ed56bf8Serban ConstantinescuLOCAL_PATH := $(call my-dir)
21dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albertbionic_coverage := false
4c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert
5d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris# Make everything depend on any changes to included makefiles.
6f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies := $(LOCAL_PATH)/Android.mk
7f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
8f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Load config for TARGET_ARCH
9f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
10f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
11f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies += \
12f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
13f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
14f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
15f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
16f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Load config for TARGET_2ND_ARCH
17f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
18f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk
19f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
20f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies += \
21f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk
22f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
23f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
24f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# crt obj files
25f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# ========================================================
26f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
27f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_crt_target_cflags := \
28f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -I$(LOCAL_PATH)/include \
29f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
30f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
31f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
32f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/crt.mk
33f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
34f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
35f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/crt.mk
36f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
37f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
38d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris
39ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the common source files for all the libc instances
40ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# =========================================================
411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files := \
4276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/bindresvport.c \
4376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ether_aton.c \
4476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ether_ntoa.c \
4576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/fts.c \
4676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/getpriority.c \
4776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/if_indextoname.c \
4876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/if_nametoindex.c \
4976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/initgroups.c \
5076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ioctl.c \
5176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/isatty.c \
5276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/memmem.c \
5376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/pututline.c \
5476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sched_cpualloc.c \
5576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sched_cpucount.c \
5676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sigblock.c \
5776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/siginterrupt.c \
5876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sigsetmask.c \
5976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/system_properties_compat.c \
606a03abcfd23f31d1df06eb0059830e22621282bbElliott Hughes    stdio/findfp.c \
6120841a137beac5caa824e3586c7bd91d879ff92eElliott Hughes    stdio/fread.c \
62aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/snprintf.c\
63aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/sprintf.c \
648885dcc779bceae5016d5ad96caa73465a7bab90Elliott Hughes    stdio/stdio.c \
652b021e10664c3938249eb18b48eeac253cbb3e20Elliott Hughes    stdio/stdio_ext.cpp \
66eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
6759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris# Fortify implementations of libc functions.
6859a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferrislibc_common_src_files += \
6990201d5eca050414d50a433866ccb580415bb0d4Nick Kralevich    bionic/__FD_chk.cpp \
7059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__fgets_chk.cpp \
7159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__memmove_chk.cpp \
724674e3899afcc6b3ac8a48cdb716695d5489d26bElliott Hughes    bionic/__poll_chk.cpp \
73b036b5ca36c1e12b075909b3eca6eab73ee611cfNick Kralevich    bionic/__read_chk.cpp \
7460f4f9a5b99a0a66817f50edfc2194a49f8b5146Nick Kralevich    bionic/__recvfrom_chk.cpp \
75950a58e24d1019eb9d814dbb16f111a6b61e3f23Christopher Ferris    bionic/__stpcpy_chk.cpp \
76950a58e24d1019eb9d814dbb16f111a6b61e3f23Christopher Ferris    bionic/__stpncpy_chk.cpp \
7759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strchr_chk.cpp \
7859a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlcat_chk.cpp \
7959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlcpy_chk.cpp \
8059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlen_chk.cpp \
8159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strncat_chk.cpp \
8259a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strncpy_chk.cpp \
8359a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strrchr_chk.cpp \
8459a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__umask_chk.cpp \
8559a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__vsnprintf_chk.cpp \
8659a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__vsprintf_chk.cpp \
8759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris
8829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hugheslibc_bionic_ndk_src_files := \
8961e699a133a4807fe878a6cb0d7190d7c96e21f8Elliott Hughes    bionic/abort.cpp \
908f0cd8aa22906c3e678738eeba20fc1a5c399b6cSreeram Ramachandran    bionic/accept.cpp \
91903b78873a744d3fba187e4bd22008ba21162e51Sreeram Ramachandran    bionic/accept4.cpp \
92f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/access.cpp \
93063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/assert.cpp \
945a8173860d65182af022be88fed0c5d8d5dcb69dElliott Hughes    bionic/atof.cpp \
95a406ee6d5f616192e9a13afad6ac6a9969814fc1Brigid Smith    bionic/bionic_systrace.cpp \
9611952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/bionic_time_conversions.cpp \
97428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes    bionic/brk.cpp \
987a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/c16rtomb.cpp \
997a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/c32rtomb.cpp \
100f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/chmod.cpp \
101f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/chown.cpp \
10258d9e280d459225aa8dc4533e883182b08215f7dElliott Hughes    bionic/clearenv.cpp \
103cccfe1e17c47799deee67fa23f48d8c860390ac8Elliott Hughes    bionic/clock.cpp \
104d5c652756bb1a52959cd5c62447b62462f90f983Yabin Cui    bionic/clock_getcpuclockid.cpp \
10518160256840e9bb097f17422ea47d54fabbc9f3fHaruki Hasegawa    bionic/clock_nanosleep.cpp \
10636d6188f8cd8b948fb797f11d9620d63d0c2215aElliott Hughes    bionic/clone.cpp \
107f8408c58fa61540d8b6b5afec4246284482d89c2Calin Juravle    bionic/__cmsg_nxthdr.cpp \
108ceb5bd787c8ce281e5f4343c5d4f77b41c3e2919Sreeram Ramachandran    bionic/connect.cpp \
109dfb5ce42bcc5a275af49211c0bbe64c5ec3d2668Dan Albert    bionic/ctype.cpp \
110c30396f5f225e0b5a83a35432e2d82a7063cfdb9David 'Digit' Turner    bionic/dirent.cpp \
111cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/dup2.cpp \
112cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/epoll_create.cpp \
11311952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/epoll_pwait.cpp \
114aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/epoll_wait.cpp \
1152a0b873065edb304fa2d1c54f8de663ea638b8abElliott Hughes    bionic/__errno.cpp \
116b8a8cf0d1a333401eae9c9e1d70b9c1b154ff9c9Elliott Hughes    bionic/error.cpp \
1179b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng    bionic/eventfd_read.cpp \
1189b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng    bionic/eventfd_write.cpp \
119bf425680e484486803bf21e4c4cd1e3f36614a3cElliott Hughes    bionic/fchmod.cpp \
12053e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    bionic/fchmodat.cpp \
121232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/ffs.cpp \
12202c78a386739a8a2b3007efeb00a9ca04132100aElliott Hughes    bionic/flockfile.cpp \
123d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1Elliott Hughes    bionic/fpclassify.cpp \
1242c5153b043b44e9935a334ae9b2d5a4bc5258b40Nick Kralevich    bionic/futimens.cpp \
125063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/getcwd.cpp \
1262b67d7dee09852789d9ac7d8972ed6cdb2c18430Elliott Hughes    bionic/gethostname.cpp \
1272f954bab2d524f6afed8a443c2a7ee32876db0faYongqin Liu    bionic/getpgrp.cpp \
128247dc91889ffc8b71fc3371edba9d834afab96abElliott Hughes    bionic/getpid.cpp \
1297086ad6919feb2415c6027163f5c63323bcca27cElliott Hughes    bionic/gettid.cpp \
1305d9a7ba0dc9c24ed4e4efa9cac0e796fd524b308Elliott Hughes    bionic/__gnu_basename.cpp \
13109c39d6df0e952620f8c1751377b559a04e023aaElliott Hughes    bionic/inotify_init.cpp \
132cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/lchown.cpp \
133f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/lfs64_support.cpp \
134fe317a3775e16d466bb884a8e054fd77f7087bb3Calin Juravle    bionic/__libc_current_sigrtmax.cpp \
1350990d4fda898ada86e557f872f5cb7d16b138e3cElliott Hughes    bionic/__libc_current_sigrtmin.cpp \
1360990d4fda898ada86e557f872f5cb7d16b138e3cElliott Hughes    bionic/libc_init_common.cpp \
13742b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes    bionic/libc_logging.cpp \
1388f2a5a0b40fc82126c691d5c30131d908772aab7Elliott Hughes    bionic/libgen.cpp \
13958b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes    bionic/link.cpp \
140f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/locale.cpp \
1415363a45f2b6d4eeb054710d0886bbadea8a15273Elliott Hughes    bionic/lstat.cpp \
142f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/malloc_info.cpp \
1434caa1f09770ea3e5ca22afbe8aa0900810a0dbfeDan Albert    bionic/mbrtoc16.cpp \
1447a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/mbrtoc32.cpp \
1457a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/mbstate.cpp \
1467a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/mempcpy.cpp \
147f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/mkdir.cpp \
148594b1a4af204aa9de2b4913182f4556e38d71648Elliott Hughes    bionic/mkfifo.cpp \
149f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/mknod.cpp \
150eb664e24c074b88539b743668109d8b4eaa925bdElliott Hughes    bionic/mntent.cpp \
1518205a61248973ac13716ae80e712c80e126b0541Sreeram Ramachandran    bionic/NetdClientDispatch.cpp \
152f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/open.cpp \
153a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes    bionic/pathconf.cpp \
15411952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/pause.cpp \
155cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/pipe.cpp \
15611952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/poll.cpp \
157b587f339db269abf08a2c311a7263dd218cb23d3Elliott Hughes    bionic/posix_fadvise.cpp \
158f64b8ea09db3bdd84eed59f7721301743332b3feElliott Hughes    bionic/posix_fallocate.cpp \
1595afae64a1bac56638c6348f0c8f5e9d61b654029Yabin Cui    bionic/posix_madvise.cpp \
1604b558f50a42c97d461f1dede5aaaae490ea99e2eElliott Hughes    bionic/posix_timers.cpp \
161c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/ptrace.cpp \
1623e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pty.cpp \
163c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/raise.cpp \
164c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/rand.cpp \
1659d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/readlink.cpp \
1669d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/reboot.cpp \
167c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/recv.cpp \
1689d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/rename.cpp \
1699d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/rmdir.cpp \
170a4831cb4a3f44b93788488db8ff9ea76613f0355Elliott Hughes    bionic/scandir.cpp \
1719d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/sched_getaffinity.cpp \
1729d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/sched_getcpu.cpp \
173c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/semaphore.cpp \
1749d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/send.cpp \
175c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/setegid.cpp \
176c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/__set_errno.cpp \
177c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/seteuid.cpp \
1789d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/setpgrp.cpp \
1793e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/sigaction.cpp \
1809d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/sigaddset.cpp \
181c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/sigdelset.cpp \
182c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/sigemptyset.cpp \
1834916706cfe590eb06c9b5bd4bd402ce056034d51Elliott Hughes    bionic/sigfillset.cpp \
184d8a5a6f513c6fa99229e9c82c5c308c7cd6b3d54Chris Dearman    bionic/sigismember.cpp \
18576c241b091b4d9d9a9237d40e814e52ce2917f47Elliott Hughes    bionic/signal.cpp \
186f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/signalfd.cpp \
187a38cb088619d3e2f2194247038c10897d1c5036eElliott Hughes    bionic/sigpending.cpp \
188247dc91889ffc8b71fc3371edba9d834afab96abElliott Hughes    bionic/sigprocmask.cpp \
189f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/sigqueue.cpp \
190f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/sigsuspend.cpp \
191701bec2af33feaa9dddf12ccf8e4c714441b7f2eElliott Hughes    bionic/sigtimedwait.cpp \
1924ca685e36e9d7f53c135eba2b4b8ece152129dbeKito Cheng    bionic/sigwait.cpp \
193887e1140fe7596fa1239a0bc802d2cdb51c57d3cElliott Hughes    bionic/sigwaitinfo.cpp \
19404303f5a8ab9a992f3671d46b6ee2171582cbd61Elliott Hughes    bionic/socket.cpp \
195247dc91889ffc8b71fc3371edba9d834afab96abElliott Hughes    bionic/stat.cpp \
196232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/statvfs.cpp \
1974a9e837840fda3aaea48aeba85c7c7a8782d2586Elliott Hughes    bionic/strerror.cpp \
198232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/strerror_r.cpp \
1995a8173860d65182af022be88fed0c5d8d5dcb69dElliott Hughes    bionic/strsignal.cpp \
200c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/strtold.cpp \
201c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/stubs.cpp \
202c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/symlink.cpp \
203c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sysinfo.cpp \
204c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/syslog.cpp \
205c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sys_siglist.c \
206c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sys_signame.c \
207aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/system_properties.cpp \
20840d105ccb3e6283566ce54b693b3088f31aa4f26Elliott Hughes    bionic/tdestroy.cpp \
20919e62325c268a668692e2b65fde2284079f369aaElliott Hughes    bionic/termios.cpp \
210634816055f51c536d24dea30dfe930b7fe2fa603Yabin Cui    bionic/thread_private.cpp \
2111f5af926fa626734981d6b4dcc0ab54e520032a9Elliott Hughes    bionic/tmpfile.cpp \
212634816055f51c536d24dea30dfe930b7fe2fa603Yabin Cui    bionic/umount.cpp \
213c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/unlink.cpp \
214634816055f51c536d24dea30dfe930b7fe2fa603Yabin Cui    bionic/utimes.cpp \
215903b78873a744d3fba187e4bd22008ba21162e51Sreeram Ramachandran    bionic/wait.cpp \
216f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/wchar.cpp \
21706040fd75c1edff9e5ffb2b3d3e2a6e66d57c11dElliott Hughes    bionic/wctype.cpp \
218063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/wmempcpy.cpp \
219063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes
220063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hugheslibc_bionic_src_files :=
2215a8173860d65182af022be88fed0c5d8d5dcb69dElliott Hughes
222063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes# The fork implementation depends on pthread data, so we can't include it in
223f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes# libc_ndk.a.
22491a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hugheslibc_bionic_src_files += bionic/fork.cpp
2259d93986481b67a8135e57fc6400ca8c59f7375f6Yabin Cui
2263ad8ecb64e9dd5614169232b84a93eb3b8aa32d7Elliott Hughes# The data that backs getauxval is initialized in the libc init functions which
227aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes# are invoked by the linker. If this file is included in libc_ndk.a, only one of
228aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes# the copies of the global data will be initialized, resulting in nullptr
2295a8173860d65182af022be88fed0c5d8d5dcb69dElliott Hughes# dereferences.
230063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hugheslibc_bionic_src_files += bionic/getauxval.cpp
2318d4b5849f21dc4115ad66944dc11df838b3faa52Elliott Hughes
2320468feb28696751efcddada8de69a622afffdba8Elliott Hughes# These three require getauxval, which isn't available on older platforms.
233063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hugheslibc_bionic_src_files += bionic/getentropy_linux.c
234247dc91889ffc8b71fc3371edba9d834afab96abElliott Hugheslibc_bionic_src_files += bionic/sysconf.cpp
235f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hugheslibc_bionic_src_files += bionic/vdso.cpp
236f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes
237625993dfbb085a3cde7492eda8ec1cdc1ee39a78Elliott Hugheslibc_cxa_src_files := \
23817a8b0db63d54e9d79bf11112ace0c4fe9606289Elliott Hughes    bionic/__cxa_guard.cpp \
239063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__cxa_pure_virtual.cpp \
2405a0aa3dee247a313f04252cf45608097695d5953Elliott Hughes    bionic/new.cpp \
24129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
242fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertlibc_upstream_freebsd_src_files := \
243fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    upstream-freebsd/lib/libc/gen/ldexp.c \
244fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    upstream-freebsd/lib/libc/gen/sleep.c \
245fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    upstream-freebsd/lib/libc/gen/usleep.c \
246fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    upstream-freebsd/lib/libc/stdlib/abs.c \
247f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-freebsd/lib/libc/stdlib/getopt_long.c \
24857a883640f3b43bf5e332d64489b3eab67a5ac3fElliott Hughes    upstream-freebsd/lib/libc/stdlib/imaxabs.c \
249ab61eb366ac48addf2bca6093a34455193f5c8dfElliott Hughes    upstream-freebsd/lib/libc/stdlib/imaxdiv.c \
250ab61eb366ac48addf2bca6093a34455193f5c8dfElliott Hughes    upstream-freebsd/lib/libc/stdlib/labs.c \
251aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/llabs.c \
252d278b828fef47fb2d7098f8ec70867fbd3da09d6Elliott Hughes    upstream-freebsd/lib/libc/stdlib/qsort.c \
253aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/quick_exit.c \
254aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/realpath.c \
255aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/string/wcpcpy.c \
256aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/string/wcpncpy.c \
2570b25f633a23e575c8a1f9547d1af5dc5b0157a1cElliott Hughes    upstream-freebsd/lib/libc/string/wcscasecmp.c \
258b8425c549a0bfe08b01b5906b95603d8523c1b16Dan Albert    upstream-freebsd/lib/libc/string/wcscspn.c \
259f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-freebsd/lib/libc/string/wcsdup.c \
260eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcslcat.c \
261eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncasecmp.c \
262eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncat.c \
263eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncmp.c \
264eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncpy.c \
265eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsnlen.c \
266eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcspbrk.c \
267eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsspn.c \
268eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcstok.c \
269eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemchr.c \
270eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemset.c \
271eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes
272eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hugheslibc_upstream_netbsd_src_files := \
273eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-netbsd/common/lib/libc/stdlib/random.c \
274eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-netbsd/lib/libc/gen/ftw.c \
275eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-netbsd/lib/libc/gen/nftw.c \
276f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-netbsd/lib/libc/gen/nice.c \
277f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    upstream-netbsd/lib/libc/gen/popen.c \
278a0beeeabbc8735bc830544cbbb1d920122b8d958Elliott Hughes    upstream-netbsd/lib/libc/gen/psignal.c \
279677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/gen/utime.c \
280677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/gen/utmp.c \
281677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/inet/nsap_addr.c \
282677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/regex/regcomp.c \
283677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/regex/regerror.c \
284677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/regex/regexec.c \
28519f58efa22357bfaa6a63a0940928830e95c5123Elliott Hughes    upstream-netbsd/lib/libc/regex/regfree.c \
286a210cae724313604f8cbd49cc6deab1be5239083Elliott Hughes    upstream-netbsd/lib/libc/stdlib/bsearch.c \
287677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/div.c \
288677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/drand48.c \
289677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/erand48.c \
290677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/jrand48.c \
291677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/lcong48.c \
292677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/ldiv.c \
293677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/lldiv.c \
294677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/lrand48.c \
295677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/mrand48.c \
296274afe8f0eab4139c94d5f8b1ee3d267f449ef42Elliott Hughes    upstream-netbsd/lib/libc/stdlib/nrand48.c \
297677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/_rand48.c \
298677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/rand_r.c \
299677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/seed48.c \
300677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/srand48.c \
301677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/string/memccpy.c \
302677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/string/strcasestr.c \
303a0beeeabbc8735bc830544cbbb1d920122b8d958Elliott Hughes    upstream-netbsd/lib/libc/string/strcoll.c \
304677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/string/strxfrm.c \
305677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes
306677b6e605be95f434602f19a627ea0dea2927ccdElliott Hugheslibc_upstream_openbsd_gdtoa_src_files := \
307677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-openbsd/android/gdtoa_support.cpp \
308677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-openbsd/lib/libc/gdtoa/dmisc.c \
309677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-openbsd/lib/libc/gdtoa/dtoa.c \
310f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/gdtoa.c \
3114bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/gethex.c \
312d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/gmisc.c \
3134bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/hd_init.c \
3144bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/hdtoa.c \
3154bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/hexnan.c \
3164bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/ldtoa.c \
3174bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/misc.c \
3184bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/smisc.c \
3194bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/strtod.c \
3204bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/strtodg.c \
3214bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/strtof.c \
3224bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/strtord.c \
3234bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/sum.c \
3244bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/ulp.c \
3254bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
3264bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hugheslibc_upstream_openbsd_gdtoa_src_files_32 := \
3274bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    $(libc_upstream_openbsd_gdtoa_src_files) \
3284bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
3294bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hugheslibc_upstream_openbsd_gdtoa_src_files_64 := \
3304bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    $(libc_upstream_openbsd_gdtoa_src_files) \
3314bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/strtorQ.c \
3324bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
3334bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# These two depend on getentropy_linux.cpp, which isn't in libc_ndk.a.
3344bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hugheslibc_upstream_openbsd_src_files := \
3354bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/crypt/arc4random.c \
3364bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/crypt/arc4random_uniform.c \
3374bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
33853e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hugheslibc_upstream_openbsd_ndk_src_files := \
33949eed7db79bd2664a2a13552ad81d445c93ba462Elliott Hughes    upstream-openbsd/lib/libc/compat-43/killpg.c \
3402b67d7dee09852789d9ac7d8972ed6cdb2c18430Elliott Hughes    upstream-openbsd/lib/libc/gen/alarm.c \
3412b67d7dee09852789d9ac7d8972ed6cdb2c18430Elliott Hughes    upstream-openbsd/lib/libc/gen/ctype_.c \
342aedb00d04eb7f0b20b6abde702ba94a46577ca68Elliott Hughes    upstream-openbsd/lib/libc/gen/daemon.c \
343f3c73901cb5ca4de2651151cf2c65b31a729466eElliott Hughes    upstream-openbsd/lib/libc/gen/err.c \
344e5055179fd92ae243741d778426e1da03539165fElliott Hughes    upstream-openbsd/lib/libc/gen/errx.c \
345cc7e5f489f02ceee46e315af4f78559d3ad6c962Elliott Hughes    upstream-openbsd/lib/libc/gen/exec.c \
346cc7e5f489f02ceee46e315af4f78559d3ad6c962Elliott Hughes    upstream-openbsd/lib/libc/gen/fnmatch.c \
34753e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/gen/ftok.c \
34853e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/gen/getprogname.c \
349692207eb457f9b4bf6cb4301d710d19b6e85c902Elliott Hughes    upstream-openbsd/lib/libc/gen/isctype.c \
350692207eb457f9b4bf6cb4301d710d19b6e85c902Elliott Hughes    upstream-openbsd/lib/libc/gen/setprogname.c \
351f3c73901cb5ca4de2651151cf2c65b31a729466eElliott Hughes    upstream-openbsd/lib/libc/gen/time.c \
352692207eb457f9b4bf6cb4301d710d19b6e85c902Elliott Hughes    upstream-openbsd/lib/libc/gen/tolower_.c \
353cccfe1e17c47799deee67fa23f48d8c860390ac8Elliott Hughes    upstream-openbsd/lib/libc/gen/toupper_.c \
35453e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/gen/verr.c \
355692207eb457f9b4bf6cb4301d710d19b6e85c902Elliott Hughes    upstream-openbsd/lib/libc/gen/verrx.c \
356cc7e5f489f02ceee46e315af4f78559d3ad6c962Elliott Hughes    upstream-openbsd/lib/libc/gen/vwarn.c \
357cc7e5f489f02ceee46e315af4f78559d3ad6c962Elliott Hughes    upstream-openbsd/lib/libc/gen/vwarnx.c \
358cc7e5f489f02ceee46e315af4f78559d3ad6c962Elliott Hughes    upstream-openbsd/lib/libc/gen/warn.c \
359cc7e5f489f02ceee46e315af4f78559d3ad6c962Elliott Hughes    upstream-openbsd/lib/libc/gen/warnx.c \
360cc7e5f489f02ceee46e315af4f78559d3ad6c962Elliott Hughes    upstream-openbsd/lib/libc/locale/btowc.c \
361cc7e5f489f02ceee46e315af4f78559d3ad6c962Elliott Hughes    upstream-openbsd/lib/libc/locale/mbrlen.c \
3623d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/mbstowcs.c \
3633d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/mbtowc.c \
3643d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcscoll.c \
3650a5e26da1eae6b75a89695faf2e057c5c4717721Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstod.c \
366c8937eadf4a45afebe586dcea7a8ed882f3bec3bElliott Hughes    upstream-openbsd/lib/libc/locale/wcstof.c \
3673d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoimax.c \
3683d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstol.c \
36901ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstold.c \
3703d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoll.c \
3713d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstombs.c \
3723d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoul.c \
3733d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoull.c \
3743d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoumax.c \
3753d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcsxfrm.c \
37601ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/locale/wctob.c \
377ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/locale/wctomb.c \
3783d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/net/htonl.c \
3795a0aa3dee247a313f04252cf45608097695d5953Elliott Hughes    upstream-openbsd/lib/libc/net/htons.c \
3806a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_addr.c \
3816a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_lnaof.c \
3826a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_makeaddr.c \
3836a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_netof.c \
3846a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_network.c \
3856a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_ntoa.c \
3866a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_ntop.c \
3876a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_pton.c \
388f51d3e87671110c508f0f71d9bcb1bf54c22ca3bElliott Hughes    upstream-openbsd/lib/libc/net/ntohl.c \
3896a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/ntohs.c \
3906a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/stdio/asprintf.c \
3916a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/stdio/clrerr.c \
392ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/dprintf.c \
393ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fclose.c \
394fcac8ff97f6b6cced6546e0096cadc1039b68b5eElliott Hughes    upstream-openbsd/lib/libc/stdio/fdopen.c \
3955a69da8d7af6a388a4ad5b3dd619017b0030031aElliott Hughes    upstream-openbsd/lib/libc/stdio/feof.c \
396ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/ferror.c \
397ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fflush.c \
39853e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetc.c \
39953e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetln.c \
400ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetpos.c \
401ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgets.c \
402ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetwc.c \
403ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetws.c \
40401ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/fileno.c \
405c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/flags.c \
406ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fmemopen.c \
407a71b4c3f144a516826e8ac5b262099b920c49ce0Elliott Hughes    upstream-openbsd/lib/libc/stdio/fopen.c \
4086b841db2baa24ffcf2a4e5f975d1d07f1699b918Elliott Hughes    upstream-openbsd/lib/libc/stdio/fprintf.c \
4095a69da8d7af6a388a4ad5b3dd619017b0030031aElliott Hughes    upstream-openbsd/lib/libc/stdio/fpurge.c \
410ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fputc.c \
41153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/fputs.c \
412ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fputwc.c \
41353e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/fputws.c \
414c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/freopen.c \
415c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/fscanf.c \
416ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fseek.c \
417ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fsetpos.c \
41853e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/ftell.c \
419ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/funopen.c \
420ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fvwrite.c \
421ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fwalk.c \
4229d3c2dd11f5e796cd814cddc5b907494f859058eElliott Hughes    upstream-openbsd/lib/libc/stdio/fwide.c \
423ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fwprintf.c \
424c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/fwrite.c \
42594336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/fwscanf.c \
426792ae72e41923800ba8797d87a76346cb2de14b9Elliott Hughes    upstream-openbsd/lib/libc/stdio/getc.c \
42701ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/getchar.c \
428ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/getdelim.c \
429ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/getline.c \
430ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/gets.c \
43153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/getwc.c \
43253e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/getwchar.c \
433c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/makebuf.c \
434c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/mktemp.c \
435623b0d05bd924e7fa3c155492695123c87c3a2b1Dmitriy Ivanov    upstream-openbsd/lib/libc/stdio/open_memstream.c \
43665935979311373f2c7fa27cbfc189f49b188ca3aElliott Hughes    upstream-openbsd/lib/libc/stdio/open_wmemstream.c \
4376b841db2baa24ffcf2a4e5f975d1d07f1699b918Elliott Hughes    upstream-openbsd/lib/libc/stdio/perror.c \
4386b841db2baa24ffcf2a4e5f975d1d07f1699b918Elliott Hughes    upstream-openbsd/lib/libc/stdio/printf.c \
439ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/putc.c \
440ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/putchar.c \
44153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/puts.c \
442ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/putwc.c \
443ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/putwchar.c \
444c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/refill.c \
445c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/remove.c \
446ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/rewind.c \
447ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/rget.c \
448ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/scanf.c \
44953e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/setbuf.c \
45053e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/setbuffer.c \
451ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/setvbuf.c \
452ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/sscanf.c \
453623b0d05bd924e7fa3c155492695123c87c3a2b1Dmitriy Ivanov    upstream-openbsd/lib/libc/stdio/swprintf.c \
454603332fc4c2d073f0e197f9ce4517710e9b3a6d0Elliott Hughes    upstream-openbsd/lib/libc/stdio/swscanf.c \
45594336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/tempnam.c \
45601ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/tmpnam.c \
457ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/ungetc.c \
458ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/ungetwc.c \
459ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vasprintf.c \
46001ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/vdprintf.c \
461ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vfprintf.c \
462fcac8ff97f6b6cced6546e0096cadc1039b68b5eElliott Hughes    upstream-openbsd/lib/libc/stdio/vfscanf.c \
4630549371bd74ba7c7a5a16c2a7d6cc17dbe0e6f97Elliott Hughes    upstream-openbsd/lib/libc/stdio/vfwprintf.c \
464603332fc4c2d073f0e197f9ce4517710e9b3a6d0Elliott Hughes    upstream-openbsd/lib/libc/stdio/vfwscanf.c \
46594336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/vprintf.c \
46601ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/vscanf.c \
467ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vsnprintf.c \
468ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vsprintf.c \
469ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vsscanf.c \
470ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vswprintf.c \
471603332fc4c2d073f0e197f9ce4517710e9b3a6d0Elliott Hughes    upstream-openbsd/lib/libc/stdio/vswscanf.c \
47294336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/vwprintf.c \
47301ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/vwscanf.c \
47494336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/wbuf.c \
47501ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/wprintf.c \
476ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/wscanf.c \
47794336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/wsetup.c \
47801ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdlib/atexit.c \
47953b24382f5299931af5d08c933a765334a092c56Elliott Hughes    upstream-openbsd/lib/libc/stdlib/atoi.c \
48053c3c271dc9927dd280981fc23409af60f460007Dmitriy Ivanov    upstream-openbsd/lib/libc/stdlib/atol.c \
48153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdlib/atoll.c \
48253e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdlib/exit.c \
483ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/getenv.c \
484623b0d05bd924e7fa3c155492695123c87c3a2b1Dmitriy Ivanov    upstream-openbsd/lib/libc/stdlib/insque.c \
48558d9e280d459225aa8dc4533e883182b08215f7dElliott Hughes    upstream-openbsd/lib/libc/stdlib/lsearch.c \
48649eed7db79bd2664a2a13552ad81d445c93ba462Elliott Hughes    upstream-openbsd/lib/libc/stdlib/reallocarray.c \
4873e424d0a241f8ae5194514dabc4ad899f5a5416dElliott Hughes    upstream-openbsd/lib/libc/stdlib/remque.c \
4882818279ace22fb854b00e668c224492c4dd072a4Elliott Hughes    upstream-openbsd/lib/libc/stdlib/setenv.c \
48949eed7db79bd2664a2a13552ad81d445c93ba462Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoimax.c \
49058d9e280d459225aa8dc4533e883182b08215f7dElliott Hughes    upstream-openbsd/lib/libc/stdlib/strtol.c \
49153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoll.c \
49253e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoul.c \
493ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoull.c \
494ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoumax.c \
495ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/system.c \
496ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/tfind.c \
4971e4378ea06d06f57027a97714f076ad4f417a705Elliott Hughes    upstream-openbsd/lib/libc/stdlib/tsearch.c \
4983e424d0a241f8ae5194514dabc4ad899f5a5416dElliott Hughes    upstream-openbsd/lib/libc/string/strcasecmp.c \
4993e424d0a241f8ae5194514dabc4ad899f5a5416dElliott Hughes    upstream-openbsd/lib/libc/string/strcspn.c \
500ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strdup.c \
501ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strndup.c \
502ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strpbrk.c \
503ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strsep.c \
504ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strspn.c \
505ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strstr.c \
506ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strtok.c \
507ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/wmemcpy.c \
508ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/wcslcpy.c \
50976f8916b904db14facf811ae44e1265261349702Elliott Hughes    upstream-openbsd/lib/libc/string/wcsstr.c \
510ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/wcswidth.c \
511d299bcfdad959a3a0adf1683605b15a1c3b3ab66Elliott Hughes
512ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hugheslibc_pthread_src_files := \
51353e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    bionic/pthread_atfork.cpp \
514f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/pthread_attr.cpp \
515f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/pthread_cond.cpp \
5167c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris    bionic/pthread_create.cpp \
517ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin    bionic/pthread_detach.cpp \
518ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin    bionic/pthread_equal.cpp \
5191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    bionic/pthread_exit.cpp \
520470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    bionic/pthread_getcpuclockid.cpp \
521d286796fce1e6fff407b719a53eb2afbeb96c327Elliott Hughes    bionic/pthread_getschedparam.cpp \
5222ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    bionic/pthread_gettid_np.cpp \
523dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris    bionic/pthread_internals.cpp \
524dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris    bionic/pthread_join.cpp \
525dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris    bionic/pthread_key.cpp \
526dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris    bionic/pthread_kill.cpp \
527b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh    bionic/pthread_mutex.cpp \
528b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh    bionic/pthread_once.cpp \
529b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh    bionic/pthread_rwlock.cpp \
530b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh    bionic/pthread_self.cpp \
531c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes    bionic/pthread_setname_np.cpp \
5322ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    bionic/pthread_setschedparam.cpp \
5332ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    bionic/pthread_sigmask.cpp \
5342ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes
5352ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hugheslibc_arch_static_src_files := \
5362ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    bionic/dl_iterate_phdr_static.cpp \
53765935979311373f2c7fa27cbfc189f49b188ca3aElliott Hughes
5381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Various kinds of LP32 cruft.
539d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bort# ========================================================
5401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_bionic_src_files_32 += \
5411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    bionic/mmap.cpp \
5421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5438e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferrislibc_common_src_files_32 += \
54472bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferris    bionic/legacy_32_bit_support.cpp \
5458d2410d33d2c4eba6319664c965a750d863c7e05Christopher Ferris    bionic/ndk_cruft.cpp \
5468e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferris    bionic/time64.c \
5478e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferris
5488e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferrislibc_netbsd_src_files_32 += \
5498e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferris    upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
55072bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferris
55172bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferrislibc_openbsd_src_files_32 += \
5522fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren    upstream-openbsd/lib/libc/stdio/putw.c \
5532fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren
5542fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren
5552fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# Define some common cflags
5562fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# ========================================================
5572fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renlibc_common_cflags := \
5582fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren    -D_LIBC=1 \
559762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    -Wall -Wextra -Wunused \
560762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines
561762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hinesifneq ($(TARGET_USES_LOGD),false)
562762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_cflags += -DTARGET_USES_LOGD
563762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hinesendif
564762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines
565762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hinesuse_clang := $(USE_CLANG_PLATFORM_BUILD)
566762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hinesifeq ($(use_clang),)
567ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin  use_clang := false
568ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinendif
5698e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferris
57076c8b882690dd9025caa625a023996c136377cb1Ying Wang# Try to catch typical 32-bit assumptions that break with 64-bit pointers.
5711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags += \
572f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -Werror=pointer-to-int-cast \
573f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -Werror=int-to-pointer-cast \
574f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -Werror=type-limits \
575f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -Werror \
576f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
577f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
578f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang  libc_common_cflags += -DDEBUG
579f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
580f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
581a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(MALLOC_IMPL),dlmalloc)
582f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang  libc_common_cflags += -DUSE_DLMALLOC
583f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang  libc_malloc_src := bionic/dlmalloc.c
5841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectelse
585ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin  libc_common_cflags += -DUSE_JEMALLOC
5866380b51a8d775a3b572b2db15195f279cb5565f6Elliott Hughes  libc_malloc_src := bionic/jemalloc_wrapper.cpp
5876334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich  libc_common_c_includes += external/jemalloc/include
5886334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichendif
5896334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
5906334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
5916334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# the appropriate BoardConfig.mk file.
5926334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich#
5936334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichifneq ($(BOARD_MALLOC_ALIGNMENT),)
5946334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich  libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
595642331b5dd5647e7d196ac4f44406fd435478a56Elliott Hughesendif
59665935979311373f2c7fa27cbfc189f49b188ca3aElliott Hughes
597762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common conlyflags
598762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_conlyflags := \
5996334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich    -std=gnu99
6006380b51a8d775a3b572b2db15195f279cb5565f6Elliott Hughes
601c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# Define some common cppflags
602d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferrislibc_common_cppflags := \
6033ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert    -std=gnu++11
6046334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
6055ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert# Define some common includes
606c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert# ========================================================
6076334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichlibc_common_c_includes += \
608f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(LOCAL_PATH)/stdio   \
6096334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
6106334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
6116334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# Add in the arch or 32-bit specific flags
6126334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# Must be called with $(eval).
613ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# $(1): the LOCAL_ variable name
614ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# $(2): the bionic variable name to pull in
615ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesdefine patch-up-arch-specific-flags
616ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes$(1)_$(TARGET_ARCH) += $($(2)_$(TARGET_ARCH))
617ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes$(1)_32 += $($(2)_32)
6181fbe6213cdd9fda7e7b816e608b887ad8a0ad265Elliott Hughesifdef TARGET_2ND_ARCH
619efaa461bd67cfdfcbc2b4c6b69805bc5b929ae05Elliott Hughes$(1)_$(TARGET_2ND_ARCH) += $($(2)_$(TARGET_2ND_ARCH))
620efaa461bd67cfdfcbc2b4c6b69805bc5b929ae05Elliott Hughesendif
621329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughesendef
622d10db8261949e4d84b65f5c369153d0ca86ab22cElliott Hughes
623d10db8261949e4d84b65f5c369153d0ca86ab22cElliott Hughes
624d10db8261949e4d84b65f5c369153d0ca86ab22cElliott Hughes# ========================================================
625329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# libc_stack_protector.a - stack protector code
626329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# ========================================================
627329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes#
628329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# The stack protector code needs to be compiled
629329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# with -fno-stack-protector, since it modifies the
630329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# stack canary.
631329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes
632329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughesinclude $(CLEAR_VARS)
633329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes
634329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott HughesLOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
6359a5a3e8e74e2c6d7850ab29711189acf0f7378a2Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector
636d10db8261949e4d84b65f5c369153d0ca86ab22cElliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
637329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
638762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_C_INCLUDES := $(libc_common_c_includes)
639762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_MODULE := libc_stack_protector
640efaa461bd67cfdfcbc2b4c6b69805bc5b929ae05Elliott HughesLOCAL_CLANG := $(use_clang)
641ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
642c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CXX_STL := none
643d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_SYSTEM_SHARED_LIBRARIES :=
6443ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan AlbertLOCAL_ADDRESS_SANITIZER := false
645ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
6465ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert
647c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
648ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
649f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
650ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
651ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ========================================================
652ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# libc_tzcode.a - upstream 'tzcode' code
653ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ========================================================
654eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
655eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(CLEAR_VARS)
656eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
657eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SRC_FILES := $(call all-c-files-under,tzcode)
658eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# tzcode doesn't include wcsftime, so we use the OpenBSD one.
6598563802b04347951d8878747a830987e5ca145f5Elliott HughesLOCAL_SRC_FILES += upstream-openbsd/lib/libc/time/wcsftime.c
6608563802b04347951d8878747a830987e5ca145f5Elliott Hughes
6618563802b04347951d8878747a830987e5ca145f5Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \
6628563802b04347951d8878747a830987e5ca145f5Elliott Hughes    -fvisibility=hidden \
663891ec7a6e46e60d7dfa1cf229e14a8e8634e272bDan Albert
6648563802b04347951d8878747a830987e5ca145f5Elliott Hughes# Don't use ridiculous amounts of stack.
6650f7d882bb7661f9601f3843b0e393b6155cd9571Elliott HughesLOCAL_CFLAGS += -DALL_STATE
6660f7d882bb7661f9601f3843b0e393b6155cd9571Elliott Hughes# Include tzsetwall, timelocal, timegm, time2posix, and posix2time.
6670f7d882bb7661f9601f3843b0e393b6155cd9571Elliott HughesLOCAL_CFLAGS += -DSTD_INSPIRED
6680f7d882bb7661f9601f3843b0e393b6155cd9571Elliott Hughes# The name of the tm_gmtoff field in our struct tm.
6690f7d882bb7661f9601f3843b0e393b6155cd9571Elliott HughesLOCAL_CFLAGS += -DTM_GMTOFF=tm_gmtoff
6700f7d882bb7661f9601f3843b0e393b6155cd9571Elliott Hughes# Where we store our tzdata.
6710f7d882bb7661f9601f3843b0e393b6155cd9571Elliott HughesLOCAL_CFLAGS += -DTZDIR=\"/system/usr/share/zoneinfo\"
672eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# Include timezone and daylight globals.
673205c7887add8b8c85434c35158138f16265beb28Elliott HughesLOCAL_CFLAGS += -DUSG_COMPAT=1
674eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS += -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU
6758563802b04347951d8878747a830987e5ca145f5Elliott HughesLOCAL_CFLAGS += -Dlint
67665935979311373f2c7fa27cbfc189f49b188ca3aElliott Hughes
677cecc036970fba8b319cca302768865677f2be094Calin JuravleLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
678eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
679fcb502e3ec032497bba7f8634fb214e0c05394d8Calin JuravleLOCAL_C_INCLUDES := $(libc_common_c_includes) $(LOCAL_PATH)/tzcode/
6808563802b04347951d8878747a830987e5ca145f5Elliott HughesLOCAL_MODULE := libc_tzcode
6818563802b04347951d8878747a830987e5ca145f5Elliott HughesLOCAL_CLANG := $(use_clang)
6824c2da039baa6c621c78afa47ead85ec9e028f56dElliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
683eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CXX_STL := none
684eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
685eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_ADDRESS_SANITIZER := false
686eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
687c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
688eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
6893ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albertinclude $(BUILD_STATIC_LIBRARY)
690eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
6915ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert
692c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert# ========================================================
693eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# libc_dns.a - modified NetBSD DNS code
694f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# ========================================================
695eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
696eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(CLEAR_VARS)
697eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
698eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SRC_FILES := \
699f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    $(call all-c-files-under,dns) \
700f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-netbsd/lib/libc/isc/ev_streams.c \
701f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-netbsd/lib/libc/isc/ev_timers.c \
702f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-netbsd/lib/libc/resolv/mtctxres.c \
703f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
704f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# We use the OpenBSD res_random.
705f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_CFLAGS += \
706f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    -Dres_randomid=__res_randomid
707f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SRC_FILES += \
708f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-openbsd/lib/libc/net/res_random.c \
709f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
7109a5a3e8e74e2c6d7850ab29711189acf0f7378a2Elliott HughesLOCAL_CFLAGS += \
711d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    $(libc_common_cflags) \
71202c78a386739a8a2b3007efeb00a9ca04132100aElliott Hughes    -DANDROID_CHANGES \
7134c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -DINET6 \
7144c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -fvisibility=hidden \
715762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    -Wno-unused-parameter \
716762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    -include netbsd-compat.h \
717f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
718f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
719c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
720d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_C_INCLUDES := $(libc_common_c_includes) \
7213ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert    $(LOCAL_PATH)/dns/include \
722f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    $(LOCAL_PATH)/private \
7235ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert    $(LOCAL_PATH)/upstream-netbsd/lib/libc/include \
724c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert    $(LOCAL_PATH)/upstream-netbsd/android/include \
725f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
726f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_MODULE := libc_dns
7277c02d9428ca18ac600f7ba7d51bb24ca71e733f6Elliott HughesLOCAL_CLANG := $(use_clang)
728f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
729f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_CXX_STL := none
730f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
731f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_ADDRESS_SANITIZER := false
732f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
733f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
734f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
735f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
736f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
737f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
738f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
739f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# libc_freebsd.a - upstream FreeBSD C library code
740f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
741f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes#
742f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# These files are built with the freebsd-compat.h header file
7439a5a3e8e74e2c6d7850ab29711189acf0f7378a2Elliott Hughes# automatically included.
744eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
745d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughesinclude $(CLEAR_VARS)
746677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes
7474c2da039baa6c621c78afa47ead85ec9e028f56dElliott HughesLOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files)
7484c2da039baa6c621c78afa47ead85ec9e028f56dElliott HughesLOCAL_CFLAGS := \
749762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    $(libc_common_cflags) \
750762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    -Wno-sign-compare -Wno-uninitialized \
751f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    -include freebsd-compat.h \
752f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
753c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
754d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_CPPFLAGS := $(libc_common_cppflags)
7553ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan AlbertLOCAL_C_INCLUDES := $(libc_common_c_includes) \
756f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    $(LOCAL_PATH)/upstream-freebsd/android/include \
7575ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert    $(LOCAL_PATH)/upstream-freebsd/lib/libc/include \
758c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert
759f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_MODULE := libc_freebsd
760f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CLANG := $(use_clang)
761c82c0b7e072491da4818e7de37411fbb2055fce1Dan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
762f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_CXX_STL := none
763f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
764f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_ADDRESS_SANITIZER := false
765f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
7660133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
7670133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
7680133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_freebsd_src_files))
7690133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughesinclude $(BUILD_STATIC_LIBRARY)
7700133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
7710133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
7720133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# ========================================================
7730133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# libc_netbsd.a - upstream NetBSD C library code
77453e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes# ========================================================
775b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh#
776b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh# These files are built with the netbsd-compat.h header file
777b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh# automatically included.
778b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh
779b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsiehinclude $(CLEAR_VARS)
780b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh
781b58db8b083ce41798a5310616e4f20885cec611fChih-Hung HsiehLOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
7820133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_CFLAGS := \
7830133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes    $(libc_common_cflags) \
784c08c25b4c9bdd95bfbda56a8c21f51b88c8a692eElliott Hughes    -Wno-sign-compare -Wno-uninitialized \
785c08c25b4c9bdd95bfbda56a8c21f51b88c8a692eElliott Hughes    -DPOSIX_MISTAKE \
786c08c25b4c9bdd95bfbda56a8c21f51b88c8a692eElliott Hughes    -include netbsd-compat.h \
78753c3c271dc9927dd280981fc23409af60f460007Dmitriy Ivanov
788d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
7890133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
790f1ada79a83f6ac42f5efd995bf04374005ac532bElliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) \
7914c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    $(LOCAL_PATH)/upstream-netbsd/android/include \
7924c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    $(LOCAL_PATH)/upstream-netbsd/lib/libc/include \
7930133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
7940133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_MODULE := libc_netbsd
7950133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_CLANG := $(use_clang)
7960133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
7970133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_CXX_STL := none
7983ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan AlbertLOCAL_SYSTEM_SHARED_LIBRARIES :=
7990133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_ADDRESS_SANITIZER := false
8005ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan AlbertLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
801c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert
8020133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
8030133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_netbsd_src_files))
8047c02d9428ca18ac600f7ba7d51bb24ca71e733f6Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
8050133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
8060133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
8070133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# ========================================================
8080133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# libc_openbsd_ndk.a - upstream OpenBSD C library code
8094bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# that can be safely included in the libc_ndk.a (doesn't
8104bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# contain any troublesome global data or constructors).
8114bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# ========================================================
8124bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes#
8134bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# These files are built with the openbsd-compat.h header file
8144bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# automatically included.
8154bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
8164bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesinclude $(CLEAR_VARS)
8174bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
8184bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_openbsd_ndk_src_files)
819b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsiehifneq (,$(filter $(TARGET_ARCH),x86 x86_64))
820b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh  # Clang has wrong long double size or LDBL_MANT_DIG, http://b/17163651.
821b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh  LOCAL_CLANG := false
822b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsiehelse
823b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh  LOCAL_CLANG := $(use_clang)
824b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsiehendif
825b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsieh
8264bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_CFLAGS := \
8274bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    $(libc_common_cflags) \
8289a5a3e8e74e2c6d7850ab29711189acf0f7378a2Elliott Hughes    -Wno-sign-compare \
829cce36c187896fb0d4bd36519c4b2e90c502137dcElliott Hughes    -Wno-uninitialized \
83053c3c271dc9927dd280981fc23409af60f460007Dmitriy Ivanov    -Wno-unused-parameter \
831d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    -include openbsd-compat.h \
8324bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
833d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
8344bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
8354bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) \
8364bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    $(LOCAL_PATH)/private \
8374bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    $(LOCAL_PATH)/upstream-openbsd/android/include \
8384bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    $(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
8394bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    $(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \
8403ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert
8414bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_MODULE := libc_openbsd_ndk
8425ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
843c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan AlbertLOCAL_CXX_STL := none
8444bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
8454bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_ADDRESS_SANITIZER := false
8464bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
8474bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
8484bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
8494bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
85029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
85129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
852e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes# ========================================================
85329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# libc_openbsd.a - upstream OpenBSD C library code
85429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
85529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes#
856b6943186ce78105155ba67ab261a970859b190dfElliott Hughes# These files are built with the openbsd-compat.h header file
857b6943186ce78105155ba67ab261a970859b190dfElliott Hughes# automatically included.
858b6943186ce78105155ba67ab261a970859b190dfElliott Hughes
859a371750681a84c8f0445fa041e817582e12c125fChih-Hung Hsiehinclude $(CLEAR_VARS)
860a371750681a84c8f0445fa041e817582e12c125fChih-Hung Hsieh
861a371750681a84c8f0445fa041e817582e12c125fChih-Hung HsiehLOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files)
862a371750681a84c8f0445fa041e817582e12c125fChih-Hung Hsiehifneq (,$(filter $(TARGET_ARCH),x86 x86_64))
863a371750681a84c8f0445fa041e817582e12c125fChih-Hung Hsieh  # Clang has wrong long double size or LDBL_MANT_DIG, http://b/17163651.
864a371750681a84c8f0445fa041e817582e12c125fChih-Hung Hsieh  LOCAL_CLANG := false
865b58db8b083ce41798a5310616e4f20885cec611fChih-Hung Hsiehelse
866762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines  LOCAL_CLANG := $(use_clang)
8678b5df3920f2843c9cdf04160517c1e8b77c992f5Elliott Hughesendif
8683ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert
86929c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := \
870c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes    $(libc_common_cflags) \
871d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris    -Wno-sign-compare \
8723ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert    -Wno-uninitialized \
87329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes    -Wno-unused-parameter \
8745ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert    -include openbsd-compat.h \
875c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert
87629c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
877f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CPPFLAGS := $(libc_common_cppflags)
878f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_C_INCLUDES := $(libc_common_c_includes) \
87929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes    $(LOCAL_PATH)/private \
88029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes    $(LOCAL_PATH)/upstream-openbsd/android/include \
88129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes    $(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
88229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes    $(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \
883fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
884fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_MODULE := libc_openbsd
885fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
886fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CXX_STL := none
887fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SYSTEM_SHARED_LIBRARIES :=
888fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_ADDRESS_SANITIZER := false
889fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
890fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
891fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
892fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_openbsd_src_files))
893fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(BUILD_STATIC_LIBRARY)
8943ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert
895fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
896fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
897fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# libc_gdtoa.a - upstream OpenBSD C library gdtoa code
8983ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert# ========================================================
899fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert#
9005ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert# These files are built with the openbsd-compat.h header file
9016e9e6ad3bf831ed0b25ce2e6ce586a790044f8daDan Albert# automatically included.
9026e9e6ad3bf831ed0b25ce2e6ce586a790044f8daDan Albert
9036e9e6ad3bf831ed0b25ce2e6ce586a790044f8daDan Albertinclude $(CLEAR_VARS)
9046e9e6ad3bf831ed0b25ce2e6ce586a790044f8daDan Albert
9056e9e6ad3bf831ed0b25ce2e6ce586a790044f8daDan AlbertLOCAL_SRC_FILES_32 := $(libc_upstream_openbsd_gdtoa_src_files_32)
9066e9e6ad3bf831ed0b25ce2e6ce586a790044f8daDan AlbertLOCAL_SRC_FILES_64 := $(libc_upstream_openbsd_gdtoa_src_files_64)
9076e9e6ad3bf831ed0b25ce2e6ce586a790044f8daDan Albertifneq (,$(filter $(TARGET_ARCH),x86 x86_64))
9086e9e6ad3bf831ed0b25ce2e6ce586a790044f8daDan Albert  # Clang has wrong long double size or LDBL_MANT_DIG, http://b/17163651.
909fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert  LOCAL_CLANG := false
910fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertelse
911fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert  LOCAL_CLANG := $(use_clang)
912fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertendif
913fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
914b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_CFLAGS := \
915b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes    $(libc_common_cflags) \
916b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes    -Wno-sign-compare -Wno-uninitialized \
917b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes    -fvisibility=hidden \
918b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes    -include openbsd-compat.h \
919f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
920f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
921f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CPPFLAGS := $(libc_common_cppflags)
922f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_C_INCLUDES := $(libc_common_c_includes) \
923b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes    $(LOCAL_PATH)/private \
924c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes    $(LOCAL_PATH)/upstream-openbsd/android/include \
925b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes    $(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
9263ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert
927b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_MODULE := libc_gdtoa
9285ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
929c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan AlbertLOCAL_CXX_STL := none
930b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
931b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_ADDRESS_SANITIZER := false
932b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
933b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
934b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
935c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
936c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
937c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
938c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# ========================================================
939c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# libc_bionic.a - home-grown C library code
940c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# ========================================================
941c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
942c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughesinclude $(CLEAR_VARS)
943c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
944c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_src_files)
945c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \
946c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes    -Wframe-larger-than=2048 \
947c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
9483ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert# ssse3-strcmp-slm.S does not compile with Clang.
949c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG_ASFLAGS_x86_64 += -no-integrated-as
9505ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert
951c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert# memcpy.S, memchr.S, etc. do not compile with Clang.
952c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
953c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as
954c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
955c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
9569c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_CPPFLAGS := $(libc_common_cppflags) -Wold-style-cast
9579c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
9589c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_MODULE := libc_bionic
9599c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_CLANG := $(use_clang)
9609c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
9619c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_CXX_STL := none
9629c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_SYSTEM_SHARED_LIBRARIES :=
9639c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_ADDRESS_SANITIZER := false
9649c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan AlbertLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
9659c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert
9669c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
9679c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albertinclude $(BUILD_STATIC_LIBRARY)
9689c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert
9699c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert
9709c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert# ========================================================
9719c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert# libc_bionic_ndk.a - The portions of libc_bionic that can
9729c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert# be safely used in libc_ndk.a (no troublesome global data
9739c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert# or constructors).
9749c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert# ========================================================
9759c3fd59b00d6f477b1a7f8611cb4f829d64aa7eaDan Albert
976ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS)
977ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
978f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_ndk_src_files)
979ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := $(libc_common_cflags) \
9801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    -Wframe-larger-than=2048 \
981ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
982eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ssse3-strcmp-slm.S does not compile with Clang.
983762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CLANG_ASFLAGS_x86_64 += -no-integrated-as
984762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines
985ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# memcpy.S, memchr.S, etc. do not compile with Clang.
9861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
987c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as
988d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris
989ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
990ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags) -Wold-style-cast
991fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
992eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_MODULE := libc_bionic_ndk
993ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_CLANG := $(use_clang)
9944bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
9959b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_CXX_STL := none
996ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
9970133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_ADDRESS_SANITIZER := false
9986380b51a8d775a3b572b2db15195f279cb5565f6Elliott HughesLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
999b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
1000eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1001eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files))
1002c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
1003c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
10048e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferris
10059b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# ========================================================
100672bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferris# libc_pthread.a - pthreads parts that previously lived in
100772bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferris# libc_bionic.a. Relocated to their own library because
10083ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert# they can't be included in libc_ndk.a (as they layout of
10091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# pthread_t has changed over the years and has ABI
10101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# compatibility issues).
1011c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang# ========================================================
1012c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang
10135ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albertinclude $(CLEAR_VARS)
1014c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert
1015c97c5fc7880267fd835d22946a920bf370461cf2Ying WangLOCAL_SRC_FILES := $(libc_pthread_src_files)
1016f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CFLAGS := $(libc_common_cflags) \
1017f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -Wframe-larger-than=2048 \
1018f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
10191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ssse3-strcmp-slm.S does not compile with Clang.
10201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CLANG_ASFLAGS_x86_64 += -no-integrated-as
10211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1022ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# memcpy.S, memchr.S, etc. do not compile with Clang.
102349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
102449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as
102549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
102649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
102791a9925998f2b878f0245ce03aab22cc412a4d8bElliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags) -Wold-style-cast
102891a9925998f2b878f0245ce03aab22cc412a4d8bElliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
10299029d2f638160b37f65da176acd7ccb3aa0ba891Christopher FerrisLOCAL_MODULE := libc_pthread
10309029d2f638160b37f65da176acd7ccb3aa0ba891Christopher FerrisLOCAL_CLANG := $(use_clang)
103149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
103249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_CXX_STL := none
103349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES :=
103449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_ADDRESS_SANITIZER := false
1035f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1036f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
1037f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(BUILD_STATIC_LIBRARY)
103849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
103949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
10406a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# ========================================================
10414c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes# libc_cxa.a - Things traditionally in libstdc++
10424c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes# ========================================================
1043762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines
1044762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hinesinclude $(CLEAR_VARS)
104549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
104649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := $(libc_cxa_src_files)
1047c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \
1048d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris    -fvisibility=hidden \
104949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
10503ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan AlbertLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
105149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_CPPFLAGS := $(libc_common_cppflags)
10525ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan AlbertLOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
1053c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan AlbertLOCAL_MODULE := libc_cxa
105449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_CLANG := true # GCC refuses to hide new/delete
1055f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1056f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CXX_STL := none
105749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES :=
105849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_ADDRESS_SANITIZER := false
105949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# b/17574078: Need to disable coverage until we have a prebuilt libprofile_rt.
106049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# Since this is a static library built with clang, it needs to link
10619b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# libprofile_rt when it is linked into the final binary. Since the final binary
10629b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# is built with GCC, it won't link libprofile_rt. We can't very easily just add
10639b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# libprofile_rt to all link lines the way we've done for libgcov because
10649b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# libprofile_rt isn't prebuilt, and it would be tricky to write a rule that
10659b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# would make sure libprofile_rt is built.
10669b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_NATIVE_COVERAGE := false
10679b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes
10689b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
10699b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes
10709b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes
10719b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# ========================================================
10729b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# libc_syscalls.a
1073c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# ========================================================
10743ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert
10755ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albertinclude $(CLEAR_VARS)
1076c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albert
10779b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_SRC_FILES_$(TARGET_ARCH) := $(call all-S-files-under,arch-$(TARGET_ARCH)/syscalls)
10789b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughesifdef TARGET_2ND_ARCH
10799b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_SRC_FILES_$(TARGET_2ND_ARCH) := $(call all-S-files-under,arch-$(TARGET_2ND_ARCH)/syscalls)
10809b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughesendif
10819b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_MODULE := libc_syscalls
10821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CLANG := $(use_clang)
10831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
10841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CXX_STL := none
10851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
10861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_ADDRESS_SANITIZER := false
1087f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1088f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
1089f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(BUILD_STATIC_LIBRARY)
1090f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
10911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1092b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
10934c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes# libc_aeabi.a
10944c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes# This is an LP32 ARM-only library that needs to be built with -fno-builtin
1095762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# to avoid infinite recursion. For the other architectures we just build an
1096762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# empty library to keep this makefile simple.
10971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
1098ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
1099c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughesinclude $(CLEAR_VARS)
1100d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris
11011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES_arm := arch-arm/bionic/__aeabi.c
11023ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan AlbertLOCAL_MODULE := libc_aeabi
11031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CLANG := $(use_clang)
11045ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan AlbertLOCAL_CFLAGS := $(libc_common_cflags) -fno-builtin
1105c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
11061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CXX_STL := none
1107f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_SYSTEM_SHARED_LIBRARIES :=
1108f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_ADDRESS_SANITIZER := false
11091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
11101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
11111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
1112ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
11131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
11141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc_ndk.a
11151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Compatibility library for the NDK. This library contains
11161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# all the parts of libc that are safe to statically link.
111765935979311373f2c7fa27cbfc189f49b188ca3aElliott Hughes# We can't safely statically link things that can only run
1118762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# on a certain version of the OS. Examples include
1119762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# anything that talks to netd (a large portion of the DNS
11201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# code) and anything that is dependent on the layout of a
11211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# data structure that has changed across releases (such as
1122e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes# pthread_t).
1123e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes# ========================================================
1124e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes
1125e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughesinclude $(CLEAR_VARS)
112606e8796ee95793435c194b0a55e26d7b568c7409Sreeram Ramachandran
11271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_ndk
11284bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_CLANG := $(use_clang)
1129c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_ASFLAGS := $(LOCAL_CFLAGS)
1130d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1131914d8d4cff10f023ccd382fb43b2c7833dd34f72Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fvisibility=hidden -O0
11321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CPPFLAGS := $(libc_common_cppflags)
11330ae6445e9a85291b3a20da7f7a5b948cd18d3424Christopher FerrisLOCAL_C_INCLUDES := $(libc_common_c_includes)
11340ae6445e9a85291b3a20da7f7a5b948cd18d3424Christopher FerrisLOCAL_ADDRESS_SANITIZER := false
11350ae6445e9a85291b3a20da7f7a5b948cd18d3424Christopher FerrisLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
11360ae6445e9a85291b3a20da7f7a5b948cd18d3424Christopher FerrisLOCAL_SYSTEM_SHARED_LIBRARIES :=
11371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
11381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
11391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    $(libc_common_src_files) \
11401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    $(libc_arch_dynamic_src_files) \
11411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    $(libc_ndk_stub_src_files) \
11424bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    bionic/malloc_debug_common.cpp \
11431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
11441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES_arm += \
11451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    arch-common/bionic/crtbegin_so.c \
11461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    arch-arm/bionic/atexit_legacy.c \
11473ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert    arch-common/bionic/crtend_so.S \
11481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
11491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CFLAGS := $(libc_common_cflags) \
115071f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert    -DLIBC_STATIC \
115171f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert
115271f9b34fbeef00f3bd34364dadad41bff60b6b1dDan AlbertLOCAL_WHOLE_STATIC_LIBRARIES := \
115371f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert    libc_bionic_ndk \
115471f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert    libc_cxa \
115571f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert    libc_freebsd \
115671f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert    libc_gdtoa \
1157f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libc_malloc \
115876c8b882690dd9025caa625a023996c136377cb1Ying Wang    libc_netbsd \
115976c8b882690dd9025caa625a023996c136377cb1Ying Wang    libc_openbsd_ndk \
1160f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libc_stack_protector \
1161f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libc_syscalls \
1162f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libc_tzcode \
1163f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libm \
1164f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
1165f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
1166f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CXX_STL := none
11675ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert
1168c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan Albertifneq ($(MALLOC_IMPL),dlmalloc)
1169f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
11701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif
11711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
11721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1173b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files))
1174b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files))
1175b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine$(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS))
1176b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1177b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1178b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_STATIC_LIBRARY)
1179b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1180b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
1181ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a
1182b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
11831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
11841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
11851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
11866fe376d3925a788f60fd44280b00008af60b9334Christopher FerrisLOCAL_SRC_FILES := $(libc_common_src_files)
1187762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CFLAGS := $(libc_common_cflags)
1188762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
11891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CPPFLAGS := $(libc_common_cppflags)
1190861c0ef37bcfcae56d88572cb01c18bcfe1fadedChristopher FerrisLOCAL_C_INCLUDES := $(libc_common_c_includes)
1191861c0ef37bcfcae56d88572cb01c18bcfe1fadedChristopher FerrisLOCAL_MODULE := libc_common
1192861c0ef37bcfcae56d88572cb01c18bcfe1fadedChristopher FerrisLOCAL_CLANG := $(use_clang)
11931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
11941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := \
1195f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libc_bionic \
1196f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libc_bionic_ndk \
1197dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris    libc_cxa \
1198f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libc_dns \
1199f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    libc_freebsd \
12001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    libc_gdtoa \
12014bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    libc_malloc \
1202c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes    libc_netbsd \
1203d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris    libc_openbsd \
12041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    libc_openbsd_ndk \
1205e007775f4b21f6b94078ed1d34b753435ba28fdaPavel Chupin    libc_pthread \
120690a29db0f4a0893bdbd12f656d8869bb79ec3900Dan Albert    libc_stack_protector \
120790a29db0f4a0893bdbd12f656d8869bb79ec3900Dan Albert    libc_syscalls \
1208a7c2e0bad678280b9d76eacdb50b1361ab0849ffDan Albert    libc_tzcode \
1209a7c2e0bad678280b9d76eacdb50b1361ab0849ffDan Albert
12103f61f89b559551164b13441ff4ff02ed0718530aChristopher FerrisLOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
1211aa46fa24035f3ab020f9a7abd86c25ae2196bb32Bruce Beare
1212368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchevifneq ($(MALLOC_IMPL),dlmalloc)
1213b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
1214b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineendif
12155ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert
1216c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan AlbertLOCAL_CXX_STL := none
12171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
1218f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
1219b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# TODO: split out the asflags.
1220b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_ASFLAGS := $(LOCAL_CFLAGS)
1221b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_ADDRESS_SANITIZER := false
1222b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1223b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1224b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1225b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files))
1226b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine$(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS))
1227b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_STATIC_LIBRARY)
1228f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
12294c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
12304c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes# ========================================================
1231762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# libc_nomalloc.a
1232762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# ========================================================
1233b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine#
1234b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# This is a version of the static C library that does not
1235b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# include malloc. It's useful in situations when the user wants
1236b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# to provide their own malloc implementation, or wants to
1237dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris# explicitly disallow the use of malloc, such as in the
1238dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris# dynamic linker.
1239b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
12404bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesinclude $(CLEAR_VARS)
1241c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
1242d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_SRC_FILES := \
1243b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine    $(libc_arch_static_src_files) \
12447c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian    bionic/libc_init_static.cpp
12453ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert
12461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
1247368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan MalchevLOCAL_CFLAGS := $(libc_common_cflags) \
12481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project    -DLIBC_STATIC \
1249b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
12505ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan AlbertLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1251c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan AlbertLOCAL_CPPFLAGS := $(libc_common_cppflags)
12521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1253f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_MODULE := libc_nomalloc
12541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CLANG := $(use_clang)
12551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1256f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
1257b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CXX_STL := none
1258fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SYSTEM_SHARED_LIBRARIES :=
1259fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_ADDRESS_SANITIZER := false
1260fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1261fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
1262fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1263fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
1264fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(BUILD_STATIC_LIBRARY)
1265fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
1266fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
1267fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
12683ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert# libc_malloc.a: the _prefixed_ malloc functions (like dlcalloc).
1269fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
1270d9ff7226613014056c9edd79a68dc5af939107a0Dmitriy Ivanov
1271fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(CLEAR_VARS)
1272fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SRC_FILES := $(libc_malloc_src)
1273fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CFLAGS := $(libc_common_cflags) \
12743ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert    -fvisibility=hidden \
1275fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
12765ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan AlbertLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1277c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan AlbertLOCAL_CPPFLAGS := $(libc_common_cppflags)
1278fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_C_INCLUDES := $(libc_common_c_includes)
1279fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_MODULE := libc_malloc
1280fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CLANG := $(use_clang)
1281fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CXX_STL := none
1282fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_ADDRESS_SANITIZER := false
1283fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_NATIVE_COVERAGE := $(bionic_coverage)
12843ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1285fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(BUILD_STATIC_LIBRARY)
1286d9ff7226613014056c9edd79a68dc5af939107a0Dmitriy Ivanov
1287fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
1288fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
1289fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# libc.a
12903ec67de0513c1d7e5f41f7f17e8251122a0cc9d2Dan Albert# ========================================================
1291fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(CLEAR_VARS)
12925ba672ebcb0bbb77f22bbc6c98ec03867ac1711dDan Albert
1293c2d39088d8c6f621dbde0410a1fc24b9f9e7f824Dan AlbertLOCAL_SRC_FILES := \
1294fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    $(libc_arch_static_src_files) \
1295fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    bionic/malloc_debug_common.cpp \
1296b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine    bionic/libc_init_static.cpp \
12971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
12981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CFLAGS := $(libc_common_cflags) \
1299    -DLIBC_STATIC \
1300
1301LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1302LOCAL_CPPFLAGS := $(libc_common_cppflags)
1303LOCAL_C_INCLUDES := $(libc_common_c_includes)
1304LOCAL_MODULE := libc
1305LOCAL_CLANG := $(use_clang)
1306LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1307LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
1308LOCAL_CXX_STL := none
1309LOCAL_SYSTEM_SHARED_LIBRARIES :=
1310LOCAL_ADDRESS_SANITIZER := false
1311LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1312
1313$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1314$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
1315include $(BUILD_STATIC_LIBRARY)
1316
1317
1318# ========================================================
1319# libc.so
1320# ========================================================
1321include $(CLEAR_VARS)
1322
1323LOCAL_CFLAGS := $(libc_common_cflags)
1324LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1325LOCAL_CPPFLAGS := $(libc_common_cppflags)
1326LOCAL_C_INCLUDES := $(libc_common_c_includes)
1327LOCAL_SRC_FILES := \
1328    $(libc_arch_dynamic_src_files) \
1329    bionic/malloc_debug_common.cpp \
1330    bionic/libc_init_dynamic.cpp \
1331    bionic/NetdClient.cpp \
1332
1333LOCAL_MODULE := libc
1334LOCAL_CLANG := $(use_clang)
1335LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1336LOCAL_REQUIRED_MODULES := tzdata
1337
1338# Leave the symbols in the shared library so that stack unwinders can produce
1339# meaningful name resolution.
1340LOCAL_STRIP_MODULE := keep_symbols
1341
1342# WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries,
1343# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This
1344# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
1345# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
1346# should, instead relying on the external symbols from the dependent libraries.  That would
1347# create a "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
1348# you wanted!
1349
1350LOCAL_SHARED_LIBRARIES := libdl
1351LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
1352LOCAL_CXX_STL := none
1353LOCAL_SYSTEM_SHARED_LIBRARIES :=
1354
1355# We'd really like to do this for all architectures, but since this wasn't done
1356# before, these symbols must continue to be exported on LP32 for binary
1357# compatibility.
1358LOCAL_LDFLAGS_64 := -Wl,--exclude-libs,libgcc.a
1359
1360$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1361$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files))
1362# special for arm
1363LOCAL_NO_CRT_arm := true
1364LOCAL_CFLAGS_arm += -DCRT_LEGACY_WORKAROUND
1365LOCAL_ASFLAGS_arm += $(libc_crt_target_cflags)
1366LOCAL_SRC_FILES_arm += \
1367    arch-common/bionic/crtbegin_so.c \
1368    arch-common/bionic/crtbrand.S \
1369    arch-arm/bionic/atexit_legacy.c \
1370    arch-common/bionic/crtend_so.S
1371LOCAL_ADDRESS_SANITIZER := false
1372LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1373
1374include $(BUILD_SHARED_LIBRARY)
1375
1376
1377# For all builds, except for the -user build we will enable memory
1378# allocation checking (including memory leaks, buffer overwrites, etc.)
1379# Note that all these checks are also controlled by env. settings
1380# that can enable, or disable specific checks. Note also that some of
1381# the checks are available only in emulator and are implemeted in
1382# libc_malloc_qemu_instrumented.so.
1383ifneq ($(TARGET_BUILD_VARIANT),user)
1384
1385# ========================================================
1386# libc_malloc_debug_leak.so
1387# ========================================================
1388include $(CLEAR_VARS)
1389
1390LOCAL_CFLAGS := $(libc_common_cflags)
1391LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1392LOCAL_CPPFLAGS := $(libc_common_cppflags)
1393
1394# Make sure that unwind.h comes from libunwind.
1395LOCAL_C_INCLUDES := \
1396    $(libc_common_c_includes) \
1397
1398LOCAL_SRC_FILES := \
1399    bionic/debug_mapinfo.cpp \
1400    bionic/debug_stacktrace.cpp \
1401    bionic/libc_logging.cpp \
1402    bionic/malloc_debug_leak.cpp \
1403    bionic/malloc_debug_check.cpp \
1404
1405LOCAL_MODULE := libc_malloc_debug_leak
1406LOCAL_CLANG := $(use_clang)
1407LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1408
1409LOCAL_SHARED_LIBRARIES := libc libdl
1410LOCAL_CXX_STL := none
1411LOCAL_SYSTEM_SHARED_LIBRARIES :=
1412# Only need this for arm since libc++ uses its own unwind code that
1413# doesn't mix with the other default unwind code.
1414LOCAL_STATIC_LIBRARIES_arm := libunwind_llvm
1415LOCAL_STATIC_LIBRARIES += libc++abi
1416LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
1417
1418# Don't install on release build
1419LOCAL_MODULE_TAGS := eng debug
1420LOCAL_ADDRESS_SANITIZER := false
1421LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1422
1423$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1424include $(BUILD_SHARED_LIBRARY)
1425
1426
1427# ========================================================
1428# libc_malloc_debug_qemu.so
1429# ========================================================
1430include $(CLEAR_VARS)
1431
1432LOCAL_CFLAGS := \
1433    $(libc_common_cflags) \
1434    -DMALLOC_QEMU_INSTRUMENT \
1435
1436LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1437LOCAL_CPPFLAGS := $(libc_common_cppflags)
1438
1439LOCAL_C_INCLUDES := $(libc_common_c_includes)
1440
1441LOCAL_SRC_FILES := \
1442    bionic/libc_logging.cpp \
1443    bionic/malloc_debug_qemu.cpp \
1444
1445LOCAL_MODULE := libc_malloc_debug_qemu
1446LOCAL_CLANG := $(use_clang)
1447LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1448
1449LOCAL_SHARED_LIBRARIES := libc libdl
1450LOCAL_CXX_STL := none
1451LOCAL_SYSTEM_SHARED_LIBRARIES :=
1452
1453# Don't install on release build
1454LOCAL_MODULE_TAGS := eng debug
1455LOCAL_ADDRESS_SANITIZER := false
1456LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1457
1458$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1459include $(BUILD_SHARED_LIBRARY)
1460
1461endif  #!user
1462
1463# ========================================================
1464# libstdc++.so
1465# ========================================================
1466libstdcxx_common_src_files := \
1467    bionic/__cxa_guard.cpp \
1468    bionic/__cxa_pure_virtual.cpp \
1469    bionic/new.cpp \
1470    bionic/libc_logging.cpp \
1471
1472include $(CLEAR_VARS)
1473LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
1474LOCAL_CFLAGS := $(libc_common_cflags)
1475LOCAL_CPPFLAGS := $(libc_common_cppflags)
1476LOCAL_SRC_FILES := $(libstdcxx_common_src_files)
1477LOCAL_MODULE:= libstdc++
1478LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
1479LOCAL_CXX_STL := none
1480LOCAL_SYSTEM_SHARED_LIBRARIES := libc
1481LOCAL_ADDRESS_SANITIZER := false
1482LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1483include $(BUILD_SHARED_LIBRARY)
1484
1485# ========================================================
1486# libstdc++.a
1487# ========================================================
1488include $(CLEAR_VARS)
1489LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
1490LOCAL_CFLAGS := $(libc_common_cflags)
1491LOCAL_CPPFLAGS := $(libc_common_cppflags)
1492LOCAL_SRC_FILES := $(libstdcxx_common_src_files)
1493LOCAL_MODULE:= libstdc++
1494LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
1495LOCAL_CXX_STL := none
1496LOCAL_SYSTEM_SHARED_LIBRARIES := libc
1497LOCAL_ADDRESS_SANITIZER := false
1498LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1499include $(BUILD_STATIC_LIBRARY)
1500
1501
1502# ========================================================
1503include $(call all-makefiles-under,$(LOCAL_PATH))
1504