]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc: Fix build of wcscpy with --disable-multi-arch
authorGabriel F. T. Gomes <gabriel@inconstante.eti.br>
Sat, 2 Mar 2019 19:57:13 +0000 (16:57 -0300)
committerGabriel F. T. Gomes <gabriel@inconstante.eti.br>
Tue, 5 Mar 2019 14:33:19 +0000 (11:33 -0300)
Since the commit

commit 81a14439417552324ec6ca71f65ddf8e7cdd51c7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Feb 5 17:35:12 2019 -0200

    wcsmbs: optimize wcscat

powerpc64 and powerpc64le builds fail when configured with
--disable-multi-arch and --with-cpu=power6 (or newer), due to an
undefined reference to __GI___wcscpy.  This patch fixes this on
sysdeps/powerpc/powerpc64/power6/wcscpy.c, which is only used when
multi-arch is disabled.

This patch does nothing for the failures on 32-bits powerpc builds,
because the file is under the powerpc64 subdirectory, however, powerpc
builds were already failing with --disable-multi-arch, with multiple
error messages, even before the aforementioned commit.

Tested for powerpc, powerpc64, and powerpc64le with multi-arch enabled
(all pass) and disabled (powerpc still fails as explained above).

ChangeLog
sysdeps/powerpc/powerpc64/power6/wcscpy.c

index 8e276dea86812cd18b2967dfb6402c13e2f40929..3a70b618ab9f8f806e8e0e564c425e063220610b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-03-05  Gabriel F. T. Gomes  <gabriel@inconstante.eti.br>
+
+       * sysdeps/powerpc/powerpc64/power6/wcscpy.c (WCSCPY): Define to
+       __wcscpy, then use libc_hidden_def and weak_alias to bind it to
+       __GI___wcscpy and wcscpy.
+
 2019-03-04  Florian Weimer  <fweimer@redhat.com>
 
        * sysdeps/generic/ldsodefs.h (_dl_sysdep_open_zero_fill): Remove
index 722c8f995b918866e5955633012cb83b0420bd84..59cfb28832abacdfa3761f6057c794581ccef15c 100644 (file)
@@ -1 +1,4 @@
+#define WCSCPY __wcscpy
 #include <sysdeps/powerpc/power6/wcscpy.c>
+libc_hidden_def (__wcscpy)
+weak_alias (__wcscpy, wcscpy)