Update copyright notices with scripts/update-copyrights
[glibc.git] / sysdeps / i386 / Makefile
blobe1deecee87e6268c180374c0cdde75b0b870b0aa
1 # The mpn functions need a #define for asm syntax flavor.
2 # Every i386 port in use uses gas syntax (I think).
3 asm-CPPFLAGS += -DGAS_SYNTAX
5 # The i386 `long double' is a distinct type we support.
6 long-double-fcts = yes
8 ifeq ($(subdir),gmon)
9 sysdep_routines += i386-mcount
10 endif
12 ifeq ($(subdir),elf)
13 CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
14 CFLAGS-dl-load.c += -Wno-unused
15 CFLAGS-dl-reloc.c += -Wno-unused
16 endif
18 ifeq ($(subdir),debug)
19 CFLAGS-backtrace.c += -fexceptions
20 endif
22 # Most of the glibc routines don't ever call user defined callbacks
23 # nor use any FPU or SSE* and as such don't need bigger %esp alignment
24 # than 4 bytes.
25 # Lots of routines in math will use FPU, so make math subdir an exception
26 # here.
27 # In gcc 4.6 (and maybe earlier?) giving -mpreferred-stack-boundary=2 is
28 # an error, so don't try to reduce it here like we used to. We still
29 # explicit set -mpreferred-stack-boundary=4 the places where it matters,
30 # in case an older compiler defaulted to 2.
31 ifeq ($(subdir),math)
32 sysdep-CFLAGS += -mpreferred-stack-boundary=4
33 else
34 ifeq ($(subdir),csu)
35 sysdep-CFLAGS += -mpreferred-stack-boundary=4
36 else
37 # Likewise, any function which calls user callbacks
38 uses-callbacks += -mpreferred-stack-boundary=4
39 # Likewise, any stack alignment tests
40 stack-align-test-flags += -malign-double -mpreferred-stack-boundary=4
41 endif
42 endif
44 # And a couple of other routines
45 ifeq ($(subdir),stdlib)
46 CFLAGS-exit.c += -mpreferred-stack-boundary=4
47 CFLAGS-cxa_finalize.c += -mpreferred-stack-boundary=4
48 endif
49 ifeq ($(subdir),elf)
50 CFLAGS-dl-init.c += -mpreferred-stack-boundary=4
51 CFLAGS-dl-fini.c += -mpreferred-stack-boundary=4
52 CFLAGS-dl-open.c += -mpreferred-stack-boundary=4
53 CFLAGS-dl-close.c += -mpreferred-stack-boundary=4
54 CFLAGS-dl-error.c += -mpreferred-stack-boundary=4
55 endif
56 ifeq ($(subdir),dlfcn)
57 CFLAGS-dlopen.c += -mpreferred-stack-boundary=4
58 CFLAGS-dlopenold.c += -mpreferred-stack-boundary=4
59 CFLAGS-dlclose.c += -mpreferred-stack-boundary=4
60 CFLAGS-dlerror.c += -mpreferred-stack-boundary=4
61 endif
63 ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
64 defines += -DNO_TLS_DIRECT_SEG_REFS
65 endif
67 ifeq ($(subdir),elf)
68 sysdep-dl-routines += tlsdesc dl-tlsdesc
69 sysdep_routines += tlsdesc dl-tlsdesc
70 sysdep-rtld-routines += tlsdesc dl-tlsdesc
71 endif
73 ifeq ($(subdir),csu)
74 gen-as-const-headers += tlsdesc.sym
75 endif