25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# This file and its contents are supplied under the terms of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# Common Development and Distribution License ("CDDL"), version 1.0.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# You may only use this file in accordance with the terms of version
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# 1.0 of the CDDL.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# A full copy of the text of the CDDL should have accompanied this
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# source. A copy of the CDDL is also available via the Internet at
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7Richard Lowe# With studio C99MODE of neither enabled nor disabled is "no_lib", whereby we
7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7Richard Lowe# expect C99-the-language, but don't modify the behaviour of library routines.
7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7Richard Lowe# This is VERY IMPORTANT, as -xc99=%all, for instance, would link us with
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# values-xpg6, which would introduce an __xpg6 to our object with the C99
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# flags set, causing us to default C99 libm behaviour on, breaking
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# compatibility.
7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7Richard Lowe# We must then, unfortunately, defeat the GNU compiler _defaulting_ to C99, by
7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7Richard Lowe# in that case setting it back to gnu89, which _also_ accepts C99 syntax as
7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7Richard Lowe# far as is important.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr JasiukajtisLM_IL = $(LIBMDIR)/$(TARGET_ARCH)/src/locallibm.il
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -I$(LIBMSRC)/$(LDBLDIR) -I$(LIBMDIR)/$(TARGET_ARCH)/src
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# GCC needs __C99FEATURES__ such that the implementations of isunordered,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# isgreaterequal, islessequal, etc, exist. This is basically equivalent to
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# providing no -xc99 to Studio, in that it gets us the C99 language features,
7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7Richard Lowe# but not values-xpg6, the reason for which is outlined with C99MODE.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# libm depends on integer overflow characteristics
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr JasiukajtisFPDEF_sparc = -DCG89 -DARCH_v8plus -DFPADD_TRAPS_INCOMPLETE_ON_NAN
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr JasiukajtisFPDEF_sparcv9 = -DARCH_v9 -DFPADD_TRAPS_INCOMPLETE_ON_NAN
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr JasiukajtisASOPT_sparc = -xarch=$(XARCH) $(AS_PICFLAGS)
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr JasiukajtisASOPT_sparcv9 = -xarch=$(XARCH) $(AS_PICFLAGS)
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr JasiukajtisASOPT_amd64 = -xarch=$(XARCH) $(AS_PICFLAGS)