Print this page
5196 The cw wrapper restricts gcc to -O2


   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright (c) 2012, Joyent, Inc.  All rights reserved.
  24 # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  25 # Copyright 2013 Garrett D'Amore <garrett@damore.org>

  26 #
  27 # Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  28 # Use is subject to license terms.
  29 #
  30 
  31 LIBCDIR=        $(SRC)/lib/libc
  32 LIB_PIC=        libc_pic.a
  33 VERS=           .1
  34 CPP=            /usr/lib/cpp
  35 TARGET_ARCH=    sparc
  36 
  37 # objects are grouped by source directory
  38 
  39 # Symbol capabilities objects.
  40 EXTPICS=                        \
  41         $(LIBCDIR)/capabilities/sun4u/sparcv9/pics/symcap.o \
  42         $(LIBCDIR)/capabilities/sun4u-opl/sparcv9/pics/symcap.o \
  43         $(LIBCDIR)/capabilities/sun4u-us3-hwcap1/sparcv9/pics/symcap.o \
  44         $(LIBCDIR)/capabilities/sun4u-us3-hwcap2/sparcv9/pics/symcap.o \
  45         $(LIBCDIR)/capabilities/sun4v-hwcap1/sparcv9/pics/symcap.o \


1164 QIL=                            \
1165         _Q_add.o                \
1166         _Q_cmp.o                \
1167         _Q_cmpe.o               \
1168         _Q_div.o                \
1169         _Q_dtoq.o               \
1170         _Q_fcc.o                \
1171         _Q_mul.o                \
1172         _Q_qtod.o               \
1173         _Q_qtoi.o               \
1174         _Q_qtos.o               \
1175         _Q_qtou.o               \
1176         _Q_sqrt.o               \
1177         _Q_stoq.o               \
1178         _Q_sub.o                \
1179         _Qp_qtox.o              \
1180         _Qp_qtoux.o
1181 
1182 $(QIL:%=pics/%) := CFLAGS64 += $(LIBCDIR)/$(MACH)/fp/__quad.il
1183 pics/_Qp%.o := CFLAGS64 += -I$(LIBCDIR)/$(MACH)/fp
1184 pics/_Q%.o := sparcv9_COPTFLAG = -xO4 -xchip=ultra
1185 
1186 # Files in crt subdirectory which need muldiv64.il inline template
1187 #CIL=   mul64.o divrem64.o
1188 #$(CIL:%=pics/%) := CFLAGS += $(LIBCBASE)/crt/mul64.il
1189 
1190 # large-file-aware components that should be built large
1191 
1192 #$(COMSYSOBJS64:%=pics/%) := \
1193 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1194 
1195 #$(SYSOBJS64:%=pics/%) := \
1196 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1197 
1198 #$(PORTGEN64:%=pics/%) := \
1199 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1200 
1201 #$(PORTSTDIO64:%=pics/%) := \
1202 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1203 
1204 #$(PORTSYS64:%=pics/%) := \
1205 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1206 
1207 $(PORTSTDIO_W:%=pics/%) := \
1208         CPPFLAGS += -D_WIDE
1209 
1210 $(PORTPRINT_W:%=pics/%) := \
1211         CPPFLAGS += -D_WIDE
1212 
1213 $(PORTI18N_COND:%=pics/%) := \
1214         CPPFLAGS += -D_WCS_LONGLONG
1215 
1216 # Files which need extra optimization
1217 pics/getenv.o := sparcv9_COPTFLAG = -xO4
1218 
1219 .KEEP_STATE:
1220 
1221 all: $(LIBS) $(LIB_PIC)
1222 
1223 lint    :=      CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp
1224 lint    :=      CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99
1225 lint    :=      LINTFLAGS64 += -mn
1226 
1227 lint:
1228         @echo $(LINT.c) ... $(LDLIBS)
1229         @$(LINT.c) $(SRCS) $(LDLIBS)
1230 
1231 $(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc
1232 $(LINTLIB):= CPPFLAGS += -D_MSE_INT_H
1233 $(LINTLIB):= LINTFLAGS64=-nvx -m64
1234 
1235 # object files that depend on inline template
1236 $(TIL:%=pics/%): $(LIBCBASE)/threads/sparcv9.il
1237 $(IL:%=pics/%): $(LIBCBASE)/fp/base.il




   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright (c) 2012, Joyent, Inc.  All rights reserved.
  24 # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  25 # Copyright 2013 Garrett D'Amore <garrett@damore.org>
  26 # Copyright 2014 Gary Mills
  27 #
  28 # Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  29 # Use is subject to license terms.
  30 #
  31 
  32 LIBCDIR=        $(SRC)/lib/libc
  33 LIB_PIC=        libc_pic.a
  34 VERS=           .1
  35 CPP=            /usr/lib/cpp
  36 TARGET_ARCH=    sparc
  37 
  38 # objects are grouped by source directory
  39 
  40 # Symbol capabilities objects.
  41 EXTPICS=                        \
  42         $(LIBCDIR)/capabilities/sun4u/sparcv9/pics/symcap.o \
  43         $(LIBCDIR)/capabilities/sun4u-opl/sparcv9/pics/symcap.o \
  44         $(LIBCDIR)/capabilities/sun4u-us3-hwcap1/sparcv9/pics/symcap.o \
  45         $(LIBCDIR)/capabilities/sun4u-us3-hwcap2/sparcv9/pics/symcap.o \
  46         $(LIBCDIR)/capabilities/sun4v-hwcap1/sparcv9/pics/symcap.o \


1165 QIL=                            \
1166         _Q_add.o                \
1167         _Q_cmp.o                \
1168         _Q_cmpe.o               \
1169         _Q_div.o                \
1170         _Q_dtoq.o               \
1171         _Q_fcc.o                \
1172         _Q_mul.o                \
1173         _Q_qtod.o               \
1174         _Q_qtoi.o               \
1175         _Q_qtos.o               \
1176         _Q_qtou.o               \
1177         _Q_sqrt.o               \
1178         _Q_stoq.o               \
1179         _Q_sub.o                \
1180         _Qp_qtox.o              \
1181         _Qp_qtoux.o
1182 
1183 $(QIL:%=pics/%) := CFLAGS64 += $(LIBCDIR)/$(MACH)/fp/__quad.il
1184 pics/_Qp%.o := CFLAGS64 += -I$(LIBCDIR)/$(MACH)/fp
1185 pics/_Q%.o := sparcv9_COPTFLAG = -_cc=-xO4 -_gcc=-O2 -xchip=ultra
1186 
1187 # Files in crt subdirectory which need muldiv64.il inline template
1188 #CIL=   mul64.o divrem64.o
1189 #$(CIL:%=pics/%) := CFLAGS += $(LIBCBASE)/crt/mul64.il
1190 
1191 # large-file-aware components that should be built large
1192 
1193 #$(COMSYSOBJS64:%=pics/%) := \
1194 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1195 
1196 #$(SYSOBJS64:%=pics/%) := \
1197 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1198 
1199 #$(PORTGEN64:%=pics/%) := \
1200 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1201 
1202 #$(PORTSTDIO64:%=pics/%) := \
1203 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1204 
1205 #$(PORTSYS64:%=pics/%) := \
1206 #       CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1207 
1208 $(PORTSTDIO_W:%=pics/%) := \
1209         CPPFLAGS += -D_WIDE
1210 
1211 $(PORTPRINT_W:%=pics/%) := \
1212         CPPFLAGS += -D_WIDE
1213 
1214 $(PORTI18N_COND:%=pics/%) := \
1215         CPPFLAGS += -D_WCS_LONGLONG
1216 
1217 # Files which need extra optimization
1218 pics/getenv.o := sparcv9_COPTFLAG = -_cc=-xO4 -_gcc=-O2
1219 
1220 .KEEP_STATE:
1221 
1222 all: $(LIBS) $(LIB_PIC)
1223 
1224 lint    :=      CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp
1225 lint    :=      CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99
1226 lint    :=      LINTFLAGS64 += -mn
1227 
1228 lint:
1229         @echo $(LINT.c) ... $(LDLIBS)
1230         @$(LINT.c) $(SRCS) $(LDLIBS)
1231 
1232 $(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc
1233 $(LINTLIB):= CPPFLAGS += -D_MSE_INT_H
1234 $(LINTLIB):= LINTFLAGS64=-nvx -m64
1235 
1236 # object files that depend on inline template
1237 $(TIL:%=pics/%): $(LIBCBASE)/threads/sparcv9.il
1238 $(IL:%=pics/%): $(LIBCBASE)/fp/base.il