Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 487812

Summary: dev-libs/gmp: x86-nopie-tests.patch is applied for ARCH=x86 and skipped when ABI=x86 (ARCH!=x86)
Product: Gentoo Linux Reporter: Greg Turner <gmturner007>
Component: [OLD] DevelopmentAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: gmturner007
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=236054
Whiteboard:
Package list:
Runtime testing required: ---

Description Greg Turner 2013-10-12 22:02:56 UTC
The recent multilib patch to dev-libs/gmp (http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/gmp/gmp-5.1.3-r1.ebuild?revision=1.1) creates a behavioral discrepancy between ARCH=x86 ABI=x86 and ARCH=amd64 ABI=x86.

Specifically, when we do a standard ARCH=x86 ABI=x86 (i.e.: no-multilib) compilation, the patch "${FILESDIR}"/${PN}-5.1.0-x86-nopie-tests.patch is applied in src_prepare (bug #236054 is cited as the reason).

However, when we do an ARCH=amd64 ABI=x86 build, the same patch is not applied.

Since the patch affects only the src_test phase I have done some experimenting to try and determine if this matters.  As far as I can tell, it doesn't.

During the process I uncovered some issues -- I would consider them bugs but it's debatable -- with USE="test pgo" (see #481306), however, I can't say for sure if those are related to multilib or something else.  Some of those issues are nondeterministic, which makes hypothesis testing difficult, and anyhow, I never tested ARCH=x86.

However, I see no evidence that gmp-5.1.0-x86-nopie-tests.patch has any positive or negative effect on those issues, nor any other effect at all on the testing outcomes for the combinations I bothered to test (only the "standard ones" I suppose: ARCH=amd64 ABI=amd64 and ARCH=amd64 ABI=x86)

Not sure if the above is entirely clear, so to clarify, let's pretend, for a moment, that the patch definitely does something useful.  Imagine it prevents a certain test failure with no diagnostic merit.

In that case, unless we have some reason to believe that the patch in question fixes a problem that is /only/ present in no-multilib profiles, then it should always be applicable to ABI=x86 builds.  However, we do not apply the patch when we build on ARCH=amd64 systems, even if the abi_x86_32 use-flag is active.  Therefore, the spurious test failure prevented by the patch would occur in this context.

From a less "hypothetical" standpoint: I don't see any evidence the patch has any value as of gmp-5.1 and I think maybe the best solution to the discrepancy is not to apply it ever.

, either the patch solves a problem for ABI=x86

Reproducible: Always
Comment 1 Greg Turner 2013-10-12 22:06:28 UTC
(In reply to Greg Turner from comment #0)
> , either the patch solves a problem for ABI=x86

sorry that is some kind of edit-cruft, ignore it.
Comment 2 SpanKY gentoo-dev 2013-12-24 08:27:11 UTC
should be all set now in the tree; thanks for the report!

Commit message: Drop use of -nopie and x86 tests as they pass now on x86/hardened systems
http://sources.gentoo.org/dev-libs/gmp/gmp-5.1.3-r1.ebuild?r1=1.6&r2=1.7