0N/A#
2362N/A# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
2362N/A# published by the Free Software Foundation. Oracle designates this
0N/A# particular file as subject to the "Classpath" exception as provided
2362N/A# by Oracle in the LICENSE file that accompanied this code.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
2362N/A# questions.
0N/A#
0N/A
0N/A#
0N/A# GCC Compiler settings
0N/A#
0N/A
0N/Aifeq ($(PLATFORM), windows)
0N/A
0N/A # Settings specific to Windows, pretty stale, hasn't been used
0N/A CC = $(COMPILER_PATH)gcc
0N/A CPP = $(COMPILER_PATH)gcc -E
0N/A CXX = $(COMPILER_PATH)g++
0N/A CCC = $(COMPILER_PATH)g++
0N/A LIBEXE = $(COMPILER_PATH)lib
0N/A LINK = $(COMPILER_PATH)link
0N/A RC = $(COMPILER_PATH)rc
0N/A LINK32 = $(LINK)
0N/A RSC = $(RC)
0N/A # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
0N/A NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
0N/A ifeq ($(ARCH_DATA_MODEL), 32)
0N/A CC_VER = UNKNOWN
0N/A else
0N/A CC_VER = UNKNOWN
0N/A endif
0N/A _LINK_VER :=$(shell $(LINK) 2>&1 | $(HEAD) -n 1)
0N/A LINK_VER :=$(call GetVersion,"$(_LINK_VER)")
0N/A
0N/Aendif
0N/A
0N/Aifeq ($(PLATFORM), linux)
0N/A
0N/A # Settings specific to Linux
0N/A CC = $(COMPILER_PATH)gcc
0N/A CPP = $(COMPILER_PATH)gcc -E
0N/A # statically link libstdc++ before C++ ABI is stablized on Linux
0N/A STATIC_CXX = true
0N/A ifeq ($(STATIC_CXX),true)
0N/A # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++"
0N/A # We need to use gcc to statically link the C++ runtime. gcc and g++ use
0N/A # the same subprocess to compile C++ files, so it is OK to build using gcc.
0N/A CXX = $(COMPILER_PATH)gcc
0N/A else
0N/A CXX = $(COMPILER_PATH)g++
0N/A endif
0N/A # Option used to create a shared library
0N/A SHARED_LIBRARY_FLAG = -shared
0N/A SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
0N/A
0N/Aendif
0N/A
0N/Aifeq ($(PLATFORM), solaris)
0N/A
0N/A # Settings specific to Solaris
0N/A CC = $(COMPILER_PATH)gcc
0N/A CPP = $(COMPILER_PATH)gcc -E
0N/A CXX = $(COMPILER_PATH)g++
0N/A
0N/A # Option used to create a shared library
0N/A SHARED_LIBRARY_FLAG = -G
0N/A
0N/Aendif
0N/A
0N/A# Get gcc version
0N/A_CC_VER :=$(shell $(CC) -dumpversion 2>&1 )
0N/ACC_VER :=$(call GetVersion,"$(_CC_VER)")
0N/ACC_MAJORVER :=$(call MajorVersion,$(CC_VER))
0N/ACC_MINORVER :=$(call MinorVersion,$(CC_VER))
0N/A
0N/A# Name of compiler
0N/ACOMPILER_NAME = GCC$(call MajorVersion,$(CC_VER))
0N/ACOMPILER_VERSION = $(COMPILER_NAME)
0N/A
0N/A