lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | gnulib-arch = $(elf-objpfx)libgcc-stubs.a |
| 2 | static-gnulib-arch = $(elf-objpfx)libgcc-stubs.a |
| 3 | |
| 4 | ifeq ($(subdir),elf) |
| 5 | sysdep-dl-routines += tlsdesc dl-tlsdesc |
| 6 | sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx |
| 7 | sysdep-rtld-routines += aeabi_unwind_cpp_pr1 |
| 8 | shared-only-routines += aeabi_unwind_cpp_pr1 |
| 9 | |
| 10 | $(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os |
| 11 | $(build-extra-lib) |
| 12 | |
| 13 | lib-noranlib: $(objpfx)libgcc-stubs.a |
| 14 | |
| 15 | ifeq ($(build-shared),yes) |
| 16 | ifeq ($(have-arm-tls-desc),yes) |
| 17 | tests += tst-armtlsdescloc tst-armtlsdescextnow tst-armtlsdescextlazy |
| 18 | modules-names += tst-armtlsdesclocmod |
| 19 | modules-names += tst-armtlsdescextlazymod tst-armtlsdescextnowmod |
| 20 | CPPFLAGS-tst-armtlsdescextnowmod.c += -Dstatic= |
| 21 | CPPFLAGS-tst-armtlsdescextlazymod.c += -Dstatic= |
| 22 | CFLAGS-tst-armtlsdesclocmod.c += -mtls-dialect=gnu2 |
| 23 | CFLAGS-tst-armtlsdescextnowmod.c += -mtls-dialect=gnu2 |
| 24 | CFLAGS-tst-armtlsdescextlazymod.c += -mtls-dialect=gnu2 |
| 25 | LDFLAGS-tst-armtlsdescextnowmod.so += -Wl,-z,now |
| 26 | tst-armtlsdescloc-ENV = LD_BIND_NOW=1 |
| 27 | tst-armtlsdescextnow-ENV = LD_BIND_NOW=1 |
| 28 | tst-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 |
| 32 | endif |
| 33 | endif |
| 34 | endif |
| 35 | |
| 36 | ifeq ($(subdir),csu) |
| 37 | # get offset to rtld_global._dl_hwcap |
| 38 | gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym |
| 39 | aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math |
| 40 | aeabi_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 | |
| 45 | sysdep_routines += $(aeabi_constants) $(aeabi_routines) |
| 46 | static-only-routines += $(aeabi_constants) aeabi_read_tp |
| 47 | shared-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. |
| 52 | CFLAGS-libc-start.c += -fexceptions |
| 53 | |
| 54 | sysdep_routines += arm-unwind-resume |
| 55 | shared-only-routines += arm-unwind-resume |
| 56 | endif |
| 57 | |
| 58 | ifeq ($(subdir),gmon) |
| 59 | sysdep_routines += arm-mcount |
| 60 | endif |
| 61 | |
| 62 | ifeq ($(subdir),debug) |
| 63 | CFLAGS-backtrace.c += -funwind-tables |
| 64 | endif |
| 65 | |
| 66 | ifeq ($(subdir),rt) |
| 67 | librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1 rt-arm-unwind-resume |
| 68 | librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1 rt-arm-unwind-resume |
| 69 | endif |
| 70 | |
| 71 | ifeq ($(subdir),nptl) |
| 72 | libpthread-sysdep_routines += pt-arm-unwind-resume |
| 73 | libpthread-shared-only-routines += pt-arm-unwind-resume |
| 74 | endif |