Android.mk revision fd5ee9aebc0a43c7f36a0778c7f416b39ddb870e
1e210488e0d4082b9a0c55195c22191f29ed56bf8Serban ConstantinescuLOCAL_PATH := $(call my-dir)
21dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris# Make everything depend on any changes to included makefiles.
4f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies := $(LOCAL_PATH)/Android.mk
5f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
6f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Load config for TARGET_ARCH
7f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
8f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
9f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies += \
10f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
11f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
12f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
13f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
14f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Load config for TARGET_2ND_ARCH
15f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
16f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk
17f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
18f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies += \
19f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk
20f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
21f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
22f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# crt obj files
23f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# ========================================================
24f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
25f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_crt_target_cflags := \
26f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -I$(LOCAL_PATH)/include \
27f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
28f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
29f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
30f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/crt.mk
31f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
32f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
33f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/crt.mk
34f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
35f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
36d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris
37ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the common source files for all the libc instances
38ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# =========================================================
391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files := \
4076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/bindresvport.c \
4176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/daemon.c \
4276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/err.c \
4376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ether_aton.c \
4476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ether_ntoa.c \
4576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/fts.c \
4676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/gethostname.c \
4776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/getpriority.c \
4876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/if_indextoname.c \
4976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/if_nametoindex.c \
5076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/initgroups.c \
5176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ioctl.c \
5276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/isatty.c \
5376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/memmem.c \
5476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/pathconf.c \
5576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/pututline.c \
5676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sched_cpualloc.c \
5776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sched_cpucount.c \
5876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/semaphore.c \
5976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sigblock.c \
6076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/siginterrupt.c \
6176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sigsetmask.c \
6276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/system_properties_compat.c \
63aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/snprintf.c\
64aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/sprintf.c \
65eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
6659a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris# Fortify implementations of libc functions.
6759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferrislibc_common_src_files += \
6890201d5eca050414d50a433866ccb580415bb0d4Nick Kralevich    bionic/__FD_chk.cpp \
6959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__fgets_chk.cpp \
7059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__memmove_chk.cpp \
71b036b5ca36c1e12b075909b3eca6eab73ee611cfNick Kralevich    bionic/__read_chk.cpp \
7260f4f9a5b99a0a66817f50edfc2194a49f8b5146Nick Kralevich    bionic/__recvfrom_chk.cpp \
73950a58e24d1019eb9d814dbb16f111a6b61e3f23Christopher Ferris    bionic/__stpcpy_chk.cpp \
74950a58e24d1019eb9d814dbb16f111a6b61e3f23Christopher Ferris    bionic/__stpncpy_chk.cpp \
7559a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strchr_chk.cpp \
7659a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlcat_chk.cpp \
7759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlcpy_chk.cpp \
7859a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlen_chk.cpp \
7959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strncat_chk.cpp \
8059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strncpy_chk.cpp \
8159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strrchr_chk.cpp \
8259a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__umask_chk.cpp \
8359a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__vsnprintf_chk.cpp \
8459a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__vsprintf_chk.cpp \
8559a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris
8629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hugheslibc_bionic_src_files := \
8761e699a133a4807fe878a6cb0d7190d7c96e21f8Elliott Hughes    bionic/abort.cpp \
888f0cd8aa22906c3e678738eeba20fc1a5c399b6cSreeram Ramachandran    bionic/accept.cpp \
89903b78873a744d3fba187e4bd22008ba21162e51Sreeram Ramachandran    bionic/accept4.cpp \
90f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/access.cpp \
91063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/assert.cpp \
925a8173860d65182af022be88fed0c5d8d5dcb69dElliott Hughes    bionic/atof.cpp \
93a406ee6d5f616192e9a13afad6ac6a9969814fc1Brigid Smith    bionic/bionic_systrace.cpp \
9411952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/bionic_time_conversions.cpp \
95428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes    bionic/brk.cpp \
967a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/c16rtomb.cpp \
977a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/c32rtomb.cpp \
98f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/chmod.cpp \
99f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/chown.cpp \
10058d9e280d459225aa8dc4533e883182b08215f7dElliott Hughes    bionic/clearenv.cpp \
101cccfe1e17c47799deee67fa23f48d8c860390ac8Elliott Hughes    bionic/clock.cpp \
10236d6188f8cd8b948fb797f11d9620d63d0c2215aElliott Hughes    bionic/clone.cpp \
103f8408c58fa61540d8b6b5afec4246284482d89c2Calin Juravle    bionic/__cmsg_nxthdr.cpp \
104ceb5bd787c8ce281e5f4343c5d4f77b41c3e2919Sreeram Ramachandran    bionic/connect.cpp \
105dfb5ce42bcc5a275af49211c0bbe64c5ec3d2668Dan Albert    bionic/ctype.cpp \
106c30396f5f225e0b5a83a35432e2d82a7063cfdb9David 'Digit' Turner    bionic/dirent.cpp \
107cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/dup2.cpp \
108cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/epoll_create.cpp \
10911952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/epoll_pwait.cpp \
110aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/epoll_wait.cpp \
1112a0b873065edb304fa2d1c54f8de663ea638b8abElliott Hughes    bionic/__errno.cpp \
1129b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng    bionic/eventfd_read.cpp \
1139b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng    bionic/eventfd_write.cpp \
114bf425680e484486803bf21e4c4cd1e3f36614a3cElliott Hughes    bionic/ffs.cpp \
11553e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    bionic/flockfile.cpp \
116232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/fork.cpp \
11702c78a386739a8a2b3007efeb00a9ca04132100aElliott Hughes    bionic/fpclassify.cpp \
118d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1Elliott Hughes    bionic/futimens.cpp \
1192c5153b043b44e9935a334ae9b2d5a4bc5258b40Nick Kralevich    bionic/getauxval.cpp \
120063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/getcwd.cpp \
1212b67d7dee09852789d9ac7d8972ed6cdb2c18430Elliott Hughes    bionic/getentropy_linux.c \
122247dc91889ffc8b71fc3371edba9d834afab96abElliott Hughes    bionic/getpgrp.cpp \
1237086ad6919feb2415c6027163f5c63323bcca27cElliott Hughes    bionic/getpid.cpp \
1245d9a7ba0dc9c24ed4e4efa9cac0e796fd524b308Elliott Hughes    bionic/gettid.cpp \
125cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/inotify_init.cpp \
126f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/lchown.cpp \
127fe317a3775e16d466bb884a8e054fd77f7087bb3Calin Juravle    bionic/lfs64_support.cpp \
1280990d4fda898ada86e557f872f5cb7d16b138e3cElliott Hughes    bionic/__libc_current_sigrtmax.cpp \
1290990d4fda898ada86e557f872f5cb7d16b138e3cElliott Hughes    bionic/__libc_current_sigrtmin.cpp \
13042b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes    bionic/libc_init_common.cpp \
1318f2a5a0b40fc82126c691d5c30131d908772aab7Elliott Hughes    bionic/libc_logging.cpp \
13258b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes    bionic/libgen.cpp \
133f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/link.cpp \
1345363a45f2b6d4eeb054710d0886bbadea8a15273Elliott Hughes    bionic/locale.cpp \
135f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/lstat.cpp \
1367a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/mbrtoc16.cpp \
1377a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/mbrtoc32.cpp \
1387a7f9952c12b216fbf91fc4cdbb97045e8861115Dan Albert    bionic/mbstate.cpp \
139f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/mkdir.cpp \
140594b1a4af204aa9de2b4913182f4556e38d71648Elliott Hughes    bionic/mkfifo.cpp \
141f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/mknod.cpp \
142eb664e24c074b88539b743668109d8b4eaa925bdElliott Hughes    bionic/mntent.cpp \
1438205a61248973ac13716ae80e712c80e126b0541Sreeram Ramachandran    bionic/NetdClientDispatch.cpp \
144f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/open.cpp \
14511952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/pause.cpp \
146cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/pipe.cpp \
14711952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/poll.cpp \
148f64b8ea09db3bdd84eed59f7721301743332b3feElliott Hughes    bionic/posix_fallocate.cpp \
1494b558f50a42c97d461f1dede5aaaae490ea99e2eElliott Hughes    bionic/posix_timers.cpp \
150c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_atfork.cpp \
1513e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pthread_attr.cpp \
152c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_cond.cpp \
153c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_create.cpp \
1549d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_detach.cpp \
1559d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_equal.cpp \
156c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_exit.cpp \
1579d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_getcpuclockid.cpp \
1589d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_getschedparam.cpp \
1599d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_internals.cpp \
1609d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_join.cpp \
161c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_key.cpp \
1629d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_kill.cpp \
163c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_mutex.cpp \
164c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_once.cpp \
165c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_rwlock.cpp \
1669d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_self.cpp \
1673e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pthread_setname_np.cpp \
1689d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_setschedparam.cpp \
169c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/pthread_sigmask.cpp \
170c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/ptrace.cpp \
1714916706cfe590eb06c9b5bd4bd402ce056034d51Elliott Hughes    bionic/pty.cpp \
172d8a5a6f513c6fa99229e9c82c5c308c7cd6b3d54Chris Dearman    bionic/raise.cpp \
17376c241b091b4d9d9a9237d40e814e52ce2917f47Elliott Hughes    bionic/rand.cpp \
174f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/readlink.cpp \
175a38cb088619d3e2f2194247038c10897d1c5036eElliott Hughes    bionic/reboot.cpp \
176247dc91889ffc8b71fc3371edba9d834afab96abElliott Hughes    bionic/recv.cpp \
177f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/rename.cpp \
178f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/rmdir.cpp \
179701bec2af33feaa9dddf12ccf8e4c714441b7f2eElliott Hughes    bionic/scandir.cpp \
1804ca685e36e9d7f53c135eba2b4b8ece152129dbeKito Cheng    bionic/sched_getaffinity.cpp \
181887e1140fe7596fa1239a0bc802d2cdb51c57d3cElliott Hughes    bionic/sched_getcpu.cpp \
182247dc91889ffc8b71fc3371edba9d834afab96abElliott Hughes    bionic/send.cpp \
183232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/setegid.cpp \
1844a9e837840fda3aaea48aeba85c7c7a8782d2586Elliott Hughes    bionic/__set_errno.cpp \
185232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/seteuid.cpp \
1865a8173860d65182af022be88fed0c5d8d5dcb69dElliott Hughes    bionic/setpgrp.cpp \
187c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigaction.cpp \
188c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigaddset.cpp \
189c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigdelset.cpp \
190c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigemptyset.cpp \
191c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigfillset.cpp \
192c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigismember.cpp \
193c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/signal.cpp \
194aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/signalfd.cpp \
19540d105ccb3e6283566ce54b693b3088f31aa4f26Elliott Hughes    bionic/sigpending.cpp \
19619e62325c268a668692e2b65fde2284079f369aaElliott Hughes    bionic/sigprocmask.cpp \
1971f5af926fa626734981d6b4dcc0ab54e520032a9Elliott Hughes    bionic/sigsuspend.cpp \
198c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/sigwait.cpp \
199903b78873a744d3fba187e4bd22008ba21162e51Sreeram Ramachandran    bionic/socket.cpp \
200f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/stat.cpp \
20106040fd75c1edff9e5ffb2b3d3e2a6e66d57c11dElliott Hughes    bionic/statvfs.cpp \
202dfb5ce42bcc5a275af49211c0bbe64c5ec3d2668Dan Albert    bionic/strcoll_l.cpp \
203063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strerror.cpp \
204063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strerror_r.cpp \
205dfb5ce42bcc5a275af49211c0bbe64c5ec3d2668Dan Albert    bionic/strftime_l.cpp \
206063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strsignal.cpp \
2075a8173860d65182af022be88fed0c5d8d5dcb69dElliott Hughes    bionic/strtold.cpp \
208dfb5ce42bcc5a275af49211c0bbe64c5ec3d2668Dan Albert    bionic/strtold_l.cpp \
209dfb5ce42bcc5a275af49211c0bbe64c5ec3d2668Dan Albert    bionic/strtoll_l.cpp \
210dfb5ce42bcc5a275af49211c0bbe64c5ec3d2668Dan Albert    bionic/strtoull_l.cpp \
211dfb5ce42bcc5a275af49211c0bbe64c5ec3d2668Dan Albert    bionic/strxfrm_l.cpp \
212063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/stubs.cpp \
213f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/symlink.cpp \
21491a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes    bionic/sysconf.cpp \
2153ad8ecb64e9dd5614169232b84a93eb3b8aa32d7Elliott Hughes    bionic/syslog.cpp \
216aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/sys_siglist.c \
217aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/sys_signame.c \
2185a8173860d65182af022be88fed0c5d8d5dcb69dElliott Hughes    bionic/system_properties.cpp \
219063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/tdestroy.cpp \
2208d4b5849f21dc4115ad66944dc11df838b3faa52Elliott Hughes    bionic/termios.cpp \
2210468feb28696751efcddada8de69a622afffdba8Elliott Hughes    bionic/thread_private.cpp \
222063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/tmpfile.cpp \
223247dc91889ffc8b71fc3371edba9d834afab96abElliott Hughes    bionic/umount.cpp \
224f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/unlink.cpp \
225f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/utimes.cpp \
226625993dfbb085a3cde7492eda8ec1cdc1ee39a78Elliott Hughes    bionic/vdso.cpp \
22717a8b0db63d54e9d79bf11112ace0c4fe9606289Elliott Hughes    bionic/wait.cpp \
228063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/wchar.cpp \
2295a0aa3dee247a313f04252cf45608097695d5953Elliott Hughes    bionic/wctype.cpp \
23029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
231fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertlibc_cxa_src_files := \
232fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    bionic/__cxa_guard.cpp \
233fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    bionic/__cxa_pure_virtual.cpp \
234fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    bionic/new.cpp \
235fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
236f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hugheslibc_upstream_freebsd_src_files := \
23757a883640f3b43bf5e332d64489b3eab67a5ac3fElliott Hughes    upstream-freebsd/lib/libc/gen/ldexp.c \
238ab61eb366ac48addf2bca6093a34455193f5c8dfElliott Hughes    upstream-freebsd/lib/libc/gen/sleep.c \
239ab61eb366ac48addf2bca6093a34455193f5c8dfElliott Hughes    upstream-freebsd/lib/libc/gen/usleep.c \
2406b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fclose.c \
2416b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/flags.c \
2426b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fopen.c \
243aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/abs.c \
244d278b828fef47fb2d7098f8ec70867fbd3da09d6Elliott Hughes    upstream-freebsd/lib/libc/stdlib/getopt_long.c \
245aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/imaxabs.c \
246aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/imaxdiv.c \
247aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/labs.c \
248aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/llabs.c \
2490b25f633a23e575c8a1f9547d1af5dc5b0157a1cElliott Hughes    upstream-freebsd/lib/libc/stdlib/qsort.c \
250b8425c549a0bfe08b01b5906b95603d8523c1b16Dan Albert    upstream-freebsd/lib/libc/stdlib/quick_exit.c \
251f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-freebsd/lib/libc/stdlib/realpath.c \
252eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcpcpy.c \
253eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcpncpy.c \
254eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcscasecmp.c \
255eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcscspn.c \
256eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsdup.c \
257eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcslcat.c \
258eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncasecmp.c \
259eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncat.c \
260eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncmp.c \
261eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncpy.c \
262eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsnlen.c \
263eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcspbrk.c \
264eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsspn.c \
265eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcstok.c \
266eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemchr.c \
267eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemcpy.c \
268eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemset.c \
269f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
270f8b3a920a895a53b207017249080087d562bd0d2Elliott Hugheslibc_upstream_netbsd_src_files := \
271a0beeeabbc8735bc830544cbbb1d920122b8d958Elliott Hughes    upstream-netbsd/common/lib/libc/stdlib/random.c \
272677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/gen/ftw.c \
273677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/gen/nftw.c \
274677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/gen/nice.c \
275677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/gen/popen.c \
276677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/gen/psignal.c \
277677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/gen/utime.c \
27819f58efa22357bfaa6a63a0940928830e95c5123Elliott Hughes    upstream-netbsd/lib/libc/gen/utmp.c \
279a210cae724313604f8cbd49cc6deab1be5239083Elliott Hughes    upstream-netbsd/lib/libc/inet/nsap_addr.c \
280677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/regex/regcomp.c \
281677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/regex/regerror.c \
282677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/regex/regexec.c \
283677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/regex/regfree.c \
284677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/bsearch.c \
285677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/div.c \
286677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/drand48.c \
287677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/erand48.c \
2883e424d0a241f8ae5194514dabc4ad899f5a5416dElliott Hughes    upstream-netbsd/lib/libc/stdlib/insque.c \
289677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/jrand48.c \
290677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/ldiv.c \
291677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/lldiv.c \
292677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/lrand48.c \
293677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/mrand48.c \
294677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/nrand48.c \
295677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/_rand48.c \
296a0beeeabbc8735bc830544cbbb1d920122b8d958Elliott Hughes    upstream-netbsd/lib/libc/stdlib/rand_r.c \
2973e424d0a241f8ae5194514dabc4ad899f5a5416dElliott Hughes    upstream-netbsd/lib/libc/stdlib/remque.c \
298677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/seed48.c \
299677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/stdlib/srand48.c \
300677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/string/memccpy.c \
301677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/string/strcasestr.c \
302677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/string/strcoll.c \
303677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/string/strxfrm.c \
304677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    upstream-netbsd/lib/libc/unistd/killpg.c \
305f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
3064bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hugheslibc_upstream_openbsd_gdtoa_src_files := \
307d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    upstream-openbsd/android/gdtoa_support.cpp \
3084bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/dmisc.c \
3094bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/dtoa.c \
3104bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/gdtoa.c \
3114bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    upstream-openbsd/lib/libc/gdtoa/gethex.c \
3124bd97cee28dd815fff54fc97560be60d566c1fa5Elliott 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
33353e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hugheslibc_upstream_openbsd_src_files := \
3342b67d7dee09852789d9ac7d8972ed6cdb2c18430Elliott Hughes    upstream-openbsd/lib/libc/crypt/arc4random.c \
3352b67d7dee09852789d9ac7d8972ed6cdb2c18430Elliott Hughes    upstream-openbsd/lib/libc/crypt/arc4random_uniform.c \
336aedb00d04eb7f0b20b6abde702ba94a46577ca68Elliott Hughes    upstream-openbsd/lib/libc/gen/alarm.c \
337f3c73901cb5ca4de2651151cf2c65b31a729466eElliott Hughes    upstream-openbsd/lib/libc/gen/ctype_.c \
33853e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/gen/exec.c \
33953e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/gen/fnmatch.c \
340692207eb457f9b4bf6cb4301d710d19b6e85c902Elliott Hughes    upstream-openbsd/lib/libc/gen/ftok.c \
341692207eb457f9b4bf6cb4301d710d19b6e85c902Elliott Hughes    upstream-openbsd/lib/libc/gen/getprogname.c \
342f3c73901cb5ca4de2651151cf2c65b31a729466eElliott Hughes    upstream-openbsd/lib/libc/gen/isctype.c \
343692207eb457f9b4bf6cb4301d710d19b6e85c902Elliott Hughes    upstream-openbsd/lib/libc/gen/setprogname.c \
344cccfe1e17c47799deee67fa23f48d8c860390ac8Elliott Hughes    upstream-openbsd/lib/libc/gen/time.c \
34553e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/gen/tolower_.c \
346692207eb457f9b4bf6cb4301d710d19b6e85c902Elliott Hughes    upstream-openbsd/lib/libc/gen/toupper_.c \
3473d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/btowc.c \
3483d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/mbrlen.c \
3493d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/mbstowcs.c \
3500a5e26da1eae6b75a89695faf2e057c5c4717721Elliott Hughes    upstream-openbsd/lib/libc/locale/mbtowc.c \
351c8937eadf4a45afebe586dcea7a8ed882f3bec3bElliott Hughes    upstream-openbsd/lib/libc/locale/wcscoll.c \
3523d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstod.c \
3533d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstof.c \
35401ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoimax.c \
3553d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstol.c \
3563d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstold.c \
3573d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoll.c \
3583d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstombs.c \
3593d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoul.c \
3603d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoull.c \
36101ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/locale/wcstoumax.c \
362ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/locale/wcsxfrm.c \
3633d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes    upstream-openbsd/lib/libc/locale/wctob.c \
3645a0aa3dee247a313f04252cf45608097695d5953Elliott Hughes    upstream-openbsd/lib/libc/locale/wctomb.c \
3656a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/htonl.c \
3666a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/htons.c \
3676a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_addr.c \
3686a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_lnaof.c \
3696a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_makeaddr.c \
3706a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_netof.c \
3716a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_network.c \
3726a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_ntoa.c \
373f51d3e87671110c508f0f71d9bcb1bf54c22ca3bElliott Hughes    upstream-openbsd/lib/libc/net/inet_ntop.c \
3746a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/inet_pton.c \
3756a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/ntohl.c \
3766a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes    upstream-openbsd/lib/libc/net/ntohs.c \
377ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/asprintf.c \
378ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/clrerr.c \
379fcac8ff97f6b6cced6546e0096cadc1039b68b5eElliott Hughes    upstream-openbsd/lib/libc/stdio/dprintf.c \
380ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fdopen.c \
381ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/feof.c \
38253e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/ferror.c \
38353e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/fflush.c \
384ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetc.c \
385ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetln.c \
386ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetpos.c \
387ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgets.c \
38801ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/fgetwc.c \
389c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/fgetws.c \
390ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fileno.c \
391623b0d05bd924e7fa3c155492695123c87c3a2b1Dmitriy Ivanov    upstream-openbsd/lib/libc/stdio/findfp.c \
392ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fprintf.c \
39353e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/fpurge.c \
394ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fputc.c \
39553e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/fputs.c \
396c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/fputwc.c \
397c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/fputws.c \
3989d3c2dd11f5e796cd814cddc5b907494f859058eElliott Hughes    upstream-openbsd/lib/libc/stdio/fread.c \
399ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/freopen.c \
400ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fscanf.c \
40153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/fseek.c \
402ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fsetpos.c \
403ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/ftell.c \
404ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/funopen.c \
4059d3c2dd11f5e796cd814cddc5b907494f859058eElliott Hughes    upstream-openbsd/lib/libc/stdio/fvwrite.c \
406ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fwalk.c \
407c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/fwide.c \
40894336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/fwprintf.c \
409792ae72e41923800ba8797d87a76346cb2de14b9Elliott Hughes    upstream-openbsd/lib/libc/stdio/fwrite.c \
41001ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/fwscanf.c \
411ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/getc.c \
412ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/getchar.c \
413ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/getdelim.c \
41453e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/getline.c \
41553e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/gets.c \
416c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/getwc.c \
417c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/getwchar.c \
418623b0d05bd924e7fa3c155492695123c87c3a2b1Dmitriy Ivanov    upstream-openbsd/lib/libc/stdio/makebuf.c \
41965935979311373f2c7fa27cbfc189f49b188ca3aElliott Hughes    upstream-openbsd/lib/libc/stdio/mktemp.c \
420ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/perror.c \
421ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/printf.c \
42253e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/putc.c \
423ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/putchar.c \
424ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/puts.c \
425c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/putwc.c \
426c932225e1061dc57fc4bf2d6203d9737f4f989faElliott Hughes    upstream-openbsd/lib/libc/stdio/putwchar.c \
427ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/refill.c \
428ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/remove.c \
429ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/rewind.c \
43053e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/rget.c \
43153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdio/scanf.c \
432ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/setbuf.c \
433ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/setbuffer.c \
434623b0d05bd924e7fa3c155492695123c87c3a2b1Dmitriy Ivanov    upstream-openbsd/lib/libc/stdio/setvbuf.c \
435603332fc4c2d073f0e197f9ce4517710e9b3a6d0Elliott Hughes    upstream-openbsd/lib/libc/stdio/sscanf.c \
436ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/stdio.c \
43794336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/swprintf.c \
43801ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/swscanf.c \
439ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/tempnam.c \
440ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/tmpnam.c \
441ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/ungetc.c \
44201ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/ungetwc.c \
443ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vasprintf.c \
444fcac8ff97f6b6cced6546e0096cadc1039b68b5eElliott Hughes    upstream-openbsd/lib/libc/stdio/vdprintf.c \
4450549371bd74ba7c7a5a16c2a7d6cc17dbe0e6f97Elliott Hughes    upstream-openbsd/lib/libc/stdio/vfprintf.c \
446603332fc4c2d073f0e197f9ce4517710e9b3a6d0Elliott Hughes    upstream-openbsd/lib/libc/stdio/vfscanf.c \
44794336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/vfwprintf.c \
44801ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/vfwscanf.c \
449ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vprintf.c \
450ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vscanf.c \
451ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vsnprintf.c \
452ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/vsprintf.c \
453603332fc4c2d073f0e197f9ce4517710e9b3a6d0Elliott Hughes    upstream-openbsd/lib/libc/stdio/vsscanf.c \
45494336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/vswprintf.c \
45501ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/vswscanf.c \
45694336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/vwprintf.c \
45701ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/vwscanf.c \
458ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdio/wbuf.c \
45994336d8ecf795cfdde874a1e15977d68cfc7afc1Elliott Hughes    upstream-openbsd/lib/libc/stdio/wprintf.c \
46001ae00f3170ad0e36c1657f6ff8c89dfa730fd37Elliott Hughes    upstream-openbsd/lib/libc/stdio/wscanf.c \
46153b24382f5299931af5d08c933a765334a092c56Elliott Hughes    upstream-openbsd/lib/libc/stdio/wsetup.c \
46253c3c271dc9927dd280981fc23409af60f460007Dmitriy Ivanov    upstream-openbsd/lib/libc/stdlib/atexit.c \
46353e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdlib/atoi.c \
46453e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdlib/atol.c \
465ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/atoll.c \
466623b0d05bd924e7fa3c155492695123c87c3a2b1Dmitriy Ivanov    upstream-openbsd/lib/libc/stdlib/exit.c \
46758d9e280d459225aa8dc4533e883182b08215f7dElliott Hughes    upstream-openbsd/lib/libc/stdlib/getenv.c \
4683e424d0a241f8ae5194514dabc4ad899f5a5416dElliott Hughes    upstream-openbsd/lib/libc/stdlib/lsearch.c \
46958d9e280d459225aa8dc4533e883182b08215f7dElliott Hughes    upstream-openbsd/lib/libc/stdlib/setenv.c \
47053e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoimax.c \
47153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtol.c \
472ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoll.c \
473ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoul.c \
474ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoull.c \
475ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/stdlib/strtoumax.c \
4761e4378ea06d06f57027a97714f076ad4f417a705Elliott Hughes    upstream-openbsd/lib/libc/stdlib/system.c \
4773e424d0a241f8ae5194514dabc4ad899f5a5416dElliott Hughes    upstream-openbsd/lib/libc/stdlib/tfind.c \
4783e424d0a241f8ae5194514dabc4ad899f5a5416dElliott Hughes    upstream-openbsd/lib/libc/stdlib/tsearch.c \
479ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strcasecmp.c \
480ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strcspn.c \
481ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strdup.c \
482ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strndup.c \
483ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strpbrk.c \
484ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strsep.c \
485ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strspn.c \
486ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strstr.c \
487ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/strtok.c \
488ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/wcslcpy.c \
489d299bcfdad959a3a0adf1683605b15a1c3b3ab66Elliott Hughes    upstream-openbsd/lib/libc/string/wcsstr.c \
490ad41e9a4eb957ea318bbc93dd49dbe76b89df1e9Elliott Hughes    upstream-openbsd/lib/libc/string/wcswidth.c \
49153e43292aac91bf62995788cd5ca2ceb7caea283Elliott Hughes
492f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_arch_static_src_files := \
493f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/dl_iterate_phdr_static.cpp \
4947c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
495ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common cflags
496ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
4971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags := \
498470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -D_LIBC=1 \
499d286796fce1e6fff407b719a53eb2afbeb96c327Elliott Hughes    -Wall -Wextra -Wunused \
5002ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes
501dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferrisifneq ($(TARGET_USES_LOGD),false)
502dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferrislibc_common_cflags += -DTARGET_USES_LOGD
503dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferrisendif
504dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris
505c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughesuse_clang := false
506c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
5072ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes# Try to catch typical 32-bit assumptions that break with 64-bit pointers.
5082ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hugheslibc_common_cflags += \
5092ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    -Werror=pointer-to-int-cast \
5102ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    -Werror=int-to-pointer-cast \
5112ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    -Werror=type-limits \
51265935979311373f2c7fa27cbfc189f49b188ca3aElliott Hughes    -Werror \
5131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
514d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bortifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
5151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project  libc_common_cflags += -DDEBUG
5161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif
5171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5188e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferrisifeq ($(MALLOC_IMPL),dlmalloc)
51972bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferris  libc_common_cflags += -DUSE_DLMALLOC
5208d2410d33d2c4eba6319664c965a750d863c7e05Christopher Ferris  libc_malloc_src := bionic/dlmalloc.c
5218e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferriselse
5228e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferris  libc_common_cflags += -DUSE_JEMALLOC
5238e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferris  libc_malloc_src := bionic/jemalloc_wrapper.cpp
5248e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferris  libc_common_c_includes += external/jemalloc/include
52572bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferrisendif
52672bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferris
5272fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
5282fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# the appropriate BoardConfig.mk file.
5292fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren#
5302fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renifneq ($(BOARD_MALLOC_ALIGNMENT),)
5312fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren  libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
5322fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renendif
5332fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren
534fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden# Define ANDROID_SMP appropriately.
535fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenifeq ($(TARGET_CPU_SMP),true)
536fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=1
537fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenelse
538fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=0
539fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenendif
540fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden
541762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common conlyflags
542762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_conlyflags := \
543762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    -std=gnu99
544762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines
545762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common cppflags
546762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_cppflags := \
547762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    -std=gnu++11
548762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines
549ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common includes
550ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
5518e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferrislibc_common_c_includes += \
55276c8b882690dd9025caa625a023996c136377cb1Ying Wang    $(LOCAL_PATH)/stdio   \
5531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
554f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# ========================================================
555f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Add in the arch-specific flags.
556f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Must be called with $(eval).
557f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# $(1): the LOCAL_ variable name
558f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# $(2): the bionic variable name to pull in
559f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangdefine patch-up-arch-specific-flags
560f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(1)_$(TARGET_ARCH) += $($(2)_$(TARGET_ARCH))
561f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
562f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(1)_$(TARGET_2ND_ARCH) += $($(2)_$(TARGET_2ND_ARCH))
563a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif
564f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendef
565f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
5661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
567ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
5686380b51a8d775a3b572b2db15195f279cb5565f6Elliott Hughes# libc_stack_protector.a - stack protector code
5696334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
5706334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich#
5716334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# The stack protector code needs to be compiled
5726334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# with -fno-stack-protector, since it modifies the
5736334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# stack canary.
5746334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
5756334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(CLEAR_VARS)
5766334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
577642331b5dd5647e7d196ac4f44406fd435478a56Elliott HughesLOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
57865935979311373f2c7fa27cbfc189f49b188ca3aElliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector
579762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
580762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
5816334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_C_INCLUDES := $(libc_common_c_includes)
5826380b51a8d775a3b572b2db15195f279cb5565f6Elliott HughesLOCAL_MODULE := libc_stack_protector
583c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
584d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
5856334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_SYSTEM_SHARED_LIBRARIES :=
5866334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
587f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
5886334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(BUILD_STATIC_LIBRARY)
5896334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
5906334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
5916334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
592ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# libc_tzcode.a - upstream 'tzcode' code
593ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ========================================================
594ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
595ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(CLEAR_VARS)
596ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
5971fbe6213cdd9fda7e7b816e608b887ad8a0ad265Elliott HughesLOCAL_SRC_FILES := $(call all-c-files-under,tzcode)
598efaa461bd67cfdfcbc2b4c6b69805bc5b929ae05Elliott Hughes# tzcode doesn't include wcsftime, so we use the OpenBSD one.
599efaa461bd67cfdfcbc2b4c6b69805bc5b929ae05Elliott HughesLOCAL_SRC_FILES += upstream-openbsd/lib/libc/time/wcsftime.c
600329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes
601d10db8261949e4d84b65f5c369153d0ca86ab22cElliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \
602d10db8261949e4d84b65f5c369153d0ca86ab22cElliott Hughes    -fvisibility=hidden \
603d10db8261949e4d84b65f5c369153d0ca86ab22cElliott Hughes
604329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# Don't use ridiculous amounts of stack.
605329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott HughesLOCAL_CFLAGS += -DALL_STATE
606329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# Include tzsetwall, timelocal, timegm, time2posix, and posix2time.
607329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott HughesLOCAL_CFLAGS += -DSTD_INSPIRED
608329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# The name of the tm_gmtoff field in our struct tm.
609329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott HughesLOCAL_CFLAGS += -DTM_GMTOFF=tm_gmtoff
610329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# Where we store our tzdata.
611329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott HughesLOCAL_CFLAGS += -DTZDIR=\"/system/usr/share/zoneinfo\"
612329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes# Include timezone and daylight globals.
613329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott HughesLOCAL_CFLAGS += -DUSG_COMPAT=1
6149a5a3e8e74e2c6d7850ab29711189acf0f7378a2Elliott HughesLOCAL_CFLAGS += -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU
615d10db8261949e4d84b65f5c369153d0ca86ab22cElliott HughesLOCAL_CFLAGS += -Dlint
616329103d3e2f42d3e35a060c3e0d326d6476eb2efElliott Hughes
617762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
618762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
619efaa461bd67cfdfcbc2b4c6b69805bc5b929ae05Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) $(LOCAL_PATH)/tzcode/
620ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_MODULE := libc_tzcode
621c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
622d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
623ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
624ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
625f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
626ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
627ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
628ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
629ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ========================================================
630eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# libc_dns.a - modified NetBSD DNS code
631eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ========================================================
632eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
633eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(CLEAR_VARS)
634eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
6358563802b04347951d8878747a830987e5ca145f5Elliott HughesLOCAL_SRC_FILES := \
6368563802b04347951d8878747a830987e5ca145f5Elliott Hughes    $(call all-c-files-under,dns) \
6378563802b04347951d8878747a830987e5ca145f5Elliott Hughes    upstream-netbsd/lib/libc/isc/ev_streams.c \
6388563802b04347951d8878747a830987e5ca145f5Elliott Hughes    upstream-netbsd/lib/libc/isc/ev_timers.c \
639891ec7a6e46e60d7dfa1cf229e14a8e8634e272bDan Albert    upstream-netbsd/lib/libc/resolv/mtctxres.c \
6408563802b04347951d8878747a830987e5ca145f5Elliott Hughes
641eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS := \
642eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    $(libc_common_cflags) \
643205c7887add8b8c85434c35158138f16265beb28Elliott Hughes    -DANDROID_CHANGES \
644eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    -DINET6 \
6458563802b04347951d8878747a830987e5ca145f5Elliott Hughes    -fvisibility=hidden \
64665935979311373f2c7fa27cbfc189f49b188ca3aElliott Hughes    -Wno-unused-parameter \
647cecc036970fba8b319cca302768865677f2be094Calin Juravle    -I$(LOCAL_PATH)/dns/include \
648eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    -I$(LOCAL_PATH)/private \
649fcb502e3ec032497bba7f8634fb214e0c05394d8Calin Juravle    -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \
6508563802b04347951d8878747a830987e5ca145f5Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/android/include \
6518563802b04347951d8878747a830987e5ca145f5Elliott Hughes    -include netbsd-compat.h \
6524c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
653eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
654eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
655eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
656eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_MODULE := libc_dns
657c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
658eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
659eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
660eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
661f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
662eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
663eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
664eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
665eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ========================================================
666f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# libc_freebsd.a - upstream FreeBSD C library code
667f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ========================================================
668f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes#
669f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# These files are built with the freebsd-compat.h header file
670f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# automatically included.
671f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
672f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(CLEAR_VARS)
673f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
674f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files)
675f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_CFLAGS := \
676f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    $(libc_common_cflags) \
6779a5a3e8e74e2c6d7850ab29711189acf0f7378a2Elliott Hughes    -Wno-sign-compare -Wno-uninitialized \
678d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    -I$(LOCAL_PATH)/upstream-freebsd/android/include \
67902c78a386739a8a2b3007efeb00a9ca04132100aElliott Hughes    -I$(LOCAL_PATH)/upstream-freebsd/lib/libc/include \
6804c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -include freebsd-compat.h \
6814c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
682762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
683762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
684f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
685f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_MODULE := libc_freebsd
686c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
687d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
688f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
689f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
690f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
691f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
692f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
693f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
694f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ========================================================
695f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# libc_netbsd.a - upstream NetBSD C library code
696f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
697f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes#
698f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# These files are built with the netbsd-compat.h header file
699f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# automatically included.
700f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
701f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(CLEAR_VARS)
702f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
703f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
704f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_CFLAGS := \
705f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    $(libc_common_cflags) \
7069a5a3e8e74e2c6d7850ab29711189acf0f7378a2Elliott Hughes    -Wno-sign-compare -Wno-uninitialized \
707eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    -DPOSIX_MISTAKE \
708d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/android/include \
709677b6e605be95f434602f19a627ea0dea2927ccdElliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \
7104c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -include netbsd-compat.h \
7114c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
712762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
713762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
714f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
715f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_MODULE := libc_netbsd
716c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
717d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
718f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
719f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
720f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
721c82c0b7e072491da4818e7de37411fbb2055fce1Dan Albert$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_netbsd_src_files))
722f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
723f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
724f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
725f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
7260133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# libc_openbsd.a - upstream OpenBSD C library code
7270133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# ========================================================
7280133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes#
7290133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# These files are built with the openbsd-compat.h header file
7300133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# automatically included.
7310133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
7320133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughesinclude $(CLEAR_VARS)
7330133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
73453e43292aac91bf62995788cd5ca2ceb7caea283Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files)
7350133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_CFLAGS := \
7360133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes    $(libc_common_cflags) \
737d286796fce1e6fff407b719a53eb2afbeb96c327Elliott Hughes    -Wno-sign-compare -Wno-uninitialized -Wno-unused-parameter \
73853c3c271dc9927dd280981fc23409af60f460007Dmitriy Ivanov    -I$(LOCAL_PATH)/private \
739d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    -I$(LOCAL_PATH)/upstream-openbsd/android/include \
7400133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes    -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
741f1ada79a83f6ac42f5efd995bf04374005ac532bElliott Hughes    -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \
7424c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -include openbsd-compat.h \
7434c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
7440133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
7450133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
7460133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
7470133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_MODULE := libc_openbsd
748c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
7490133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
7500133944b09d1c0a35041f7a41eb6bfb660144f4fElliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
7510133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
7520133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
7530133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughesinclude $(BUILD_STATIC_LIBRARY)
7540133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
7550133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes
7560133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes# ========================================================
7574bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# libc_gdtoa.a - upstream OpenBSD C library gdtoa code
7584bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# ========================================================
7594bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes#
7604bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# These files are built with the openbsd-compat.h header file
7614bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# automatically included.
7624bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
7634bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesinclude $(CLEAR_VARS)
7644bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
7654bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_SRC_FILES_32 := $(libc_upstream_openbsd_gdtoa_src_files_32)
7664bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_SRC_FILES_64 := $(libc_upstream_openbsd_gdtoa_src_files_64)
7674bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_CFLAGS := \
7684bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    $(libc_common_cflags) \
7699a5a3e8e74e2c6d7850ab29711189acf0f7378a2Elliott Hughes    -Wno-sign-compare -Wno-uninitialized \
770cce36c187896fb0d4bd36519c4b2e90c502137dcElliott Hughes    -fvisibility=hidden \
77153c3c271dc9927dd280981fc23409af60f460007Dmitriy Ivanov    -I$(LOCAL_PATH)/private \
772d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    -I$(LOCAL_PATH)/upstream-openbsd/android/include \
7734bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
774d39f3f2c2e7fc73ddb019695f0df3417deef5bf4Elliott Hughes    -include openbsd-compat.h \
7754bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
7764bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
7774bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
7784bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
7794bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_MODULE := libc_gdtoa
780c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
7814bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
7824bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
7834bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
7844bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
7854bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
7864bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
7874bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes
7884bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# ========================================================
78929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# libc_bionic.a - home-grown C library code
79029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
791e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes
79229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(CLEAR_VARS)
79329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
79429c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_src_files)
795b6943186ce78105155ba67ab261a970859b190dfElliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \
796b6943186ce78105155ba67ab261a970859b190dfElliott Hughes    -Wframe-larger-than=2048 \
797b6943186ce78105155ba67ab261a970859b190dfElliott Hughes
798762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
799762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
80029c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
80129c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_MODULE := libc_bionic
802c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
803d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
80429c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
80529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
806f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
807f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files))
80829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
80929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
81029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
81129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
812fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# libc_cxa.a - Things traditionally in libstdc++
813fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
814fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
815fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(CLEAR_VARS)
816fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
817fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SRC_FILES := $(libc_cxa_src_files)
818fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CFLAGS := $(libc_common_cflags) \
819fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    -fvisibility=hidden \
820fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
821fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
822fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CPPFLAGS := $(libc_common_cppflags)
823fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_C_INCLUDES := $(libc_common_c_includes)
824fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_MODULE := libc_cxa
825fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CLANG := true # GCC refuses to hide new/delete
826fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
827fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SYSTEM_SHARED_LIBRARIES :=
828fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
829fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(BUILD_STATIC_LIBRARY)
830fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
831fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
832fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
833b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes# libc_syscalls.a
834b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes# ========================================================
835b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
836b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughesinclude $(CLEAR_VARS)
837b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
838f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_SRC_FILES_$(TARGET_ARCH) := $(call all-S-files-under,arch-$(TARGET_ARCH)/syscalls)
839f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
840f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_SRC_FILES_$(TARGET_2ND_ARCH) := $(call all-S-files-under,arch-$(TARGET_2ND_ARCH)/syscalls)
841f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
842b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_MODULE := libc_syscalls
843c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
844b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
845b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
846b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
847b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
848b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
849b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
850b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes# ========================================================
851c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# libc_aeabi.a
852c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# This is an LP32 ARM-only library that needs to be built with -fno-builtin
853c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# to avoid infinite recursion. For the other architectures we just build an
854c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# empty library to keep this makefile simple.
855c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# ========================================================
856c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
857c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughesinclude $(CLEAR_VARS)
858c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
859c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_SRC_FILES_arm := arch-arm/bionic/__aeabi.c
860c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_MODULE := libc_aeabi
861c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
862c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fno-builtin
863c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
864c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
865c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
866c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
867c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
868c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes# ========================================================
869ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a
870ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
871f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
872ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS)
8731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
874ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_SRC_FILES := $(libc_common_src_files)
875eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags)
876762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
877762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
878ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
8791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_common
880c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
881d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
882ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES := \
883ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_bionic \
884fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    libc_cxa \
885eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    libc_dns \
886ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_freebsd \
8874bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes    libc_gdtoa \
8889b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes    libc_malloc \
889ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_netbsd \
8900133944b09d1c0a35041f7a41eb6bfb660144f4fElliott Hughes    libc_openbsd \
8916380b51a8d775a3b572b2db15195f279cb5565f6Elliott Hughes    libc_stack_protector \
892b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes    libc_syscalls \
893eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    libc_tzcode \
894eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
895c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
896c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott Hughes
8978e32b7b3543eadbb58a92443fb57d60aac92ef88Christopher Ferrisifneq ($(MALLOC_IMPL),dlmalloc)
8989b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
89972bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferrisendif
90072bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferris
9011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
9021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
903c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang# TODO: split out the asflags.
904c97c5fc7880267fd835d22946a920bf370461cf2Ying WangLOCAL_ASFLAGS := $(LOCAL_CFLAGS)
905c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang
906f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
907f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files))
908f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS))
9091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
9101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
912ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
91349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# libc_nomalloc.a
91449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
91549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin#
91649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# This is a version of the static C library that does not
91791a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# include malloc. It's useful in situations when the user wants
91891a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# to provide their own malloc implementation, or wants to
9199029d2f638160b37f65da176acd7ccb3aa0ba891Christopher Ferris# explicitly disallow the use of malloc, such as in the
9209029d2f638160b37f65da176acd7ccb3aa0ba891Christopher Ferris# dynamic linker.
92149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
92249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(CLEAR_VARS)
92349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
92449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := \
925f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_arch_static_src_files) \
926f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_static_common_src_files) \
927f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/libc_init_static.cpp
92849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
92949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
9306a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' TurnerLOCAL_CFLAGS := $(libc_common_cflags) \
9314c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -DLIBC_STATIC \
9324c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
933762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
934762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
93549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
93649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_MODULE := libc_nomalloc
937c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
938d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
93949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
94049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES :=
94149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
942f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
943f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
94449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(BUILD_STATIC_LIBRARY)
94549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
94649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
94749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
9489b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# libc_malloc.a: the _prefixed_ malloc functions (like dlcalloc).
9499b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# ========================================================
9509b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes
9519b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughesinclude $(CLEAR_VARS)
9529b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_SRC_FILES := $(libc_malloc_src)
9539b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \
9549b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes    -fvisibility=hidden \
9559b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes
9569b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
9579b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
9589b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
9599b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_MODULE := libc_malloc
960c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
9619b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
9629b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
9639b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes
9649b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes
9659b5235d74e794d29fa912fe95ca3d5ec488dd371Elliott Hughes# ========================================================
9661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.a
9671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
9681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
9691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
971f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_arch_static_src_files) \
972f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_static_common_src_files) \
973f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/malloc_debug_common.cpp \
974f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/libc_init_static.cpp \
9751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
976b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := $(libc_common_cflags) \
9774c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -DLIBC_STATIC \
9784c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
979762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
980762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
9811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
982ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_MODULE := libc
983c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
984d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
9851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
9861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
9871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
988f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
989f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
9901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
9911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
993ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
9941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.so
9951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
9961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
9971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
99865935979311373f2c7fa27cbfc189f49b188ca3aElliott HughesLOCAL_CFLAGS := $(libc_common_cflags)
999762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1000762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
10011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
10021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
1003e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    $(libc_arch_dynamic_src_files) \
1004e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    $(libc_static_common_src_files) \
1005e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    bionic/malloc_debug_common.cpp \
1006e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    bionic/libc_init_dynamic.cpp \
100706e8796ee95793435c194b0a55e26d7b568c7409Sreeram Ramachandran    bionic/NetdClient.cpp \
10081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
10094bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_MODULE := libc
1010c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
1011d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1012914d8d4cff10f023ccd382fb43b2c7833dd34f72Elliott HughesLOCAL_REQUIRED_MODULES := tzdata
10131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
10140ae6445e9a85291b3a20da7f7a5b948cd18d3424Christopher Ferris# Leave the symbols in the shared library so that stack unwinders can produce
10150ae6445e9a85291b3a20da7f7a5b948cd18d3424Christopher Ferris# meaningful name resolution.
10160ae6445e9a85291b3a20da7f7a5b948cd18d3424Christopher FerrisLOCAL_STRIP_MODULE := keep_symbols
10170ae6445e9a85291b3a20da7f7a5b948cd18d3424Christopher Ferris
10181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries,
10191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This
10201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
10211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
10221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# should, instead relying on the external symbols from the dependent libraries.  That would
10234bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes# create a "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
10241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# you wanted!
10251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
10261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SHARED_LIBRARIES := libdl
10271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
10281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
10291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
103071f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert# We'd really like to do this for all architectures, but since this wasn't done
103171f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert# before, these symbols must continue to be exported on LP32 for binary
103271f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert# compatibility.
103371f9b34fbeef00f3bd34364dadad41bff60b6b1dDan AlbertLOCAL_LDFLAGS_arm64 := -Wl,--exclude-libs,libgcc.a
103471f9b34fbeef00f3bd34364dadad41bff60b6b1dDan AlbertLOCAL_LDFLAGS_mips64 := -Wl,--exclude-libs,libgcc.a
103571f9b34fbeef00f3bd34364dadad41bff60b6b1dDan AlbertLOCAL_LDFLAGS_x86_64 := -Wl,--exclude-libs,libgcc.a
103671f9b34fbeef00f3bd34364dadad41bff60b6b1dDan Albert
1037f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
103876c8b882690dd9025caa625a023996c136377cb1Ying Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files))
103976c8b882690dd9025caa625a023996c136377cb1Ying Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_static_common_src_files))
1040f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# special for arm
1041f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_NO_CRT_arm := true
1042f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CFLAGS_arm += -DCRT_LEGACY_WORKAROUND
1043f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_SRC_FILES_arm += \
1044f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    arch-common/bionic/crtbegin_so.c \
1045f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    arch-arm/bionic/atexit_legacy.c \
1046f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    arch-common/bionic/crtend_so.S
1047f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
10481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
10491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
10501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1051b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# For all builds, except for the -user build we will enable memory
1052b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# allocation checking (including memory leaks, buffer overwrites, etc.)
1053b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Note that all these checks are also controlled by env. settings
1054b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# that can enable, or disable specific checks. Note also that some of
1055b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# the checks are available only in emulator and are implemeted in
1056b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_qemu_instrumented.so.
1057b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineifneq ($(TARGET_BUILD_VARIANT),user)
1058b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1059ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
1060b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_leak.so
10611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
10621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
10631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1064ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := \
1065f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_common_cflags) \
10664c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -DMALLOC_LEAK_CHECK \
10674c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
1068762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1069762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
10701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1071861c0ef37bcfcae56d88572cb01c18bcfe1fadedChristopher Ferris# Make sure that unwind.h comes from libunwind.
1072861c0ef37bcfcae56d88572cb01c18bcfe1fadedChristopher FerrisLOCAL_C_INCLUDES := \
1073861c0ef37bcfcae56d88572cb01c18bcfe1fadedChristopher Ferris    external/libunwind/include \
1074861c0ef37bcfcae56d88572cb01c18bcfe1fadedChristopher Ferris    $(libc_common_c_includes) \
10751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
10761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
1077f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/debug_mapinfo.cpp \
1078f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/debug_stacktrace.cpp \
1079dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris    bionic/libc_logging.cpp \
1080f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/malloc_debug_leak.cpp \
1081f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/malloc_debug_check.cpp \
10821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
10834bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_MODULE := libc_malloc_debug_leak
1084c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
1085d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
10861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1087e007775f4b21f6b94078ed1d34b753435ba28fdaPavel ChupinLOCAL_SHARED_LIBRARIES := libc libdl
1088b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SYSTEM_SHARED_LIBRARIES :=
1089861c0ef37bcfcae56d88572cb01c18bcfe1fadedChristopher FerrisLOCAL_WHOLE_STATIC_LIBRARIES := libunwindbacktrace
1090aa46fa24035f3ab020f9a7abd86c25ae2196bb32Bruce BeareLOCAL_ALLOW_UNDEFINED_SYMBOLS := true
1091368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev
1092b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't install on release build
1093b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
10941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1095f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1096b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_SHARED_LIBRARY)
1097b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1098b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1099b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
1100b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_qemu.so
1101b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
1102b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(CLEAR_VARS)
1103b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1104b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := \
1105f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_common_cflags) \
11064c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes    -DMALLOC_QEMU_INSTRUMENT \
11074c2da039baa6c621c78afa47ead85ec9e028f56dElliott Hughes
1108762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1109762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
1110b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1111b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_C_INCLUDES := $(libc_common_c_includes)
1112b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1113b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SRC_FILES := \
1114dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris    bionic/libc_logging.cpp \
1115dda1c6c466c4f31de31d76c8be7e46c16b4b4209Christopher Ferris    bionic/malloc_debug_qemu.cpp \
1116b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
11174bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLOCAL_MODULE := libc_malloc_debug_qemu
1118c999f76977d2389a3e2dcbdd98f20d93c3193727Elliott HughesLOCAL_CLANG := $(use_clang)
1119d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1120b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
11217c0c3793722aea293c45921ef50e4adcdf9645ceMathias AgopianLOCAL_SHARED_LIBRARIES := libc libdl
11221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
1123368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev
11241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't install on release build
1125b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
11261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1127f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
11281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
11291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1130f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif  #!user
1131b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
1132fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
1133fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# libstdc++.so
1134fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
1135fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertlibstdcxx_common_src_files := \
1136fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    bionic/__cxa_guard.cpp \
1137fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    bionic/__cxa_pure_virtual.cpp \
1138fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    bionic/new.cpp \
1139fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert    bionic/libc_logging.cpp \
1140fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
1141fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(CLEAR_VARS)
1142fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_C_INCLUDES := $(libc_common_c_includes)
1143fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CFLAGS := $(libc_common_cflags)
1144fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SRC_FILES := $(libstdcxx_common_src_files)
1145fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_MODULE:= libstdc++
1146fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
1147fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SYSTEM_SHARED_LIBRARIES := libc
1148fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(BUILD_SHARED_LIBRARY)
1149fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
1150fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
1151fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# libstdc++.a
1152fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert# ========================================================
1153fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(CLEAR_VARS)
1154fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_C_INCLUDES := $(libc_common_c_includes)
1155fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_CFLAGS := $(libc_common_cflags)
1156fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SRC_FILES := $(libstdcxx_common_src_files)
1157fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_MODULE:= libstdc++
1158fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
1159fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan AlbertLOCAL_SYSTEM_SHARED_LIBRARIES := libc
1160fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albertinclude $(BUILD_STATIC_LIBRARY)
1161fd5ee9aebc0a43c7f36a0778c7f416b39ddb870eDan Albert
1162b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
11631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
11641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(call all-makefiles-under,$(LOCAL_PATH))
1165