Support sharing ARM headers for hard and soft float.
[glibc.git] / sysdeps / unix / sysv / linux / arm / Makefile
blobd9eb10c9ae32107a1e188742ce047d83e0315f1d
1 ifeq ($(subdir),csu)
2 # In order for unwinding to fail when it falls out of main, we need a
3 # cantunwind marker. There's one in start.S. To make sure we reach it, add
4 # unwind tables for __libc_start_main.
5 CFLAGS-libc-start.c += -fexceptions
7 sysdep_routines += aeabi_read_tp libc-aeabi_read_tp
8 static-only-routines += aeabi_read_tp
9 shared-only-routines += libc-aeabi_read_tp
10 endif
12 ifeq ($(subdir),elf)
13 sysdep-rtld-routines += aeabi_read_tp
14 endif
16 ifeq ($(subdir),misc)
17 sysdep_routines += ioperm
18 sysdep_headers += sys/elf.h sys/io.h
19 endif
21 ifeq ($(subdir),signal)
22 sysdep_routines += sigrestorer
23 endif
25 ifeq ($(subdir),resource)
26 sysdep_routines += oldgetrlimit64
27 endif
29 ifeq ($(subdir),stdlib)
30 gen-as-const-headers += ucontext_i.sym
31 endif
33 # Add a syscall function to each library that needs one.
35 ifeq ($(subdir),rt)
36 librt-sysdep_routines += libc-do-syscall
37 librt-shared-only-routines += libc-do-syscall
38 endif
40 ifeq ($(subdir),nptl)
41 libpthread-sysdep_routines += libc-do-syscall
42 libpthread-shared-only-routines += libc-do-syscall
43 endif
45 ifeq ($(subdir),resolv)
46 libanl-sysdep_routines += libc-do-syscall
47 libanl-shared-only-routines += libc-do-syscall
48 endif
50 ifeq ($(subdir),csu)
51 sysdep_routines += libc-do-syscall
52 endif
54 ifeq ($(subdir),nscd)
55 nscd-modules += libc-do-syscall
56 endif
58 ifeq ($(subdir),nss)
59 libnss_db-sysdep_routines += libc-do-syscall
60 libnss_db-shared-only-routines += libc-do-syscall
61 endif
63 ifeq ($(subdir),posix)
64 LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
65 LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o
66 LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
67 endif
69 define default-abi-prog
70 echo '#ifdef __ARM_PCS_VFP';
71 echo 'hard';
72 echo '#else';
73 echo 'soft';
74 echo '#endif'
75 endef
76 default-abi := $(strip $(shell \
77 ($(default-abi-prog)) | $(CC) $(CFLAGS) $(CPPFLAGS) -E -P -))
78 ifeq ($(default-abi),hard)
79 # OK.
80 else
81 ifneq ($(default-abi),soft)
82 Unknown ABI, must be "hard" or "soft".
83 endif
84 endif
86 abi-includes :=
87 abi-variants := soft hard
88 abi-soft-options := -U__ARM_PCS_VFP
89 abi-soft-condition := !defined __ARM_PCS_VFP
90 abi-soft-ld-soname := ld-linux.so.3
91 abi-hard-options := -D__ARM_PCS_VFP
92 abi-hard-condition := defined __ARM_PCS_VFP
93 abi-hard-ld-soname := ld-linux-armhf.so.3