Skip to content

Conversation

@xiangzhai
Copy link
Member

@xiangzhai xiangzhai commented Apr 28, 2024

Hi,

I'd like to backport this patch to jdk8u. common/autoconf/platform.m4 and hotspot/src/os/linux/vm/os_linux.cpp do not apply cleanly due to context difference, but it is easy to resolve them manually.

A native build on LoongArch hardware is tested.

Debian: https://mail.openjdk.org/pipermail/jdk8u-dev/2024-April/018378.html

$ ./build/images/j2sdk-image/bin/java -version
openjdk version "1.8.0_412"
OpenJDK Runtime Environment (build 1.8.0_412-8u412-ga-1-b08)
OpenJDK 64-Bit Zero VM (build 25.412-b08, interpreted mode)

Loongnix Desktop:

$ ./build/linux-loongarch64-normal-zero-release/images/j2sdk-image/bin/java -version
openjdk version "1.8.0_422-internal"
OpenJDK Runtime Environment (build 1.8.0_422-internal-zhaixiang_2024_04_28_10_57-b00)
OpenJDK 64-Bit Zero VM (build 25.422-b00, interpreted mode)

The risk of the downport is low.

Thanks,
Leslie Zhai


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • JDK-8315020 needs maintainer approval
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8315020: The macro definition for LoongArch64 zero build is not accurate. (Bug - P4 - Requested)

Reviewers

  • @mirabilos (no known openjdk.org user name / role)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/489/head:pull/489
$ git checkout pull/489

Update a local copy of the PR:
$ git checkout pull/489
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/489/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 489

View PR using the GUI difftool:
$ git pr show -t 489

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/489.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 28, 2024

👋 Welcome back lzhai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Apr 28, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title 8315020: The macro definition for LoongArch64 zero build is not accurate 8315020: The macro definition for LoongArch64 zero build is not accurate. Apr 28, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 28, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 28, 2024

Webrevs

@xiangzhai
Copy link
Member Author

Hi @theaoqi @gnu-andrew

Could you review and sponsor the patch please?

Thanks,
Leslie Zhai

@xiangzhai
Copy link
Member Author

/approval request allow Zero build on LoongArch

@openjdk
Copy link

openjdk bot commented Apr 28, 2024

@xiangzhai
8315020: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Apr 28, 2024
# ZERO_ARCHDEF is used to enable architecture-specific code
case "${OPENJDK_TARGET_CPU}" in
loongarch64) ZERO_ARCHDEF=LOONGARCH64 ;;
Copy link

@mirabilos mirabilos Apr 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary, line 390 already does that.

Copy link
Member Author

@xiangzhai xiangzhai Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the line 390 is for x86, isn't it? Please point out my fault!

Thanks,
Leslie Zhai

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other 390 ;-) 391 after the patch.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The *) case.

#elif (defined AARCH64)
static Elf32_Half running_arch_code=EM_AARCH64;
#elif (defined LOONGARCH)
#elif (defined LOONGARCH64)
Copy link

@mirabilos mirabilos Apr 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, this fixes the compile issue I reported.

@mlbridge
Copy link

mlbridge bot commented Apr 29, 2024

Mailing list message from Thorsten Glaser on jdk8u-dev:

On Sun, 28 Apr 2024, Leslie Zhai wrote:

There?s an unnecessary line in there, I noted that on the web thingy.

The failing s390x build is because this is still using
Debian 10 (buster), which has recently been archived.

Do an s!http://(httpredir|deb).debian.org!http://archive.debian.org!g
to fix that.

bye,
//mirabilos
--
Infrastrukturexperte ? Qvest Digital AG
Am Dickobskreuz 10, D-53121 Bonn ? https://www.qvest-digital.com/
Telephon +49 228 54881-393 ? Fax: +49 228 54881-235
HRB AG Bonn 18196 ? USt-ID (VAT): DE274355441
Vorstand: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
Vorsitzender Aufsichtsrat: Peter N?then

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 4, 2024

@xiangzhai This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title should be "Backport 725ec0ce1b463b21cd4c5287cf4ccbee53ec7349" so this is correctly recognised as a backport.

I agree with @mirabilos that the platform.m4 change is unneeded. That block is only needed where ZERO_ARCHDEF and OPENJDK_TARGET_CPU_LEGACY_LIB differ e.g. ppc vs. ppc32 or x86_64 vs. amd64. The ppc64 one is also unnecessary but I wouldn't change this at this juncture.

I'm also leaning towards thinking we should file this against https://github.com/openjdk/jdk8u to get it in as a fix for July rather than waiting for October. The risk to other architectures should be zero, while this makes the new platform build. Sorry for not getting to this earlier so it would go in before rampdown. Thoughts?

Did the original version build on some LoongArch64 platforms? I'm wondering how this got through the original testing.

@xiangzhai xiangzhai changed the title 8315020: The macro definition for LoongArch64 zero build is not accurate. Backport 725ec0ce1b463b21cd4c5287cf4ccbee53ec7349 Jun 13, 2024
@openjdk openjdk bot changed the title Backport 725ec0ce1b463b21cd4c5287cf4ccbee53ec7349 8315020: The macro definition for LoongArch64 zero build is not accurate. Jun 13, 2024
@openjdk
Copy link

openjdk bot commented Jun 13, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Jun 13, 2024
@xiangzhai
Copy link
Member Author

xiangzhai commented Jun 13, 2024

Hi @gnu-andrew

Could you review my patch again please?

Thanks,
Leslie Zhai

@gnu-andrew
Copy link
Member

Hi @gnu-andrew

Could you review my patch again please?

Thanks, Leslie Zhai

Updated patch looks fine, but can we please open this as a PR against https://github.com/openjdk/jdk8u ? We can then get this fixed in the July release, but we only have next week to do this. Thanks.

@xiangzhai
Copy link
Member Author

Hi @gnu-andrew
Could you review my patch again please?
Thanks, Leslie Zhai

Updated patch looks fine, but can we please open this as a PR against https://github.com/openjdk/jdk8u ? We can then get this fixed in the July release, but we only have next week to do this. Thanks.

Could you review the patch please? openjdk/jdk8u#56

Thanks,
Leslie Zhai

@jerboaa
Copy link
Contributor

jerboaa commented Jun 17, 2024

This one needs to close if it gets integrated with openjdk/jdk8u#56

@xiangzhai xiangzhai closed this Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval Requires approval; will be removed when approval is received backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

4 participants