• [gentoo-dev] [PATCH] toolchain.eclass: Fix strip exclusion for prefixed

    From James Le Cuirot@21:1/5 to All on Tue Dec 31 00:40:01 2024
    dostrip limitations mean that we cannot strip the CTARGET binaries in a cross-compiler. There is already a `dostrip -x` call to exclude such
    binaries from stripping, but it expects the argument to be unprefixed,
    and the argument given was prefixed.

    Signed-off-by: James Le Cuirot <chewi@gentoo.org>
    ---
    eclass/toolchain.eclass | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
    index 602f994371452..486b5877be66d 100644
    --- a/eclass/toolchain.eclass
    +++ b/eclass/toolchain.eclass
    @@ -2641,7 +2641,7 @@ toolchain_src_install() {
    # - "${D}${LIBPATH}"
    # As dostrip does not specify host to override ${CHOST} tools just skip
    # non-native binary stripping.
    - is_crosscompile && dostrip -x "${LIBPATH}"
    + is_crosscompile && dostrip -x "${LIBPATH#${EPREFIX}}"

    cd "${S}" || die
    if is_crosscompile; then
    --
    2.47.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ionen Wolkens@21:1/5 to James Le Cuirot on Tue Dec 31 03:40:01 2024
    On Mon, Dec 30, 2024 at 11:35:25PM +0000, James Le Cuirot wrote:
    dostrip limitations mean that we cannot strip the CTARGET binaries in a cross-compiler. There is already a `dostrip -x` call to exclude such
    binaries from stripping, but it expects the argument to be unprefixed,
    and the argument given was prefixed.

    Signed-off-by: James Le Cuirot <chewi@gentoo.org>
    ---
    eclass/toolchain.eclass | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
    index 602f994371452..486b5877be66d 100644
    --- a/eclass/toolchain.eclass
    +++ b/eclass/toolchain.eclass
    @@ -2641,7 +2641,7 @@ toolchain_src_install() {
    # - "${D}${LIBPATH}"
    # As dostrip does not specify host to override ${CHOST} tools just skip
    # non-native binary stripping.
    - is_crosscompile && dostrip -x "${LIBPATH}"
    + is_crosscompile && dostrip -x "${LIBPATH#${EPREFIX}}"

    Missing quotes in case of unlikely globs in EPREFIX

    "${LIBPATH#"${EPREFIX}"}"


    cd "${S}" || die
    if is_crosscompile; then
    --
    2.47.1



    --
    ionen

    -----BEGIN PGP SIGNATURE-----

    iQEzBAABCAAdFiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmdzV3kACgkQskQGsLCs QzRGEwf6AxgAdDKRcm4667SN7r4hVpGdZtx9X6jQypTupeQRAZAtPGJgFNVz8Tba OqrFAEOL3N1NjI8evy8cst/zcF1uWA1meIRVe/4A2sv7r0Qvkm6/TcCExIUqjgX1 NlESeRHwQ9DrN0k3/pSQIVU3rJ+EVRGl2b5UlpjV1PWKYzvzW8xsJKE4xW5XCKq0 HSbJdjJtgRv1dC8rENxtEIenaXmRNqdmFQhu6ebK+wYevrIB88dPfZ6aCC+Ibedn zDsQ2g/Csk6xcVdt8OROOKA1yMXfqSRiUPh9+EMibgM9/NbDp8GMP5io6i4oN7JI 5QP5ow/Mj7QDXWsYX4z6FB2Gt/cAUA==
    =bZgj
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Le Cuirot@21:1/5 to Ionen Wolkens on Tue Dec 31 11:10:01 2024
    On Mon, 2024-12-30 at 21:31 -0500, Ionen Wolkens wrote:
    On Mon, Dec 30, 2024 at 11:35:25PM +0000, James Le Cuirot wrote:
    dostrip limitations mean that we cannot strip the CTARGET binaries in a cross-compiler. There is already a `dostrip -x` call to exclude such binaries from stripping, but it expects the argument to be unprefixed,
    and the argument given was prefixed.

    Signed-off-by: James Le Cuirot <chewi@gentoo.org>
    ---
    eclass/toolchain.eclass | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
    index 602f994371452..486b5877be66d 100644
    --- a/eclass/toolchain.eclass
    +++ b/eclass/toolchain.eclass
    @@ -2641,7 +2641,7 @@ toolchain_src_install() {
    # - "${D}${LIBPATH}"
    # As dostrip does not specify host to override ${CHOST} tools just skip
    # non-native binary stripping.
    - is_crosscompile && dostrip -x "${LIBPATH}"
    + is_crosscompile && dostrip -x "${LIBPATH#${EPREFIX}}"

    Missing quotes in case of unlikely globs in EPREFIX

    "${LIBPATH#"${EPREFIX}"}"

    Ah yep, thanks. I always forget that weird rule.


    cd "${S}" || die
    if is_crosscompile; then
    --
    2.47.1


    -----BEGIN PGP SIGNATURE-----

    iQJFBAABCAAvFiEEPxcZ3tkwcedKm2a8EiZBXQDdMTcFAmdzwZYRHGNoZXdpQGdl bnRvby5vcmcACgkQEiZBXQDdMTfjzQ//b1XoqeEjgFqFWZpfONW3aD3JTVovGsAp o/p1/7RSzfMIunZkgSls5NJWwB+GB7+3V8ryhDAmpK6tVptQkBbiVV5/sWLa6Xiw FpKp7jpqHL5NR6yTRoHowU88Or4XMJZcD12qwpoBlbvao06/okOu9bzgW68dm0WQ 4deZl1IWJ9yji3p8vE/CxPQDv8lDqY7rLXw3v770gIBlcs7GeTEWRnY6TsQV8JNG MK/WUe9qTzK+T3Wao8wD+bMnPRKafT7QHa4ZnXupQ1bwrQ5UZFuBAvMbImJHaYwL 3Okdg9Hr4bUt4+0oY0OSco6kGXt5rDLv5FzeKv3/lV4TTeMu7ButKjipLpQODUZi /2kjaDm+NNxvoLcthGiLQSIh7u7f8Uzwq0Djd2KENLAvq2LKS7DLHIdLmeR8a1cw U1Q4VHsN275agSkWjgzK/VsxKUW3bkzX7P3TV4L1xioSjryVQUc5w0iDxzlIhzAy jZbXofJh3/OrtwWF/kGt3dw57wmeW40Cu2HI/l2NDnjE5q0o/m5mic2OXWfUZWfb k4Wpyd2AgmblCnRZ0sYM84Fb7ULE12MY5+0hCb4wmyq9zzth7RSqPyqcfnp3Ch9U hc5xKdCqCqfVtzM6mKoSXkDZux/EufWy7bGNi9Ed6uUng4fuZkq4x7bCP91pKOuL
    RY5/s8BfflI=
    =yqAi
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)