This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] powerpc64*: fix the order of implied sysdeps directories
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>, libc-alpha at sourceware dot org
- Cc:
- Date: Mon, 26 Feb 2018 17:47:18 -0300
- Subject: Re: [PATCH v2] powerpc64*: fix the order of implied sysdeps directories
- Authentication-results: sourceware.org; auth=none
- References: <20171227195904.20752-1-gabriel@inconstante.eti.br>
"Gabriel F. T. Gomes" <gabriel@inconstante.eti.br> writes:
> This patch, initially intended in preparation for the transition of the
> long double format on powerpc64le, is now sent again regardless of any
> relevance it might have for the transition, because the changes are
> useful for other purposes as pointed out in
> https://sourceware.org/ml/libc-alpha/2017-12/msg00177.html
>
> Changes since v1:
>
> - Rebased against current master and ran again with the same
> generating script from v1 [1].
> - Changed commit message.
>
> [1] https://sourceware.org/ml/libc-alpha/2017-12/msg00162.html
>
> -- 8< --
> The creation of the divergent sysdeps directory for powerpc64le
>
> commit 2f7f3cd8cd302bb10908c86f3f7b349df0a78e6a
> Author: Paul E. Murphy <murphyp@linux.vnet.ibm.com>
> Date: Fri Jul 15 18:04:40 2016 -0500
>
> powerpc64le: Create divergent sysdep directory for powerpc64le.
>
> allowed float128 to be enabled for powerpc64le (little-endian) and not
> for powerpc64 (big-endian). Since the only intended difference between
> them was the presence or absence of the float128 interface, the sysdeps
> directory for powerpc64le explicitly reused the files from powerpc64
> (through the use of Implies files).
>
> Although this works, it also means that files under the powerpc64
> directory might be preferred over files under powerpc64le. For
> instance, on a build for powerpc64le with target set to power9, a file
> from powerpc64/power5 might get built, even though a file with the same
> name exists in powerpc64le/power8. That happens because the processor
> hierarchy was only defined in the sysdeps directory for powerpc64 (and
> borrowed by powerpc64le).
>
> This patch fixes this behavior, by moving sysdeps/powerpc/powerpc64 to
> sysdeps/powerpc/powerpc64-common and creating new Implies files to
> provide the hierarchy of processors for powerpc64 and powerpc64le
> separately.
>
> Builds for powerpc64le still use sysdeps/powerpc/powerpc64le, which now
> implies sysdeps/powerpc/powerpc64-common. Likewise, builds for
> powerpc64 still use sysdeps/powerpc/powerpc64, which now has new Implies
> files to imply sysdeps/powerpc/powerpc64-common. The hierarchy of
> processors is now implemented separately for powerpc64 and powerpc64le
> (each in its own subdirectory). These changes have no effect on
> installed, stripped binaries (which remain unchanged).
>
> Tested that installed stripped binaries are unchanged and that there are
> no regressions on powerpc64 and powerpc64le.
The patch looks good to me in overall except for 2 issues:
1. The Implies are listing non-existing directories, e.g.
powerpc/powerpc64-common/power4/fpu.
I agree it would be nice to prepare for the existence of some directories,
but this causes a series of warnings when running configure.
2. It is not preserving the order of directories for powerpc64le. Current
master code prefers files in the following order:
fpu/multiarch
fpu
multiarch
In order to fix this, it's necessary to:
- sysdeps/powerpc/powerpc64le/power7/fpu/multiarch/Implies lists powerpc/powerpc64le/fpu/multiarch
- sysdeps/powerpc/powerpc64le/power7/multiarch/Implies lists powerpc/powerpc64le/multiarch
--
Tulio Magno