Makefile.libm.com (1ec68d336ba97cd53f46053ac10401d16014d075) Makefile.libm.com (7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source. A copy of the CDDL is also available via the Internet at

--- 9 unchanged lines hidden (view full) ---

18LIBMSRC = $(LIBMDIR)/common
19
20CPP_CMD = $(CC) -E -Xs
21
22ASSUFFIX_sparc = S
23ASSUFFIX_i386 = s
24ASSUFFIX = $(ASSUFFIX_$(MACH))
25
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source. A copy of the CDDL is also available via the Internet at

--- 9 unchanged lines hidden (view full) ---

18LIBMSRC = $(LIBMDIR)/common
19
20CPP_CMD = $(CC) -E -Xs
21
22ASSUFFIX_sparc = S
23ASSUFFIX_i386 = s
24ASSUFFIX = $(ASSUFFIX_$(MACH))
25
26# C99MODE of neither enabled nor disabled is "no_lib", whereby we expect
27# C99-the-language, but don't modify the behaviour of library routines. This
28# is VERY IMPORTANT, as -xc99=%all, for instance, would link us with
26# With studio C99MODE of neither enabled nor disabled is "no_lib", whereby we
27# expect C99-the-language, but don't modify the behaviour of library routines.
28# This is VERY IMPORTANT, as -xc99=%all, for instance, would link us with
29# values-xpg6, which would introduce an __xpg6 to our object with the C99
30# flags set, causing us to default C99 libm behaviour on, breaking
31# compatibility.
29# values-xpg6, which would introduce an __xpg6 to our object with the C99
30# flags set, causing us to default C99 libm behaviour on, breaking
31# compatibility.
32#
33# We must then, unfortunately, defeat the GNU compiler _defaulting_ to C99, by
34# in that case setting it back to gnu89, which _also_ accepts C99 syntax as
35# far as is important.
32C99MODE =
36C99MODE =
37CFLAGS += -_gcc=-std=gnu89
38CFLAGS64 += -_gcc=-std=gnu89
33
34M4FLAGS = -D__STDC__ -DPIC
35
36LDBLDIR_sparc = Q
37LDBLDIR_i386 = LD
38LDBLDIR = $(LDBLDIR_$(MACH))
39
40LM_IL = $(LIBMDIR)/$(TARGET_ARCH)/src/locallibm.il
41
42CFLAGS += $(C_PICFLAGS) $(XSTRCONST) $(LM_IL)
43CFLAGS64 += $(C_PICFLAGS) $(XSTRCONST) $(LM_IL)
44sparc_CFLAGS += -Wa,-xarch=v8plus
45
46CPPFLAGS += -I$(LIBMSRC)/C \
47 -I$(LIBMSRC)/$(LDBLDIR) -I$(LIBMDIR)/$(TARGET_ARCH)/src
48
49# GCC needs __C99FEATURES__ such that the implementations of isunordered,
50# isgreaterequal, islessequal, etc, exist. This is basically equivalent to
51# providing no -xc99 to Studio, in that it gets us the C99 language features,
39
40M4FLAGS = -D__STDC__ -DPIC
41
42LDBLDIR_sparc = Q
43LDBLDIR_i386 = LD
44LDBLDIR = $(LDBLDIR_$(MACH))
45
46LM_IL = $(LIBMDIR)/$(TARGET_ARCH)/src/locallibm.il
47
48CFLAGS += $(C_PICFLAGS) $(XSTRCONST) $(LM_IL)
49CFLAGS64 += $(C_PICFLAGS) $(XSTRCONST) $(LM_IL)
50sparc_CFLAGS += -Wa,-xarch=v8plus
51
52CPPFLAGS += -I$(LIBMSRC)/C \
53 -I$(LIBMSRC)/$(LDBLDIR) -I$(LIBMDIR)/$(TARGET_ARCH)/src
54
55# GCC needs __C99FEATURES__ such that the implementations of isunordered,
56# isgreaterequal, islessequal, etc, exist. This is basically equivalent to
57# providing no -xc99 to Studio, in that it gets us the C99 language features,
52# but not values-xpg6, the reason for which is outline with C99MODE.
58# but not values-xpg6, the reason for which is outlined with C99MODE.
53CFLAGS += -_gcc=-D__C99FEATURES__
54CFLAGS64 += -_gcc=-D__C99FEATURES__
55
56# libm depends on integer overflow characteristics
57CFLAGS += -_gcc=-fno-strict-overflow
58CFLAGS64 += -_gcc=-fno-strict-overflow
59
60$(DYNLIB) := LDLIBS += -lc

--- 31 unchanged lines hidden ---
59CFLAGS += -_gcc=-D__C99FEATURES__
60CFLAGS64 += -_gcc=-D__C99FEATURES__
61
62# libm depends on integer overflow characteristics
63CFLAGS += -_gcc=-fno-strict-overflow
64CFLAGS64 += -_gcc=-fno-strict-overflow
65
66$(DYNLIB) := LDLIBS += -lc

--- 31 unchanged lines hidden ---