blob: 57919ad5fd7511f5cfe53240f8e2381c8713704d [file] [log] [blame]
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -07001LOCAL_PATH:= $(call my-dir)
2
The Android Open Source Project4e468ed2008-12-17 18:03:48 -08003include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -07004libc_common_src_files := \
5 $(syscall_src) \
6 unistd/abort.c \
7 unistd/alarm.c \
8 unistd/brk.c \
9 unistd/creat.c \
10 unistd/daemon.c \
11 unistd/exec.c \
12 unistd/fcntl.c \
13 unistd/fnmatch.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -080014 unistd/ftime.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070015 unistd/ftok.c \
16 unistd/getcwd.c \
17 unistd/getdtablesize.c \
18 unistd/gethostname.c \
19 unistd/getopt_long.c \
20 unistd/getpgrp.c \
21 unistd/getpriority.c \
22 unistd/getpt.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -080023 unistd/initgroups.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070024 unistd/isatty.c \
25 unistd/issetugid.c \
26 unistd/lseek64.c \
27 unistd/mmap.c \
28 unistd/nice.c \
29 unistd/open.c \
30 unistd/openat.c \
31 unistd/opendir.c \
32 unistd/pathconf.c \
33 unistd/perror.c \
34 unistd/popen.c \
35 unistd/pread.c \
36 unistd/pselect.c \
37 unistd/ptsname.c \
38 unistd/ptsname_r.c \
39 unistd/pwrite.c \
40 unistd/raise.c \
41 unistd/reboot.c \
42 unistd/recv.c \
43 unistd/sbrk.c \
44 unistd/send.c \
45 unistd/setegid.c \
46 unistd/seteuid.c \
47 unistd/setpgrp.c \
48 unistd/sigblock.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -080049 unistd/siginterrupt.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070050 unistd/siglist.c \
51 unistd/signal.c \
52 unistd/sigsetmask.c \
53 unistd/sigsuspend.c \
54 unistd/sigwait.c \
55 unistd/sleep.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070056 unistd/statfs.c \
57 unistd/strsignal.c \
58 unistd/sysconf.c \
59 unistd/syslog.c \
60 unistd/system.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -080061 unistd/tcgetpgrp.c \
62 unistd/tcsetpgrp.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070063 unistd/time.c \
64 unistd/umount.c \
65 unistd/unlockpt.c \
66 unistd/usleep.c \
67 unistd/wait.c \
68 stdio/asprintf.c \
69 stdio/fclose.c \
70 stdio/fdopen.c \
71 stdio/feof.c \
72 stdio/ferror.c \
73 stdio/fflush.c \
74 stdio/fgetc.c \
75 stdio/fgetln.c \
76 stdio/fgetpos.c \
77 stdio/fgets.c \
78 stdio/fileno.c \
79 stdio/findfp.c \
80 stdio/flags.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -080081 stdio/flockfile.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070082 stdio/fopen.c \
83 stdio/fprintf.c \
84 stdio/fpurge.c \
85 stdio/fputc.c \
86 stdio/fputs.c \
87 stdio/fread.c \
88 stdio/freopen.c \
89 stdio/fscanf.c \
90 stdio/fseek.c \
91 stdio/fsetpos.c \
92 stdio/ftell.c \
93 stdio/funopen.c \
94 stdio/fvwrite.c \
95 stdio/fwalk.c \
96 stdio/fwrite.c \
97 stdio/getc.c \
98 stdio/getchar.c \
99 stdio/gets.c \
100 stdio/makebuf.c \
101 stdio/mktemp.c \
102 stdio/printf.c \
103 stdio/putc.c \
104 stdio/putchar.c \
105 stdio/puts.c \
106 stdio/putw.c \
107 stdio/refill.c \
108 stdio/remove.c \
109 stdio/rewind.c \
110 stdio/rget.c \
111 stdio/scanf.c \
112 stdio/setbuf.c \
113 stdio/setbuffer.c \
114 stdio/setvbuf.c \
115 stdio/snprintf.c\
116 stdio/sprintf.c \
117 stdio/sscanf.c \
118 stdio/stdio.c \
119 stdio/tempnam.c \
120 stdio/tmpfile.c \
121 stdio/tmpnam.c \
122 stdio/ungetc.c \
123 stdio/vasprintf.c \
124 stdio/vfprintf.c \
125 stdio/vfscanf.c \
126 stdio/vprintf.c \
127 stdio/vsnprintf.c \
128 stdio/vsprintf.c \
129 stdio/vscanf.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800130 stdio/vsscanf.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700131 stdio/wbuf.c \
132 stdio/wsetup.c \
133 stdlib/_rand48.c \
134 stdlib/assert.c \
135 stdlib/atexit.c \
136 stdlib/atoi.c \
137 stdlib/atol.c \
138 stdlib/atoll.c \
139 stdlib/bsearch.c \
140 stdlib/ctype_.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800141 stdlib/div.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700142 stdlib/exit.c \
143 stdlib/getenv.c \
144 stdlib/jrand48.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800145 stdlib/ldiv.c \
146 stdlib/lldiv.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700147 stdlib/locale.c \
148 stdlib/lrand48.c \
149 stdlib/mrand48.c \
150 stdlib/nrand48.c \
151 stdlib/putenv.c \
152 stdlib/qsort.c \
153 stdlib/seed48.c \
154 stdlib/setenv.c \
155 stdlib/setjmperr.c \
156 stdlib/srand48.c \
157 stdlib/strntoimax.c \
158 stdlib/strntoumax.c \
159 stdlib/strtod.c \
160 stdlib/strtoimax.c \
161 stdlib/strtol.c \
162 stdlib/strtoll.c \
163 stdlib/strtoul.c \
164 stdlib/strtoull.c \
165 stdlib/strtoumax.c \
166 stdlib/tolower_.c \
167 stdlib/toupper_.c \
168 stdlib/wchar.c \
169 string/bcopy.c \
170 string/index.c \
171 string/memccpy.c \
172 string/memchr.c \
173 string/memmem.c \
174 string/memmove.c.arm \
175 string/memrchr.c \
176 string/memswap.c \
177 string/strcasecmp.c \
178 string/strcasestr.c \
179 string/strcat.c \
180 string/strchr.c \
181 string/strcmp.c \
182 string/strcpy.c \
183 string/strcspn.c \
184 string/strdup.c \
185 string/strerror.c \
186 string/strerror_r.c \
187 string/strlcat.c \
188 string/strlcpy.c \
189 string/strncat.c \
190 string/strncmp.c \
191 string/strncpy.c \
192 string/strndup.c \
193 string/strnlen.c \
194 string/strpbrk.c \
195 string/strrchr.c \
196 string/strsep.c \
197 string/strspn.c \
198 string/strstr.c \
199 string/strtok.c \
200 string/strtotimeval.c \
201 inet/bindresvport.c \
202 inet/inet_addr.c \
203 inet/inet_aton.c \
204 inet/inet_ntoa.c \
205 inet/inet_ntop.c \
206 inet/inet_pton.c \
207 tzcode/asctime.c \
208 tzcode/difftime.c \
209 tzcode/localtime.c \
210 tzcode/strftime.c \
211 tzcode/strptime.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700212 bionic/__errno.c \
213 bionic/__set_errno.c \
214 bionic/_rand48.c \
215 bionic/arc4random.c \
216 bionic/basename.c \
217 bionic/basename_r.c \
218 bionic/dirname.c \
219 bionic/dirname_r.c \
220 bionic/drand48.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700221 bionic/erand48.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800222 bionic/fork.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700223 bionic/if_nametoindex.c \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800224 bionic/if_indextoname.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700225 bionic/ioctl.c \
226 bionic/ldexp.c \
227 bionic/libc_init_common.c \
228 bionic/logd_write.c \
229 bionic/md5.c \
230 bionic/pututline.c \
231 bionic/realpath.c \
232 bionic/semaphore.c \
233 bionic/sha1.c \
234 bionic/ssp.c \
235 bionic/stubs.c \
236 bionic/system_properties.c \
237 bionic/thread_atexit.c \
238 bionic/utime.c \
239 bionic/utmp.c \
240 netbsd/gethnamaddr.c \
241 netbsd/isc/ev_timers.c \
242 netbsd/isc/ev_streams.c \
243 netbsd/inet/nsap_addr.c \
244 netbsd/resolv/__dn_comp.c \
245 netbsd/resolv/__res_close.c \
246 netbsd/resolv/__res_send.c \
247 netbsd/resolv/herror.c \
248 netbsd/resolv/res_comp.c \
249 netbsd/resolv/res_data.c \
250 netbsd/resolv/res_debug.c \
251 netbsd/resolv/res_init.c \
252 netbsd/resolv/res_mkquery.c \
253 netbsd/resolv/res_query.c \
254 netbsd/resolv/res_send.c \
255 netbsd/resolv/res_state.c.arm \
256 netbsd/resolv/res_cache.c \
257 netbsd/net/nsdispatch.c \
258 netbsd/net/getaddrinfo.c \
259 netbsd/net/getnameinfo.c \
260 netbsd/net/getservbyname.c \
261 netbsd/net/getservent.c \
262 netbsd/net/base64.c \
263 netbsd/net/getservbyport.c \
264 netbsd/nameser/ns_name.c \
265 netbsd/nameser/ns_parse.c \
266 netbsd/nameser/ns_ttl.c \
267 netbsd/nameser/ns_netint.c \
268 netbsd/nameser/ns_print.c \
269 netbsd/nameser/ns_samedomain.c
270
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800271ifeq ($(TARGET_ARCH),arm)
272libc_common_src_files += \
273 bionic/eabi.c \
274 arch-arm/bionic/__get_pc.S \
275 arch-arm/bionic/__get_sp.S \
276 arch-arm/bionic/_exit_with_stack_teardown.S \
277 arch-arm/bionic/_setjmp.S \
278 arch-arm/bionic/atomics_arm.S \
279 arch-arm/bionic/clone.S \
280 arch-arm/bionic/kill.S \
281 arch-arm/bionic/tkill.S \
282 arch-arm/bionic/memcmp.S \
283 arch-arm/bionic/memcmp16.S \
284 arch-arm/bionic/memcpy.S \
285 arch-arm/bionic/memset.S \
286 arch-arm/bionic/setjmp.S \
287 arch-arm/bionic/sigsetjmp.S \
288 arch-arm/bionic/strlen.c.arm \
289 arch-arm/bionic/syscall.S \
290 unistd/socketcalls.c
291
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700292# These files need to be arm so that gdbserver
293# can set breakpoints in them without messing
294# up any thumb code.
295libc_common_src_files += \
296 bionic/pthread.c.arm \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800297 bionic/pthread-timers.c.arm \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700298 bionic/ptrace.c.arm
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800299else # !arm
300
301ifeq ($(TARGET_ARCH),x86)
302libc_common_src_files += \
303 arch-x86/bionic/__get_sp.S \
304 arch-x86/bionic/__get_tls.c \
305 arch-x86/bionic/__set_tls.c \
306 arch-x86/bionic/atomics_x86.S \
307 arch-x86/bionic/clone.S \
308 arch-x86/bionic/_exit_with_stack_teardown.S \
309 arch-x86/bionic/setjmp.S \
310 arch-x86/bionic/_setjmp.S \
311 arch-x86/bionic/vfork.S \
312 arch-x86/string/bzero.S \
313 arch-x86/string/memset.S \
314 arch-x86/string/memcmp.S \
315 arch-x86/string/memcpy.S \
316 arch-x86/string/strlen.S \
317 bionic/pthread.c \
318 bionic/pthread-timers.c \
319 bionic/ptrace.c
320endif # x86
321
322endif # !arm
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700323
324libc_common_cflags := \
325 -DWITH_ERRLIST \
326 -DANDROID_CHANGES \
327 -DUSE_LOCKS \
328 -DREALLOC_ZERO_BYTES_FREES \
329 -D_LIBC=1 \
330 -DSOFTFLOAT \
331 -DFLOATING_POINT \
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800332 -DNEED_PSELECT=1 \
333 -DINET6
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700334
335ifeq ($(TARGET_BUILD_TYPE),debug)
336 libc_common_cflags += -DDEBUG
337endif
338
339ifeq ($(TARGET_ARCH),arm)
340 libc_common_cflags += -fstrict-aliasing
341endif
342
343libc_common_c_includes := \
344 $(LOCAL_PATH)/stdlib \
345 $(LOCAL_PATH)/string \
346 $(LOCAL_PATH)/stdio
347
348# libc_common.a
349# ========================================================
350
351include $(CLEAR_VARS)
352
353LOCAL_SRC_FILES := $(libc_common_src_files)
354LOCAL_CFLAGS := $(libc_common_cflags) -DUSE_DL_PREFIX
355LOCAL_C_INCLUDES := $(libc_common_c_includes)
356
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800357ifneq ($(TARGET_SIMULATOR),true)
358 ifeq ($(TARGET_ARCH),arm)
359 crtend_target_cflags := -mthumb-interwork
360 else
361 ifeq ($(TARGET_ARCH),x86)
362 crtend_target_cflags := -m32
363 endif
364 endif
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700365# We rename crtend.o to crtend_android.o to avoid a
366# name clash between gcc and bionic.
367GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_android.o
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800368$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend.S
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700369 @mkdir -p $(dir $@)
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800370 $(TARGET_CC) $(crtend_target_cflags) -o $@ -c $<
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700371ALL_GENERATED_SOURCES += $(GEN)
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800372endif
373
374
375# crtbegin_so.o/crtend_so.o
376# These are needed for building the shared libs.
377ifneq ($(TARGET_SIMULATOR),true)
378
379ifeq ($(TARGET_ARCH),x86)
380
381crt_begin_end_so_target_cflags := -m32
382
383GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_so.o
384$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.S
385 @mkdir -p $(dir $@)
386 $(TARGET_CC) $(crt_begin_end_so_target_cflags) -o $@ -c $<
387ALL_GENERATED_SOURCES += $(GEN)
388
389GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_so.o
390$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S
391 @mkdir -p $(dir $@)
392 $(TARGET_CC) $(crt_begin_end_so_target_cflags) -o $@ -c $<
393ALL_GENERATED_SOURCES += $(GEN)
394
395endif # TARGET_ARCH == x86
396
397endif # !TARGET_SIMULATOR
398
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700399
400LOCAL_MODULE := libc_common
401LOCAL_SYSTEM_SHARED_LIBRARIES :=
402
403include $(BUILD_STATIC_LIBRARY)
404
405
406# libc.a
407# ========================================================
408
409include $(CLEAR_VARS)
410
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800411include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700412
413# To enable malloc leak check for statically linked programs, add
414# "WITH_MALLOC_CHECK_LIBC_A := true" to device/buildspec.mk
415WITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A))
416
417LOCAL_SRC_FILES := \
418 $(libc_common_src_files) \
419 bionic/dlmalloc.c \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700420 bionic/libc_init_static.c
421
422ifeq ($(WITH_MALLOC_CHECK_LIBC_A),true)
423 LOCAL_SRC_FILES += bionic/malloc_leak.c.arm
424endif
425
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800426ifeq ($(TARGET_ARCH),arm)
427LOCAL_SRC_FILES += \
428 arch-arm/bionic/exidx_static.c
429
430else # TARGET_ARCH != arm
431
432ifeq ($(TARGET_ARCH),x86)
433LOCAL_SRC_FILES += \
434 arch-x86/bionic/dl_iterate_phdr_static.c
435endif
436
437endif
438
439ifneq ($(TARGET_SIMULATOR),true)
440 ifeq ($(TARGET_ARCH),arm)
441 crtbegin_static_target_cflags := -mthumb-interwork
442 else
443 ifeq ($(TARGET_ARCH),x86)
444 crtbegin_static_target_cflags := -m32
445 endif
446 endif
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700447GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800448$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_static.S
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700449 @mkdir -p $(dir $@)
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800450 $(TARGET_CC) $(crtbegin_static_target_cflags) -o $@ -c $<
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700451ALL_GENERATED_SOURCES += $(GEN)
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800452endif
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700453
454LOCAL_CFLAGS := $(libc_common_cflags)
455
456LOCAL_C_INCLUDES := $(libc_common_c_includes)
457
458ifeq ($(WITH_MALLOC_CHECK_LIBC_A),true)
459 LOCAL_CFLAGS += -DUSE_DL_PREFIX -DMALLOC_LEAK_CHECK
460endif
461
462LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
463LOCAL_MODULE:= libc
464LOCAL_SYSTEM_SHARED_LIBRARIES :=
465
466include $(BUILD_STATIC_LIBRARY)
467
468
469# libc.so
470# ========================================================
471
472include $(CLEAR_VARS)
473
474LOCAL_CFLAGS := $(libc_common_cflags)
475
476LOCAL_CFLAGS += -DUSE_DL_PREFIX
477
478LOCAL_C_INCLUDES := $(libc_common_c_includes)
479
480LOCAL_SRC_FILES := \
481 bionic/dlmalloc.c \
482 bionic/malloc_leak.c.arm \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700483 bionic/libc_init_dynamic.c
484
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800485ifeq ($(TARGET_ARCH),arm)
486LOCAL_SRC_FILES += \
487 arch-arm/bionic/exidx_dynamic.c
488endif
489
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700490LOCAL_MODULE:= libc
491
492# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries,
493# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This
494# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
495# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
496# should, instead relying on the external symbols from the dependent libraries. That would
497# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
498# you wanted!
499
500LOCAL_SHARED_LIBRARIES := libdl
501LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
502LOCAL_SYSTEM_SHARED_LIBRARIES :=
503
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800504ifneq ($(TARGET_SIMULATOR),true)
505 ifeq ($(TARGET_ARCH),arm)
506 crtbegin_dynamic_target_cflags := -mthumb-interwork
507 else
508 ifeq ($(TARGET_ARCH),x86)
509 crtbegin_dynamic_target_cflags := -m32
510 endif
511 endif
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700512GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800513$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_dynamic.S
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700514 @mkdir -p $(dir $@)
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800515 $(TARGET_CC) $(crtbegin_dynamic_target_cflags) -o $@ -c $<
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700516ALL_GENERATED_SOURCES += $(GEN)
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800517endif
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700518
519include $(BUILD_SHARED_LIBRARY)
520
521
522# libc_debug.so
523# ========================================================
524
525include $(CLEAR_VARS)
526
527LOCAL_CFLAGS := $(libc_common_cflags)
528
529LOCAL_CFLAGS += -DUSE_DL_PREFIX -DMALLOC_LEAK_CHECK
530
531LOCAL_C_INCLUDES := $(libc_common_c_includes)
532
533LOCAL_SRC_FILES := \
534 bionic/dlmalloc.c \
535 bionic/malloc_leak.c.arm \
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700536 bionic/libc_init_dynamic.c
537
The Android Open Source Project4e468ed2008-12-17 18:03:48 -0800538ifeq ($(TARGET_ARCH),arm)
539LOCAL_SRC_FILES += \
540 arch-arm/bionic/exidx_dynamic.c
541endif
542
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -0700543LOCAL_MODULE:= libc_debug
544
545# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries,
546# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This
547# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
548# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
549# should, instead relying on the external symbols from the dependent libraries. That would
550# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
551# you wanted!
552
553LOCAL_SHARED_LIBRARIES := libdl
554LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
555LOCAL_SYSTEM_SHARED_LIBRARIES :=
556# Don't prelink
557LOCAL_PRELINK_MODULE := false
558# Don't install on release build
559LOCAL_MODULE_TAGS := eng
560
561GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
562ALL_GENERATED_SOURCES += $(GEN)
563
564include $(BUILD_SHARED_LIBRARY)
565
566# ========================================================
567include $(call all-makefiles-under,$(LOCAL_PATH))