public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug build/30740] [m68k] undefined reference to `_wordcopy_fwd_dest_aligned'
Date: Thu, 10 Aug 2023 13:23:50 +0000	[thread overview]
Message-ID: <bug-30740-131-lrymEo8Qkj@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30740-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30740

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The issue is that we only test for m68020, which should use the optimized
macros from sysdeps/m68k/memcopy.h and not use the wordcopy.c routines. To fix
it should be as simple as:

diff --git a/sysdeps/m68k/m680x0/m68020/wordcopy.S
b/sysdeps/m68k/m680x0/m68020/wordcopy.S
deleted file mode 100644
index 4fb1a4518f..0000000000
--- a/sysdeps/m68k/m680x0/m68020/wordcopy.S
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty, not needed.  */
diff --git a/sysdeps/m68k/wordcopy.c b/sysdeps/m68k/wordcopy.c
new file mode 100644
index 0000000000..e459e0e403
--- /dev/null
+++ b/sysdeps/m68k/wordcopy.c
@@ -0,0 +1,21 @@
+/* Definitions for memory copy functions.  Motorola 68020 version.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#if !defined(__mc68020__) && !defined(mc68020)
+#include <string/wordcopy.c>
+#endif

However, since we do not actually build everything for anything different than
m68020; the math code assumes m68020 FLT_EVAL_METHOD (which is 2 since it uses
the external 68881 math processor).  And this is not correct fro m68040 which
now has a builtin FP processor and thus GCC uses a different  FLT_EVAL_METHOD
(0).

The FP issues should be simple to fix by removing
sysdeps/m68k/m680x0/bits/flt-eval-method.h and letting using the generic one,
but I don't have a way to actually test it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2023-08-10 13:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  4:59 [Bug build/30740] New: " wbx at openadk dot org
2023-08-10 13:23 ` adhemerval.zanella at linaro dot org [this message]
2023-08-10 16:11 ` [Bug build/30740] " wbx at openadk dot org
2023-08-10 16:28 ` adhemerval.zanella at linaro dot org
2023-08-10 16:30 ` adhemerval.zanella at linaro dot org
2023-08-11  1:26 ` wbx at openadk dot org
2023-08-11 14:16 ` adhemerval.zanella at linaro dot org
2023-08-11 14:27 ` wbx at openadk dot org
2023-08-15  5:57 ` wbx at openadk dot org
2023-08-15 18:48 ` adhemerval.zanella at linaro dot org
2023-08-16  7:17 ` wbx at openadk dot org
2023-08-16 12:18 ` adhemerval.zanella at linaro dot org
2023-08-17  6:18 ` wbx at openadk dot org
2023-08-17  6:26 ` wbx at openadk dot org
2023-08-18 14:30 ` adhemerval.zanella at linaro dot org
2023-08-24 20:27 ` chewi at gentoo dot org
2023-08-25  1:30 ` wbx at openadk dot org
2023-08-25 12:36 ` adhemerval.zanella at linaro dot org
2023-08-25 12:45 ` adhemerval.zanella at linaro dot org
2023-08-25 12:48 ` adhemerval.zanella at linaro dot org
2023-08-25 13:51 ` adhemerval.zanella at linaro dot org
2023-08-25 13:53 ` adhemerval.zanella at linaro dot org
2023-08-25 14:45 ` sam at gentoo dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30740-131-lrymEo8Qkj@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).