Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build improvement for OpenJDK 17/21 #1588

Open
dcasota opened this issue Jan 31, 2025 · 2 comments
Open

Build improvement for OpenJDK 17/21 #1588

dcasota opened this issue Jan 31, 2025 · 2 comments

Comments

@dcasota
Copy link
Contributor

dcasota commented Jan 31, 2025

Is your feature request related to a problem? Please describe.

The (classic) x86_64 make build process of OpenJDK 17 and 21 is more versatile by adding the switch --build=x86_64-unknown-linux-gnu. With this, the make build of OpenJDK17 and OpenJDK21 succeeds e.g. on wsl as well. For a rich Broadcom ecosystem, you are the engineers, could you integrate the change, please?

I tried to populate a pull request but in branches 3/4/5/master/dev are different versions which led me to the conclusion better asking first.

Describe the solution you'd like

This is the fix for make build in non-VVF environment

%ifarch aarch64
sh ./configur* \
    --with-target-bits=64 \
    --enable-headless-only \
    --with-extra-cxxflags="-Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse" \
    --with-extra-cflags="-fno-delete-null-pointer-checks -Wno-error -fno-lifetime-dse" \
    --with-freetype-include=%{_includedir}/freetype2 \
    --with-freetype-lib=%{_libdir} \
    --with-stdc++lib=dynamic \
    --disable-warnings-as-errors
%else
sh ./configur* \
    --with-target-bits=64 \
    --enable-headless-only \
    --with-extra-cxxflags="-Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse" \
    --with-extra-cflags="-fno-delete-null-pointer-checks -Wno-error -fno-lifetime-dse" \
    --with-freetype-include=%{_includedir}/freetype2 \
    --with-freetype-lib=%{_libdir} \
    --with-stdc++lib=dynamic \
    --build=x86_64-unknown-linux-gnu \
    --disable-warnings-as-errors
%endif

Describe alternatives you've considered

This has been tested for a successful make build.

cd photon

cp SPECS/openjdk/openjdk17.spec openjdk17.spec.tmp
sudo sed "s/--disable-warnings-as-errors/--disable-warnings-as-errors --build=x86_64-unknown-linux-gnu/" openjdk17.spec.tmp > SPECS/openjdk/openjdk17.spec
rm openjdk17.spec.tmp

cp SPECS/openjdk/openjdk21.spec openjdk21.spec.tmp
sudo sed "s/--disable-warnings-as-errors/--disable-warnings-as-errors --build=x86_64-unknown-linux-gnu/" openjdk21.spec.tmp > SPECS/openjdk/openjdk21.spec
rm openjdk21.spec.tmp

Additional context

No response

@YustasSwamp
Copy link
Contributor

Hi Daniel, good point! Please submit a PR with this change to have it under your authorship. Thanks

dcasota added a commit to dcasota/photon that referenced this issue Feb 9, 2025
dcasota added a commit to dcasota/photon that referenced this issue Feb 9, 2025
@dcasota
Copy link
Contributor Author

dcasota commented Feb 9, 2025

Hi @sshedi Shreenidhi, could you please review the developer drafts regarding policies, impact of 'if %aarch64' clause and more? Before filling merged pull requests, I need to know whether both developer pull requests 17/21 meet the expectations of the Photon OS team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants