RFR (M): 8036767 PPC64: Support for little endian execution model

Andrew Hughes gnu.andrew at redhat.com
Thu Feb 19 15:51:37 UTC 2015


----- Original Message -----
> On Thu, Feb 19, 2015 at 9:32 AM, Erik Joelsson <erik.joelsson at oracle.com>
> wrote:
> > Hello,
> >
> > The differences to the 8u patch:
> >
> > * -DABI_ELFv2 is not added to CFLAGS.
> 
> I'm even not sure why we need this in 8. As far as I can see it is not
> used in the jdk sources.
> As far as I know we only use it in the hotspot sources, but for
> hotspot we already set it in make/linux/makefiles/ppc64.make
> 

It's in the 7 JDK build, which is currently:

ifeq ($(ARCH),ppc64)
  ifeq ($(OPENJDK_TARGET_CPU_ENDIAN),big)
    CFLAGS_REQUIRED_ppc64   += -m64 -D_BIG_ENDIAN
    LDFLAGS_COMMON_ppc64    += -m64 -L/lib64 -Wl,-melf64ppc
  else ifeq ($(OPENJDK_TARGET_CPU_ENDIAN),little)
    CFLAGS_REQUIRED_ppc64   += -D_LITTLE_ENDIAN -DABI_ELFv2
  else
    $(error Expected big/little for ARCH=ppc64, got OPENJDK_TARGET_CPU_ENDIAN=$(OPENJDK_TARGET_CPU_ENDIAN))
  endif
endif

in jdk/make/common/Defs-linux.gmk. My 7 patch simplifies it to:

CFLAGS_REQUIRED_ppc64   += -m64 -D_BIG_ENDIAN
LDFLAGS_COMMON_ppc64    += -m64 -L/lib64 -Wl,-melf64ppc
CFLAGS_REQUIRED_ppc64le += -D_LITTLE_ENDIAN -DABI_ELFv2

I was wondering why it wasn't used in 8 so far and assumed it might be an unintentional omission in 8.
But, if not, it should be removed from both to keep them in sync.

Is it possible that it is relevant to system headers rather than JDK code?

> > * Setting of INCLUDE_SA is not changed in jdk-options.m4. Is this because
> > it's already covered by other conditionals in jdk 9?
> >
> 
> That's because we now have the SA for ppc64 in jdk9. Tiago is
> currently working on a downport to jdk8u.
> 

Yeah, this was simply an extension of the if clause to make sure ppc64le was still
included. Previously, it would have been handled by the ppc64 test.

> > I do not know if this is significant, but would appreciate a comment on the
> > reasoning.
> >
> > /Erik
> >
> >
> > On 2015-02-19 05:22, David Holmes wrote:
> >>
> >> Now hosted at:
> >>
> >> http://cr.openjdk.java.net/~dholmes/ahughes-rh1191652-jdk9-webrev/
> >>
> >> David
> >>
> >> On 19/02/2015 1:35 PM, David Holmes wrote:
> >>>
> >>> Hi Tiago,
> >>>
> >>> Please email me the tar files and I will host it for you.
> >>>
> >>> Thanks,
> >>> David
> >>>
> >>> On 19/02/2015 1:02 PM, Tiago Sturmer Daitx wrote:
> >>>>
> >>>> On Wed, 2015-02-18 at 07:33 -0500, Andrew Hughes wrote:
> >>>>>
> >>>>> I now have these changes working on 8u31:
> >>>>>
> >>>>> http://cr.openjdk.java.net/~andrew/rh1191652/root
> >>>>> http://cr.openjdk.java.net/~andrew/rh1191652/jdk
> >>>>>
> >>>>> I can re-base these onto whichever OpenJDK 9 tree is appropriate and
> >>>>> push when
> >>>>> reviewed under the same bug as used for the HotSpot side.
> >>>>
> >>>>
> >>>> Concurrently to Andrew I also worked on a fix for JDK9 and came up with
> >>>> a somewhat different approach (based on jdk9/dev):
> >>>>
> >>>>
> >>>> http://tdaitx.github.com/openjdk-webrev/rh1191652-jdk9/webrev.00/hotspot/
> >>>> http://tdaitx.github.com/openjdk-webrev/rh1191652-jdk9/webrev.00/root
> >>>>
> >>>> To make it easy I already rebased Andrew's JDK8u31 patches to jdk9/dev
> >>>> (due to that the webrev ended up with my username).
> >>>>
> >>>>
> >>>> http://tdaitx.github.com/openjdk-webrev/rh1191652-jdk9/ahughes-webrev.00/hotspot/
> >>>>
> >>>>
> >>>> http://tdaitx.github.com/openjdk-webrev/rh1191652-jdk9/ahughes-webrev.00/jdk
> >>>>
> >>>>
> >>>> http://tdaitx.github.com/openjdk-webrev/rh1191652-jdk9/ahughes-webrev.00/root
> >>>>
> >>>>
> >>>> I tested both approaches by building Hadoop (which triggered some
> >>>> interesting bugs on various projects due to Jigsaw).
> >>>>
> >>>> Sorry for the github links, but I don't have an account at
> >>>> cr.openjdk.java.net that I can use. I can provide tar files if anyone is
> >>>> willing to host those webrevs.
> >>>>
> >>>> Regards,
> >>>> Tiago Daitx
> >>>>
> >
> 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222

PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




More information about the build-dev mailing list