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