Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7200065

Cross-compilation changes to support the new-build

XMLWordPrintable

    • b03
    • generic
    • generic

        The following build-infra changesets need to be applied to hotspot to get cross-compilation working:

        changeset: 3210:e78b8a52fe13
        user: ohrstrom
        date: Fri Mar 23 16:33:24 2012 +0100
        summary: Hotspot uses the names i386,i486,i586 and i686 in

        diff -r 1aea2a8b7628 -r e78b8a52fe13 make/linux/makefiles/defs.make
        --- a/make/linux/makefiles/defs.make
        +++ b/make/linux/makefiles/defs.make
        @@ -93,7 +93,7 @@
         endif

         # i686
        -ifeq ($(ARCH), i686)
        +ifneq (,$(findstring $(ARCH), i686 i586))
           ARCH_DATA_MODEL = 32
           PLATFORM = linux-i586
           VM_PLATFORM = linux_i486

        changeset: 3209:1aea2a8b7628
        user: ohrstrom
        date: Fri Mar 23 15:58:33 2012 +0100
        summary: Cross compilation support.

        diff -r e20c01dcf590 -r 1aea2a8b7628 make/linux/makefiles/defs.make
        --- a/make/linux/makefiles/defs.make
        +++ b/make/linux/makefiles/defs.make
        @@ -29,12 +29,14 @@
         SLASH_JAVA ?= /java

         # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
        -ARCH:=$(shell uname -m)
        -PATH_SEP = :
        -ifeq ($(LP64), 1)
        - ARCH_DATA_MODEL ?= 64
        -else
        - ARCH_DATA_MODEL ?= 32
        +ifndef ARCH
        + ARCH:=$(shell uname -m)
        + PATH_SEP = :
        + ifeq ($(LP64), 1)
        + ARCH_DATA_MODEL ?= 64
        + else
        + ARCH_DATA_MODEL ?= 32
        + endif
         endif

         # zero
        @@ -73,7 +75,7 @@
         endif

         # x86_64
        -ifeq ($(ARCH), x86_64)
        +ifneq (,$(findstring $(ARCH), amd64 x86_64))
           ifeq ($(ARCH_DATA_MODEL), 64)
             ARCH_DATA_MODEL = 64
             MAKE_ARGS += LP64=1
        @@ -237,5 +239,3 @@
         ADD_SA_BINARIES/zero =

         EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
        -
        -

        changeset: 3208:e20c01dcf590
        user: ohrstrom
        date: Fri Mar 23 14:10:22 2012 +0100
        summary: Actual support for cross compiling the hotspot repo.

        diff -r c0921b9959af -r e20c01dcf590 make/linux/makefiles/adlc.make
        --- a/make/linux/makefiles/adlc.make
        +++ b/make/linux/makefiles/adlc.make
        @@ -109,7 +109,7 @@

         $(EXEC) : $(OBJECTS)
                @echo Making adlc
        - $(QUIETLY) $(HOST.LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS)
        + $(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.LINK_NOPROF.CXX)) -o $(EXEC) $(OBJECTS)

         # Random dependencies:
         $(OBJECTS): opcodes.hpp classes.hpp adlc.hpp adlcVMDeps.hpp adlparse.hpp archDesc.hpp arena.hpp dict2.hpp filebuff.hpp form
        s.hpp formsopt.hpp formssel.hpp
        @@ -211,14 +211,14 @@
         $(OUTDIR)/%.o: %.cpp
                @echo Compiling $<
                $(QUIETLY) $(REMOVE_TARGET)
        - $(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
        + $(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.COMPILE.CXX)) -o $@ $< $(COMPILE_DONE)

         # Some object files are given a prefix, to disambiguate
         # them from objects of the same name built for the VM.
         $(OUTDIR)/adlc-%.o: %.cpp
                @echo Compiling $<
                $(QUIETLY) $(REMOVE_TARGET)
        - $(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
        + $(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.COMPILE.CXX)) -o $@ $< $(COMPILE_DONE)

         # #########################################################################

              dholmes David Holmes
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: