1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/make/bsd/makefiles/sparcWorks.make Wed Apr 27 01:25:04 2016 +0800 1.3 @@ -0,0 +1,107 @@ 1.4 +# 1.5 +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 +# 1.8 +# This code is free software; you can redistribute it and/or modify it 1.9 +# under the terms of the GNU General Public License version 2 only, as 1.10 +# published by the Free Software Foundation. 1.11 +# 1.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.15 +# version 2 for more details (a copy is included in the LICENSE file that 1.16 +# accompanied this code). 1.17 +# 1.18 +# You should have received a copy of the GNU General Public License version 1.19 +# 2 along with this work; if not, write to the Free Software Foundation, 1.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.21 +# 1.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.23 +# or visit www.oracle.com if you need additional information or have any 1.24 +# questions. 1.25 +# 1.26 +# 1.27 + 1.28 +#------------------------------------------------------------------------ 1.29 +# CC, CXX & AS 1.30 + 1.31 +# If a SPEC is not set already, then use these defaults. 1.32 +ifeq ($(SPEC),) 1.33 + CXX = CC 1.34 + CC = cc 1.35 + AS = $(CC) -c 1.36 + 1.37 + HOSTCXX = $(CXX) 1.38 + HOSTCC = $(CC) 1.39 +endif 1.40 + 1.41 +ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) 1.42 +ARCHFLAG/i486 = -m32 1.43 +ARCHFLAG/amd64 = -m64 1.44 + 1.45 +CFLAGS += $(ARCHFLAG) 1.46 +AOUT_FLAGS += $(ARCHFLAG) 1.47 +LFLAGS += $(ARCHFLAG) 1.48 +ASFLAGS += $(ARCHFLAG) 1.49 + 1.50 +#------------------------------------------------------------------------ 1.51 +# Compiler flags 1.52 + 1.53 +# position-independent code 1.54 +PICFLAG = -KPIC 1.55 + 1.56 +CFLAGS += $(PICFLAG) 1.57 +# no more exceptions 1.58 +CFLAGS += -features=no%except 1.59 +# Reduce code bloat by reverting back to 5.0 behavior for static initializers 1.60 +CFLAGS += -features=no%split_init 1.61 +# allow zero sized arrays 1.62 +CFLAGS += -features=zla 1.63 + 1.64 +# Use C++ Interpreter 1.65 +ifdef CC_INTERP 1.66 + CFLAGS += -DCC_INTERP 1.67 +endif 1.68 + 1.69 +# We don't need libCstd.so and librwtools7.so, only libCrun.so 1.70 +CFLAGS += -library=Crun 1.71 +LIBS += -lCrun 1.72 + 1.73 +CFLAGS += -mt 1.74 +LFLAGS += -mt 1.75 + 1.76 +# Compiler warnings are treated as errors 1.77 +#WARNINGS_ARE_ERRORS = -errwarn=%all 1.78 +CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) 1.79 +# Special cases 1.80 +CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 1.81 + 1.82 +# The flags to use for an Optimized build 1.83 +OPT_CFLAGS+=-xO4 1.84 +OPT_CFLAGS/NOOPT=-xO0 1.85 + 1.86 +# Flags for creating the dependency files. 1.87 +ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) 1.88 +DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d) 1.89 +endif 1.90 + 1.91 +# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. 1.92 +CFLAGS += -DDONT_USE_PRECOMPILED_HEADER 1.93 + 1.94 +#------------------------------------------------------------------------ 1.95 +# Linker flags 1.96 + 1.97 +# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. 1.98 +MAPFLAG = -Wl,--version-script=FILENAME 1.99 + 1.100 +# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj 1.101 +SONAMEFLAG = -h SONAME 1.102 + 1.103 +# Build shared library 1.104 +SHARED_FLAG = -G 1.105 + 1.106 +#------------------------------------------------------------------------ 1.107 +# Debug flags 1.108 +DEBUG_CFLAGS += -g 1.109 +FASTDEBUG_CFLAGS = -g0 1.110 +