Print this page
5262 libm needs to be carefully unifdef'd
5268 libm doesn't need to hide symbols which are already local
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libm/Makefile.libm.com
+++ new/usr/src/lib/libm/Makefile.libm.com
1 1 #
2 2 # This file and its contents are supplied under the terms of the
3 3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 4 # You may only use this file in accordance with the terms of version
5 5 # 1.0 of the CDDL.
6 6 #
7 7 # A full copy of the text of the CDDL should have accompanied this
8 8 # source. A copy of the CDDL is also available via the Internet at
9 9 # http://www.illumos.org/license/CDDL.
10 10 #
11 11
12 12 #
13 13 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
14 14 #
15 15
16 16 LIBMDIR = $(SRC)/lib/libm
17 17
18 18 LIBMSRC = $(LIBMDIR)/common
19 19
20 20 CPP_CMD = $(CC) -E -Xs
21 21
22 22 ASSUFFIX_sparc = S
23 23 ASSUFFIX_i386 = s
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
24 24 ASSUFFIX = $(ASSUFFIX_$(MACH))
25 25
26 26 # C99MODE of neither enabled nor disabled is "no_lib", whereby we expect
27 27 # C99-the-language, but don't modify the behaviour of library routines. This
28 28 # is VERY IMPORTANT, as -xc99=%all, for instance, would link us with
29 29 # values-xpg6, which would introduce an __xpg6 to our object with the C99
30 30 # flags set, causing us to default C99 libm behaviour on, breaking
31 31 # compatibility.
32 32 C99MODE =
33 33
34 -M4FLAGS = -D__STDC__ -DELFOBJ -DPIC
34 +M4FLAGS = -D__STDC__ -DPIC
35 35
36 36 LDBLDIR_sparc = Q
37 37 LDBLDIR_i386 = LD
38 38 LDBLDIR = $(LDBLDIR_$(MACH))
39 39
40 40 LM_IL = $(LIBMDIR)/$(TARGET_ARCH)/src/locallibm.il
41 41
42 -CFLAGS += $(C_PICFLAGS) -D__INLINE $(XSTRCONST) $(LM_IL)
43 -CFLAGS64 += $(C_PICFLAGS) -D__INLINE $(XSTRCONST) $(LM_IL)
42 +CFLAGS += $(C_PICFLAGS) $(XSTRCONST) $(LM_IL)
43 +CFLAGS64 += $(C_PICFLAGS) $(XSTRCONST) $(LM_IL)
44 44 sparc_CFLAGS += -Wa,-xarch=v8plus
45 45
46 -CPPFLAGS += -DELFOBJ \
47 - -DLIBM_MT_FEX_SYNC \
48 - -I$(LIBMSRC)/C \
46 +CPPFLAGS += -I$(LIBMSRC)/C \
49 47 -I$(LIBMSRC)/$(LDBLDIR) -I$(LIBMDIR)/$(TARGET_ARCH)/src
50 48
51 49 # GCC needs __C99FEATURES__ such that the implementations of isunordered,
52 50 # isgreaterequal, islessequal, etc, exist. This is basically equivalent to
53 51 # providing no -xc99 to Studio, in that it gets us the C99 language features,
54 52 # but not values-xpg6, the reason for which is outline with C99MODE.
55 53 CFLAGS += -_gcc=-D__C99FEATURES__
56 54 CFLAGS64 += -_gcc=-D__C99FEATURES__
57 55
58 56 # libm depends on integer overflow characteristics
59 57 CFLAGS += -_gcc=-fno-strict-overflow
60 58 CFLAGS64 += -_gcc=-fno-strict-overflow
61 59
62 60 $(DYNLIB) := LDLIBS += -lc
63 61
64 62 $(LINTLIB) := SRCS = $(LIBMSRC)/$(LINTSRC)
65 63
66 64 CLEANFILES += pics/*.s pics/*.S
67 65
68 66 FPDEF_amd64 = -DARCH_amd64
69 67 FPDEF_sparc = -DCG89 -DARCH_v8plus -DFPADD_TRAPS_INCOMPLETE_ON_NAN
70 68 FPDEF_sparcv9 = -DARCH_v9 -DFPADD_TRAPS_INCOMPLETE_ON_NAN
71 69 FPDEF = $(FPDEF_$(TARGET_ARCH))
72 70
73 71 ASFLAGS = -P -D_ASM $(FPDEF)
74 72
75 73 XARCH_sparc = v8plus
76 74 XARCH_sparcv9 = v9
77 75 XARCH_i386 = f80387
78 76 XARCH_amd64 = amd64
79 77 XARCH = $(XARCH_$(TARGET_ARCH))
80 78
81 79 ASOPT_sparc = -xarch=$(XARCH) $(AS_PICFLAGS)
82 80 ASOPT_sparcv9 = -xarch=$(XARCH) $(AS_PICFLAGS)
83 81 ASOPT_i386 =
84 82 ASOPT_amd64 = -xarch=$(XARCH) $(AS_PICFLAGS)
85 83 ASOPT = $(ASOPT_$(TARGET_ARCH))
86 84
87 85 ASFLAGS += $(ASOPT)
88 86
89 87 CPPFLAGS_sparc = -DFPADD_TRAPS_INCOMPLETE_ON_NAN \
90 88 -DFDTOS_TRAPS_INCOMPLETE_IN_FNS_MODE
91 89
92 90 CPPFLAGS += $(CPPFLAGS_$(MACH))
93 91 ASFLAGS += $(CPPFLAGS)
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX