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

dev-util/patchelf: Add define for DT_MIPS_XHASH #30604

Closed
wants to merge 1 commit into from
Closed

dev-util/patchelf: Add define for DT_MIPS_XHASH #30604

wants to merge 1 commit into from

Conversation

LinuxUserGD
Copy link
Contributor

dev-util/patchelf: Add define for DT_MIPS_XHASH

For musl libc the bundled elf.h header file is replaced with DT_MIPS_XHASH define using regex
(alternative approach to https://bugs.gentoo.org/860888#c14 which patches the if branch directly).

Closes: https://bugs.gentoo.org/860888

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Apr 15, 2023
@LinuxUserGD LinuxUserGD changed the title dev-util/patchelf: Add define for DT_MIPS_XHASH [please reassign] dev-util/patchelf: Add define for DT_MIPS_XHASH Apr 15, 2023
@gentoo-bot gentoo-bot changed the title [please reassign] dev-util/patchelf: Add define for DT_MIPS_XHASH dev-util/patchelf: Add define for DT_MIPS_XHASH Apr 15, 2023
@gentoo-bot
Copy link

Pull Request assignment

Submitter: @LinuxUserGD
Areas affected: ebuilds
Packages affected: dev-util/patchelf

dev-util/patchelf: @chewi

Linked bugs

Bugs linked: 860888


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. and removed assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Apr 15, 2023
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-04-15 17:03 UTC
Newest commit scanned: 09e763a
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/c949a9eadc/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-04-15 17:13 UTC
Newest commit scanned: cffe896
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/d428bc4d37/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-04-24 18:28 UTC
Newest commit scanned: 785d31d
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/215562d8c0/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-04-24 18:48 UTC
Newest commit scanned: eb18c97
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/510e710629/output.html

@thesamesam thesamesam requested a review from chewi April 25, 2023 03:53
@chewi
Copy link
Member

chewi commented Apr 25, 2023

I'd much rather do this with a patch and eapply. That sed is quite awkward and could easily break.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-04-26 12:08 UTC
Newest commit scanned: 359ee59
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/caaebff0ab/output.html

@LinuxUserGD
Copy link
Contributor Author

I'd much rather do this with a patch and eapply. That sed is quite awkward and could easily break.

Ok, I've added the patch after rm command.
Also removed use elibc_musl so it could apply to different libc elf.h headers too (or should I keep the condition?).

@chewi
Copy link
Member

chewi commented Apr 26, 2023

Ah sorry, if you're not going to make it conditional then it should be applied with this instead:

PATCHES=(
	"${FILESDIR}"/${PN}-glibc-dt-mips-xhash.patch
)

src_prepare() {
	rm src/elf.h || die
	default
}

default is where it applies the patches, so it'll do that after the rm. I think making it unconditional is fine and we generally prefer that anyway.

I must admit I'm not keen on #include <../include/elf.h>. It feels like a huge hack. I would prefer #include_next <elf.h>. It's supported by at least GCC and Clang. Clang emits a warning about it, but I'm not sure why, and I think I still prefer it over the alternative.

Closes: https://bugs.gentoo.org/860888
Signed-off-by: LinuxUserGD <hugegameartgd@gmail.com>
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-04-26 22:23 UTC
Newest commit scanned: b3bc90b
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/22ba102295/output.html

@LinuxUserGD LinuxUserGD deleted the patchelf branch April 27, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR.
Projects
None yet
4 participants