blob: 17c129b2e15c6150886acc17c9e7b38ec0133f8d [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001gnulib-arch = $(elf-objpfx)libgcc-stubs.a
2static-gnulib-arch = $(elf-objpfx)libgcc-stubs.a
3
4ifeq ($(subdir),elf)
5sysdep-dl-routines += tlsdesc dl-tlsdesc
6sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
7sysdep-rtld-routines += aeabi_unwind_cpp_pr1
8shared-only-routines += aeabi_unwind_cpp_pr1
9
10$(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
11 $(build-extra-lib)
12
13lib-noranlib: $(objpfx)libgcc-stubs.a
14
15ifeq ($(build-shared),yes)
16ifeq ($(have-arm-tls-desc),yes)
17tests += tst-armtlsdescloc tst-armtlsdescextnow tst-armtlsdescextlazy
18modules-names += tst-armtlsdesclocmod
19modules-names += tst-armtlsdescextlazymod tst-armtlsdescextnowmod
20CPPFLAGS-tst-armtlsdescextnowmod.c += -Dstatic=
21CPPFLAGS-tst-armtlsdescextlazymod.c += -Dstatic=
22CFLAGS-tst-armtlsdesclocmod.c += -mtls-dialect=gnu2
23CFLAGS-tst-armtlsdescextnowmod.c += -mtls-dialect=gnu2
24CFLAGS-tst-armtlsdescextlazymod.c += -mtls-dialect=gnu2
25LDFLAGS-tst-armtlsdescextnowmod.so += -Wl,-z,now
26tst-armtlsdescloc-ENV = LD_BIND_NOW=1
27tst-armtlsdescextnow-ENV = LD_BIND_NOW=1
28tst-armtlsdescextlazy-ENV = LD_BIND_NOW=1
29$(objpfx)tst-armtlsdescloc: $(objpfx)tst-armtlsdesclocmod.so
30$(objpfx)tst-armtlsdescextnow: $(objpfx)tst-armtlsdescextnowmod.so
31$(objpfx)tst-armtlsdescextlazy: $(objpfx)tst-armtlsdescextlazymod.so
32endif
33endif
34endif
35
36ifeq ($(subdir),csu)
37# get offset to rtld_global._dl_hwcap
38gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym
39aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
40aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
41 aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
42 aeabi_memmove aeabi_memset \
43 aeabi_read_tp libc-aeabi_read_tp
44
45sysdep_routines += $(aeabi_constants) $(aeabi_routines)
46static-only-routines += $(aeabi_constants) aeabi_read_tp
47shared-only-routines += libc-aeabi_read_tp
48
49# In order for unwinding to fail when it falls out of main, we need a
50# cantunwind marker. There's one in start.S. To make sure we reach it, add
51# unwind tables for __libc_start_main.
52CFLAGS-libc-start.c += -fexceptions
53
54sysdep_routines += arm-unwind-resume
55shared-only-routines += arm-unwind-resume
56endif
57
58ifeq ($(subdir),gmon)
59sysdep_routines += arm-mcount
60endif
61
62ifeq ($(subdir),debug)
63CFLAGS-backtrace.c += -funwind-tables
64endif
65
66ifeq ($(subdir),rt)
67librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1 rt-arm-unwind-resume
68librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1 rt-arm-unwind-resume
69endif
70
71ifeq ($(subdir),nptl)
72libpthread-sysdep_routines += pt-arm-unwind-resume
73libpthread-shared-only-routines += pt-arm-unwind-resume
74endif