8019922: PPC64 (part 8): Implement Linux/PPC64 support in HotSpot makefiles

Wed, 10 Jul 2013 09:14:25 -0700

author
simonis
date
Wed, 10 Jul 2013 09:14:25 -0700
changeset 6452
faf0c78e906b
parent 6451
0014add32e54
child 6453
75ef1a499665

8019922: PPC64 (part 8): Implement Linux/PPC64 support in HotSpot makefiles
Summary: HotSpot make changes to build the HotSpot on Linux/PPC64
Reviewed-by: dholmes, kvn

make/Makefile file | annotate | diff | comparison | revisions
make/defs.make file | annotate | diff | comparison | revisions
make/linux/makefiles/buildtree.make file | annotate | diff | comparison | revisions
make/linux/makefiles/defs.make file | annotate | diff | comparison | revisions
make/linux/makefiles/gcc.make file | annotate | diff | comparison | revisions
make/linux/makefiles/ppc64.make file | annotate | diff | comparison | revisions
make/linux/platform_ppc64 file | annotate | diff | comparison | revisions
     1.1 --- a/make/Makefile	Tue Jul 09 14:28:07 2013 +0200
     1.2 +++ b/make/Makefile	Wed Jul 10 09:14:25 2013 -0700
     1.3 @@ -177,7 +177,7 @@
     1.4  
     1.5  $(CORE_VM_TARGETS):
     1.6  	$(CD) $(GAMMADIR)/make; \
     1.7 -	$(MAKE) BUILD_DIR=$(CORE_DIR) BUILD_FLAVOR=$(@:$core=%) VM_TARGET=$@ generic_buildcore $(ALT_OUT)
     1.8 +	$(MAKE) BUILD_DIR=$(CORE_DIR) BUILD_FLAVOR=$(@:%core=%) VM_TARGET=$@ generic_buildcore $(ALT_OUT)
     1.9  
    1.10  $(ZERO_VM_TARGETS):
    1.11  	$(CD) $(GAMMADIR)/make; \
    1.12 @@ -478,22 +478,22 @@
    1.13  # Core
    1.14  ifeq ($(JVM_VARIANT_CORE), true)
    1.15  # Common
    1.16 -$(EXPORT_LIB_DIR)/%.jar:			$(CORE_DIR)/../generated/%.jar
    1.17 +$(EXPORT_LIB_DIR)/%.jar:			$(CORE_BUILD_DIR)/../generated/%.jar
    1.18  	$(install-file)
    1.19 -$(EXPORT_INCLUDE_DIR)/%:			$(CORE_DIR)/../generated/jvmtifiles/%
    1.20 +$(EXPORT_INCLUDE_DIR)/%:			$(CORE_BUILD_DIR)/../generated/jvmtifiles/%
    1.21  	$(install-file)
    1.22  # Unix
    1.23 -$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(CORE_DIR)/%.$(LIBRARY_SUFFIX)
    1.24 +$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX):	$(CORE_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
    1.25  	$(install-file)
    1.26 -$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo:	$(CORE_DIR)/%.debuginfo
    1.27 +$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo:		$(CORE_BUILD_DIR)/%.debuginfo
    1.28  	$(install-file)
    1.29 -$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz:		$(CORE_DIR)/%.diz
    1.30 +$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz:		$(CORE_BUILD_DIR)/%.diz
    1.31  	$(install-file)
    1.32 -$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX):      $(CORE_DIR)/%.$(LIBRARY_SUFFIX)
    1.33 +$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX):	$(CORE_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
    1.34  	$(install-file)
    1.35 -$(EXPORT_SERVER_DIR)/%.debuginfo:		$(CORE_DIR)/%.debuginfo
    1.36 +$(EXPORT_SERVER_DIR)/%.debuginfo:		$(CORE_BUILD_DIR)/%.debuginfo
    1.37  	$(install-file)
    1.38 -$(EXPORT_SERVER_DIR)/%.diz:			$(CORE_DIR)/%.diz
    1.39 +$(EXPORT_SERVER_DIR)/%.diz:			$(CORE_BUILD_DIR)/%.diz
    1.40  	$(install-file)
    1.41  endif
    1.42  
     2.1 --- a/make/defs.make	Tue Jul 09 14:28:07 2013 +0200
     2.2 +++ b/make/defs.make	Wed Jul 10 09:14:25 2013 -0700
     2.3 @@ -259,7 +259,7 @@
     2.4  
     2.5    # Use uname output for SRCARCH, but deal with platform differences. If ARCH
     2.6    # is not explicitly listed below, it is treated as x86.
     2.7 -  SRCARCH     = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc zero,$(ARCH)))
     2.8 +  SRCARCH     = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc ppc64 zero,$(ARCH)))
     2.9    ARCH/       = x86
    2.10    ARCH/sparc  = sparc
    2.11    ARCH/sparc64= sparc
    2.12 @@ -285,6 +285,11 @@
    2.13        BUILDARCH = sparcv9
    2.14      endif
    2.15    endif
    2.16 +  ifeq ($(BUILDARCH), ppc)
    2.17 +    ifdef LP64
    2.18 +      BUILDARCH = ppc64
    2.19 +    endif
    2.20 +  endif
    2.21  
    2.22    # LIBARCH is 1:1 mapping from BUILDARCH
    2.23    LIBARCH         = $(LIBARCH/$(BUILDARCH))
    2.24 @@ -293,12 +298,12 @@
    2.25    LIBARCH/sparc   = sparc
    2.26    LIBARCH/sparcv9 = sparcv9
    2.27    LIBARCH/ia64    = ia64
    2.28 -  LIBARCH/ppc64   = ppc
    2.29 +  LIBARCH/ppc64   = ppc64
    2.30    LIBARCH/ppc     = ppc
    2.31    LIBARCH/arm     = arm
    2.32    LIBARCH/zero    = $(ZERO_LIBARCH)
    2.33  
    2.34 -  LP64_ARCH = sparcv9 amd64 ia64 zero
    2.35 +  LP64_ARCH = sparcv9 amd64 ia64 ppc64 zero
    2.36  endif
    2.37  
    2.38  # Required make macro settings for all platforms
     3.1 --- a/make/linux/makefiles/buildtree.make	Tue Jul 09 14:28:07 2013 +0200
     3.2 +++ b/make/linux/makefiles/buildtree.make	Wed Jul 10 09:14:25 2013 -0700
     3.3 @@ -193,6 +193,7 @@
     3.4  DATA_MODE/sparc = 32
     3.5  DATA_MODE/sparcv9 = 64
     3.6  DATA_MODE/amd64 = 64
     3.7 +DATA_MODE/ppc64 = 64
     3.8  
     3.9  DATA_MODE = $(DATA_MODE/$(BUILDARCH))
    3.10  
     4.1 --- a/make/linux/makefiles/defs.make	Tue Jul 09 14:28:07 2013 +0200
     4.2 +++ b/make/linux/makefiles/defs.make	Wed Jul 10 09:14:25 2013 -0700
     4.3 @@ -120,6 +120,15 @@
     4.4    HS_ARCH          = ppc
     4.5  endif
     4.6  
     4.7 +# PPC64
     4.8 +ifeq ($(ARCH), ppc64)
     4.9 +  ARCH_DATA_MODEL  = 64
    4.10 +  MAKE_ARGS        += LP64=1
    4.11 +  PLATFORM         = linux-ppc64
    4.12 +  VM_PLATFORM      = linux_ppc64
    4.13 +  HS_ARCH          = ppc
    4.14 +endif
    4.15 +
    4.16  # On 32 bit linux we build server and client, on 64 bit just server.
    4.17  ifeq ($(JVM_VARIANTS),)
    4.18    ifeq ($(ARCH_DATA_MODEL), 32)
    4.19 @@ -255,7 +264,7 @@
    4.20  EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
    4.21  EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal
    4.22  
    4.23 -ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
    4.24 +ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK) $(JVM_VARIANT_CORE)), true)
    4.25    EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
    4.26    EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
    4.27    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
     5.1 --- a/make/linux/makefiles/gcc.make	Tue Jul 09 14:28:07 2013 +0200
     5.2 +++ b/make/linux/makefiles/gcc.make	Wed Jul 10 09:14:25 2013 -0700
     5.3 @@ -1,5 +1,5 @@
     5.4  #
     5.5 -# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
     5.6 +# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     5.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.8  #
     5.9  # This code is free software; you can redistribute it and/or modify it
    5.10 @@ -181,6 +181,7 @@
    5.11  ifndef E500V2
    5.12  ARCHFLAG/ppc     =  -mcpu=powerpc
    5.13  endif
    5.14 +ARCHFLAG/ppc64   =  -m64
    5.15  
    5.16  CFLAGS     += $(ARCHFLAG)
    5.17  AOUT_FLAGS += $(ARCHFLAG)
    5.18 @@ -346,6 +347,7 @@
    5.19    DEBUG_CFLAGS/amd64 = -g
    5.20    DEBUG_CFLAGS/arm   = -g
    5.21    DEBUG_CFLAGS/ppc   = -g
    5.22 +  DEBUG_CFLAGS/ppc64 = -g
    5.23    DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
    5.24    ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
    5.25        ifeq ($(USE_CLANG), true)
    5.26 @@ -361,6 +363,7 @@
    5.27      FASTDEBUG_CFLAGS/amd64 = -g
    5.28      FASTDEBUG_CFLAGS/arm   = -g
    5.29      FASTDEBUG_CFLAGS/ppc   = -g
    5.30 +    FASTDEBUG_CFLAGS/ppc64 = -g
    5.31      FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
    5.32      ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
    5.33        ifeq ($(USE_CLANG), true)
    5.34 @@ -375,6 +378,7 @@
    5.35      OPT_CFLAGS/amd64 = -g
    5.36      OPT_CFLAGS/arm   = -g
    5.37      OPT_CFLAGS/ppc   = -g
    5.38 +    OPT_CFLAGS/ppc64 = -g
    5.39      OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
    5.40      ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
    5.41        ifeq ($(USE_CLANG), true)
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/make/linux/makefiles/ppc64.make	Wed Jul 10 09:14:25 2013 -0700
     6.3 @@ -0,0 +1,39 @@
     6.4 +#
     6.5 +# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
     6.6 +# Copyright 2012, 2013 SAP AG. All rights reserved.
     6.7 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.8 +#
     6.9 +# This code is free software; you can redistribute it and/or modify it
    6.10 +# under the terms of the GNU General Public License version 2 only, as
    6.11 +# published by the Free Software Foundation.
    6.12 +#
    6.13 +# This code is distributed in the hope that it will be useful, but WITHOUT
    6.14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    6.15 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    6.16 +# version 2 for more details (a copy is included in the LICENSE file that
    6.17 +# accompanied this code).
    6.18 +#
    6.19 +# You should have received a copy of the GNU General Public License version
    6.20 +# 2 along with this work; if not, write to the Free Software Foundation,
    6.21 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    6.22 +#
    6.23 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    6.24 +# or visit www.oracle.com if you need additional information or have any
    6.25 +# questions.
    6.26 +#
    6.27 +#
    6.28 +
    6.29 +# make c code know it is on a 64 bit platform.
    6.30 +CFLAGS += -D_LP64=1
    6.31 +
    6.32 +# fixes `relocation truncated to fit' error for gcc 4.1.
    6.33 +CFLAGS += -mminimal-toc
    6.34 +
    6.35 +# finds use ppc64 instructions, but schedule for power5
    6.36 +CFLAGS += -mcpu=powerpc64 -mtune=power5 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
    6.37 +
    6.38 +# let linker find external 64 bit libs.
    6.39 +LFLAGS_VM += -L/lib64
    6.40 +
    6.41 +# specify lib format.
    6.42 +LFLAGS_VM +=  -Wl,-melf64ppc
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/make/linux/platform_ppc64	Wed Jul 10 09:14:25 2013 -0700
     7.3 @@ -0,0 +1,17 @@
     7.4 +os_family = linux
     7.5 +
     7.6 +arch = ppc
     7.7 +
     7.8 +arch_model = ppc_64
     7.9 +
    7.10 +os_arch = linux_ppc
    7.11 +
    7.12 +os_arch_model = linux_ppc_64
    7.13 +
    7.14 +lib_arch = ppc64
    7.15 +
    7.16 +compiler = gcc
    7.17 +
    7.18 +gnu_dis_arch = ppc64
    7.19 +
    7.20 +sysdefs = -DLINUX -D_GNU_SOURCE -DPPC64

mercurial