author | ohair |
Mon, 16 Mar 2009 11:24:06 -0700 | |
changeset 2186 | 53da56fa3bf9 |
parent 2158 | 68869a085470 |
child 5506 | 202f599c92aa |
permissions | -rw-r--r-- |
2 | 1 |
# |
715 | 2 |
# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. |
2 | 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. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun in the LICENSE file that accompanied this code. |
|
10 |
# |
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
21 |
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any questions. |
|
24 |
# |
|
25 |
||
26 |
# |
|
27 |
# GCC Compiler settings |
|
28 |
# |
|
29 |
||
30 |
ifeq ($(PLATFORM), windows) |
|
31 |
||
32 |
# Settings specific to Windows, pretty stale, hasn't been used |
|
33 |
CC = $(COMPILER_PATH)gcc |
|
34 |
CPP = $(COMPILER_PATH)gcc -E |
|
35 |
CXX = $(COMPILER_PATH)g++ |
|
36 |
CCC = $(COMPILER_PATH)g++ |
|
37 |
LIBEXE = $(COMPILER_PATH)lib |
|
38 |
LINK = $(COMPILER_PATH)link |
|
39 |
RC = $(MSDEVTOOLS_PATH)link |
|
40 |
LINK32 = $(LINK) |
|
41 |
RSC = $(RC) |
|
42 |
# unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake |
|
43 |
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo |
|
44 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
45 |
CC_VER = UNKNOWN |
|
46 |
else |
|
47 |
CC_VER = UNKNOWN |
|
48 |
endif |
|
49 |
_LINK_VER :=$(shell $(LINK) 2>&1 | $(HEAD) -n 1) |
|
50 |
LINK_VER :=$(call GetVersion,"$(_LINK_VER)") |
|
51 |
||
52 |
endif |
|
53 |
||
54 |
ifeq ($(PLATFORM), linux) |
|
55 |
||
56 |
# Settings specific to Linux |
|
57 |
CC = $(COMPILER_PATH)gcc |
|
58 |
CPP = $(COMPILER_PATH)gcc -E |
|
59 |
# statically link libstdc++ before C++ ABI is stablized on Linux |
|
60 |
STATIC_CXX = true |
|
61 |
ifeq ($(STATIC_CXX),true) |
|
62 |
# g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" |
|
63 |
# We need to use gcc to statically link the C++ runtime. gcc and g++ use |
|
64 |
# the same subprocess to compile C++ files, so it is OK to build using gcc. |
|
65 |
CXX = $(COMPILER_PATH)gcc |
|
66 |
else |
|
67 |
CXX = $(COMPILER_PATH)g++ |
|
68 |
endif |
|
69 |
# Option used to create a shared library |
|
70 |
SHARED_LIBRARY_FLAG = -shared -mimpure-text |
|
71 |
SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) |
|
72 |
||
73 |
endif |
|
74 |
||
75 |
ifeq ($(PLATFORM), solaris) |
|
76 |
||
77 |
# Settings specific to Solaris |
|
78 |
CC = $(COMPILER_PATH)gcc |
|
79 |
CPP = $(COMPILER_PATH)gcc -E |
|
80 |
CXX = $(COMPILER_PATH)g++ |
|
81 |
||
82 |
# Option used to create a shared library |
|
83 |
SHARED_LIBRARY_FLAG = -G |
|
2158
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
849
diff
changeset
|
84 |
|
2 | 85 |
endif |
86 |
||
87 |
# Get gcc version |
|
88 |
_CC_VER :=$(shell $(CC) -dumpversion 2>&1 ) |
|
89 |
CC_VER :=$(call GetVersion,"$(_CC_VER)") |
|
90 |
||
2186
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
91 |
# Name of compiler |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
92 |
COMPILER_NAME = GCC$(call MajorVersion,$(CC_VER)) |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
93 |
COMPILER_VERSION = $(COMPILER_NAME) |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
94 |