make/linux/makefiles/sparcWorks.make

Wed, 14 Oct 2020 17:44:48 +0800

author
aoqi
date
Wed, 14 Oct 2020 17:44:48 +0800
changeset 9931
fd44df5e3bc3
parent 6876
710a3c8b516e
permissions
-rw-r--r--

Merge

aoqi@0 1 #
aoqi@0 2 # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 #
aoqi@0 5 # This code is free software; you can redistribute it and/or modify it
aoqi@0 6 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 # published by the Free Software Foundation.
aoqi@0 8 #
aoqi@0 9 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 12 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 13 # accompanied this code).
aoqi@0 14 #
aoqi@0 15 # You should have received a copy of the GNU General Public License version
aoqi@0 16 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 18 #
aoqi@0 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 20 # or visit www.oracle.com if you need additional information or have any
aoqi@0 21 # questions.
aoqi@0 22 #
aoqi@0 23 #
aoqi@0 24
aoqi@1 25 #
aoqi@1 26 # This file has been modified by Loongson Technology in 2015. These
aoqi@1 27 # modifications are Copyright (c) 2015 Loongson Technology, and are made
aoqi@1 28 # available on the same license terms set forth above.
aoqi@1 29 #
aoqi@1 30
aoqi@0 31 #------------------------------------------------------------------------
aoqi@0 32 # CC, CXX & AS
aoqi@0 33
aoqi@0 34 # If a SPEC is not set already, then use these defaults.
aoqi@0 35 ifeq ($(SPEC),)
aoqi@0 36 CXX = CC
aoqi@0 37 CC = cc
aoqi@0 38 AS = $(CC) -c
aoqi@0 39
aoqi@0 40 HOSTCXX = $(CXX)
aoqi@0 41 HOSTCC = $(CC)
aoqi@0 42 endif
aoqi@0 43
aoqi@0 44 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
aoqi@0 45 ARCHFLAG/i486 = -m32
aoqi@0 46 ARCHFLAG/amd64 = -m64
aoqi@1 47 ARCHFLAG/mips64 = -m64
aoqi@0 48
aoqi@0 49 CFLAGS += $(ARCHFLAG)
aoqi@0 50 AOUT_FLAGS += $(ARCHFLAG)
aoqi@0 51 LFLAGS += $(ARCHFLAG)
aoqi@0 52 ASFLAGS += $(ARCHFLAG)
aoqi@0 53
aoqi@0 54 #------------------------------------------------------------------------
aoqi@0 55 # Compiler flags
aoqi@0 56
aoqi@0 57 # position-independent code
aoqi@0 58 PICFLAG = -KPIC
aoqi@0 59
aoqi@0 60 CFLAGS += $(PICFLAG)
aoqi@0 61 # no more exceptions
aoqi@0 62 CFLAGS += -features=no%except
aoqi@0 63 # Reduce code bloat by reverting back to 5.0 behavior for static initializers
aoqi@0 64 CFLAGS += -features=no%split_init
aoqi@0 65 # allow zero sized arrays
aoqi@0 66 CFLAGS += -features=zla
aoqi@0 67
aoqi@0 68 # Use C++ Interpreter
aoqi@0 69 ifdef CC_INTERP
aoqi@0 70 CFLAGS += -DCC_INTERP
aoqi@0 71 endif
aoqi@0 72
aoqi@0 73 # We don't need libCstd.so and librwtools7.so, only libCrun.so
aoqi@0 74 CFLAGS += -library=Crun
aoqi@0 75 LIBS += -lCrun
aoqi@0 76
aoqi@0 77 CFLAGS += -mt
aoqi@0 78 LFLAGS += -mt
aoqi@0 79
aoqi@0 80 # Compiler warnings are treated as errors
aoqi@0 81 #WARNINGS_ARE_ERRORS = -errwarn=%all
aoqi@0 82 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS)
aoqi@0 83 # Special cases
aoqi@0 84 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
aoqi@0 85
aoqi@0 86 # The flags to use for an Optimized build
aoqi@0 87 OPT_CFLAGS+=-xO4
aoqi@0 88 OPT_CFLAGS/NOOPT=-xO0
aoqi@0 89
aoqi@0 90 # Flags for creating the dependency files.
aoqi@0 91 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
aoqi@0 92 DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d)
aoqi@0 93 endif
aoqi@0 94
aoqi@0 95 # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
aoqi@0 96 CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
aoqi@0 97
aoqi@0 98 #------------------------------------------------------------------------
aoqi@0 99 # Linker flags
aoqi@0 100
aoqi@0 101 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
aoqi@0 102 MAPFLAG = -Wl,--version-script=FILENAME
aoqi@0 103
aoqi@0 104 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
aoqi@0 105 SONAMEFLAG = -h SONAME
aoqi@0 106
aoqi@0 107 # Build shared library
aoqi@0 108 SHARED_FLAG = -G
aoqi@0 109
aoqi@0 110 #------------------------------------------------------------------------
aoqi@0 111 # Debug flags
aoqi@0 112 DEBUG_CFLAGS += -g
aoqi@0 113 FASTDEBUG_CFLAGS = -g0
aoqi@0 114

mercurial