make/linux/makefiles/sparcWorks.make

Fri, 25 Mar 2011 09:35:39 +0100

author
roland
date
Fri, 25 Mar 2011 09:35:39 +0100
changeset 2683
7e88bdae86ec
parent 2384
0a8e0d4345b3
child 2708
1d1603768966
permissions
-rw-r--r--

7029017: Additional architecture support for c2 compiler
Summary: Enables cross building of a c2 VM. Support masking of shift counts when the processor architecture mandates it.
Reviewed-by: kvn, never

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

mercurial