author | rfield |
Tue, 20 Nov 2012 09:58:55 -0800 | |
changeset 14554 | 4e29b285c723 |
parent 14342 | 8435a30053c1 |
permissions | -rw-r--r-- |
2 | 1 |
# |
14342
8435a30053c1
7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents:
9241
diff
changeset
|
2 |
# Copyright (c) 1998, 2011, Oracle and/or its affiliates. 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Makefile for linking with mapfiles. |
|
28 |
# |
|
29 |
# NOTE: Not using a mapfile will expose all your extern functions and |
|
30 |
# extern data symbols as part of your interface, so unless your |
|
31 |
# extern names are safe from being mistaken as names from other |
|
32 |
# libraries, you better use a mapfile, or use a unique naming |
|
33 |
# convention on all your extern symbols. |
|
34 |
# |
|
35 |
# The mapfile will establish versioning by defining the exported interface. |
|
36 |
# |
|
37 |
# The mapfile can also force certain .o files or elf sections into the |
|
38 |
# the different segments of the resulting library/program image. |
|
39 |
# |
|
40 |
# The macro FILES_m can contain any number of mapfiles. |
|
41 |
# |
|
42 |
||
43 |
# Always make sure 'all' is the default rule |
|
44 |
mapfile_default_rule: all |
|
45 |
||
46 |
ifeq ($(PLATFORM), solaris) |
|
47 |
||
48 |
ifeq ($(VARIANT), OPT) |
|
49 |
# OPT build MUST have a mapfile? |
|
50 |
ifndef FILES_m |
|
51 |
FILES_m = mapfile-vers |
|
52 |
endif |
|
53 |
||
54 |
# If we are re-ordering functions in this solaris library, we need to make |
|
9241
e77024585d01
7033954: (launcher) Launchers not built with mapfiles
ksrini
parents:
5506
diff
changeset
|
55 |
# sure that -xF is added to the compile lines. This option is critical and |
e77024585d01
7033954: (launcher) Launchers not built with mapfiles
ksrini
parents:
5506
diff
changeset
|
56 |
# enables the functions to be reordered. |
2 | 57 |
ifdef FILES_reorder |
58 |
CFLAGS_OPT += -xF |
|
59 |
CXXFLAGS_OPT += -xF |
|
60 |
endif |
|
61 |
||
62 |
INIT += $(TEMPDIR)/mapfile-vers |
|
63 |
||
64 |
$(TEMPDIR)/mapfile-vers : $(FILES_m) $(FILES_reorder) |
|
65 |
$(prep-target) |
|
66 |
$(CAT) $(FILES_m) > $@ |
|
67 |
ifdef FILES_reorder |
|
68 |
$(SED) -e 's=OUTPUTDIR=$(OUTPUTDIR)=' $(FILES_reorder) >> $@ |
|
69 |
endif |
|
70 |
endif # VARIANT |
|
71 |
||
72 |
ifndef LDNOMAP |
|
73 |
LDMAPFLAGS_OPT = -M$(TEMPDIR)/mapfile-vers |
|
74 |
LDMAPFLAGS_DBG = $(FILES_m:%=-M%) |
|
75 |
endif |
|
76 |
||
77 |
endif # PLATFORM |
|
78 |
||
79 |
ifeq ($(PLATFORM), linux) |
|
80 |
||
81 |
ifeq ($(VARIANT), OPT) |
|
82 |
# OPT build MUST have a mapfile? |
|
83 |
ifndef FILES_m |
|
84 |
FILES_m = mapfile-vers |
|
85 |
endif |
|
86 |
endif # VARIANT |
|
87 |
||
88 |
ifndef LDNOMAP |
|
89 |
LDMAPFLAGS_OPT = $(FILES_m:%=-Xlinker -version-script=%) |
|
90 |
LDMAPFLAGS_DBG = $(FILES_m:%=-Xlinker -version-script=%) |
|
91 |
endif |
|
92 |
||
93 |
endif # PLATFORM |
|
94 |
||
95 |
LDFLAGS_OPT += $(LDMAPFLAGS_OPT) |
|
96 |
LDFLAGS_DBG += $(LDMAPFLAGS_DBG) |
|
97 |