Tue, 05 Oct 2010 17:38:40 -0700
6989736: fix mapfile warnings on solaris
Reviewed-by: kvn, iveresov, jcoomes
duke@435 | 1 | # |
trims@1907 | 2 | # Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | # |
duke@435 | 5 | # This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | # under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | # published by the Free Software Foundation. |
duke@435 | 8 | # |
duke@435 | 9 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | # accompanied this code). |
duke@435 | 14 | # |
duke@435 | 15 | # You should have received a copy of the GNU General Public License version |
duke@435 | 16 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | # |
trims@1907 | 19 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | # or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | # questions. |
duke@435 | 22 | # |
duke@435 | 23 | # |
duke@435 | 24 | |
duke@435 | 25 | # Rules to build gamma launcher, used by vm.make |
duke@435 | 26 | |
duke@435 | 27 | # gamma[_g]: launcher |
phh@1558 | 28 | LAUNCHER = gamma |
phh@1558 | 29 | LAUNCHER_G = $(LAUNCHER)$(G_SUFFIX) |
duke@435 | 30 | |
duke@435 | 31 | LAUNCHERDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher |
duke@435 | 32 | LAUNCHERFLAGS = $(ARCHFLAG) \ |
duke@435 | 33 | -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \ |
duke@435 | 34 | -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \ |
duke@435 | 35 | -DARCH=\"$(LIBARCH)\" \ |
duke@435 | 36 | -DGAMMA \ |
duke@435 | 37 | -DLAUNCHER_TYPE=\"gamma\" \ |
duke@435 | 38 | -DLINK_INTO_$(LINK_INTO) |
duke@435 | 39 | |
duke@435 | 40 | ifeq ($(LINK_INTO),AOUT) |
duke@435 | 41 | LAUNCHER.o = launcher.o $(JVM_OBJ_FILES) |
duke@435 | 42 | LAUNCHER_MAPFILE = mapfile_reorder |
duke@435 | 43 | LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE)) |
duke@435 | 44 | LIBS_LAUNCHER += $(LIBS) |
duke@435 | 45 | else |
duke@435 | 46 | LAUNCHER.o = launcher.o |
duke@435 | 47 | LFLAGS_LAUNCHER += -L `pwd` |
duke@435 | 48 | LIBS_LAUNCHER += -l$(JVM) $(LIBS) |
duke@435 | 49 | endif |
duke@435 | 50 | |
duke@435 | 51 | LINK_LAUNCHER = $(LINK.CC) |
duke@435 | 52 | |
duke@435 | 53 | LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CC/PRE_HOOK) |
duke@435 | 54 | LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK) |
duke@435 | 55 | |
duke@435 | 56 | ifeq ("${Platform_compiler}", "sparcWorks") |
duke@435 | 57 | # Enable the following LAUNCHERFLAGS addition if you need to compare the |
duke@435 | 58 | # built ELF objects. |
duke@435 | 59 | # |
duke@435 | 60 | # The -g option makes static data global and the "-W0,-noglobal" |
duke@435 | 61 | # option tells the compiler to not globalize static data using a unique |
duke@435 | 62 | # globalization prefix. Instead force the use of a static globalization |
duke@435 | 63 | # prefix based on the source filepath so the objects from two identical |
duke@435 | 64 | # compilations are the same. |
duke@435 | 65 | # |
duke@435 | 66 | # Note: The blog says to use "-W0,-xglobalstatic", but that doesn't |
duke@435 | 67 | # seem to work. I got "-W0,-noglobal" from Kelly and that works. |
duke@435 | 68 | #LAUNCHERFLAGS += -W0,-noglobal |
duke@435 | 69 | endif # Platform_compiler == sparcWorks |
duke@435 | 70 | |
duke@435 | 71 | launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c |
duke@435 | 72 | $(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS) |
duke@435 | 73 | |
duke@435 | 74 | launcher.c: |
duke@435 | 75 | @echo Generating $@ |
duke@435 | 76 | $(QUIETLY) { \ |
duke@435 | 77 | echo '#define debug launcher_debug'; \ |
duke@435 | 78 | echo '#include "java.c"'; \ |
duke@435 | 79 | echo '#include "java_md.c"'; \ |
duke@435 | 80 | } > $@ |
duke@435 | 81 | |
duke@435 | 82 | $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE) |
jcoomes@1902 | 83 | ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),) |
jcoomes@1902 | 84 | @echo Linking launcher... |
jcoomes@1902 | 85 | $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK) |
duke@435 | 86 | $(QUIETLY) \ |
jcoomes@1902 | 87 | $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER) |
jcoomes@1902 | 88 | $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK) |
jcoomes@1902 | 89 | [ -f $(LAUNCHER_G) ] || ln -s $@ $(LAUNCHER_G) |
jcoomes@1902 | 90 | endif # filter -sbfast -xsbfast |
jcoomes@1902 | 91 |