diff options
Diffstat (limited to 'usr/src/lib/libm/Makefile.libm.com')
-rw-r--r-- | usr/src/lib/libm/Makefile.libm.com | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr/src/lib/libm/Makefile.libm.com b/usr/src/lib/libm/Makefile.libm.com index 0a8904be2b..ffa6c888d4 100644 --- a/usr/src/lib/libm/Makefile.libm.com +++ b/usr/src/lib/libm/Makefile.libm.com @@ -23,13 +23,19 @@ ASSUFFIX_sparc = S ASSUFFIX_i386 = s ASSUFFIX = $(ASSUFFIX_$(MACH)) -# C99MODE of neither enabled nor disabled is "no_lib", whereby we expect -# C99-the-language, but don't modify the behaviour of library routines. This -# is VERY IMPORTANT, as -xc99=%all, for instance, would link us with +# With studio C99MODE of neither enabled nor disabled is "no_lib", whereby we +# expect C99-the-language, but don't modify the behaviour of library routines. +# This is VERY IMPORTANT, as -xc99=%all, for instance, would link us with # values-xpg6, which would introduce an __xpg6 to our object with the C99 # flags set, causing us to default C99 libm behaviour on, breaking # compatibility. +# +# We must then, unfortunately, defeat the GNU compiler _defaulting_ to C99, by +# in that case setting it back to gnu89, which _also_ accepts C99 syntax as +# far as is important. C99MODE = +CFLAGS += -_gcc=-std=gnu89 +CFLAGS64 += -_gcc=-std=gnu89 M4FLAGS = -D__STDC__ -DPIC @@ -49,7 +55,7 @@ CPPFLAGS += -I$(LIBMSRC)/C \ # GCC needs __C99FEATURES__ such that the implementations of isunordered, # isgreaterequal, islessequal, etc, exist. This is basically equivalent to # providing no -xc99 to Studio, in that it gets us the C99 language features, -# but not values-xpg6, the reason for which is outline with C99MODE. +# but not values-xpg6, the reason for which is outlined with C99MODE. CFLAGS += -_gcc=-D__C99FEATURES__ CFLAGS64 += -_gcc=-D__C99FEATURES__ |