From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id DF1233858C62; Fri, 25 Aug 2023 13:52:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF1233858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692971559; bh=0ogInZZgO/2Ek8zOZl6DNDJI0MAC0ppDQGCiU3732Ks=; h=From:To:Subject:Date:From; b=v1vw0yGxD+o4FlBnC54Xi7ZCGR4nAGQwu0+swu4Uw4A1/RhzDaQC0DrTK30Wvjx/R gkkZHlKC/yLfYgx001TaWFe1l3lm6ZA4ran9Ju68gTh4mVf97gX8uAEwV7nRm232ev VVWocjQGdb3Fa7JF0bmtSNWaoxDKZl2T10q6fEgE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] m68k: Fix build with -mcpu=68040 or higher (BZ 30740) X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: 3d9265467e67d4c0fafa28a2179b152ad2423099 X-Git-Newrev: b85880633f69b737050c22eede858f8c13bb2248 Message-Id: <20230825135239.DF1233858C62@sourceware.org> Date: Fri, 25 Aug 2023 13:52:39 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b85880633f69b737050c22eede858f8c13bb2248 commit b85880633f69b737050c22eede858f8c13bb2248 Author: Adhemerval Zanella Date: Fri Aug 18 14:59:51 2023 -0300 m68k: Fix build with -mcpu=68040 or higher (BZ 30740) GCC currently does not define __mc68020__ for -mcpu=68040 or higher, which memcpy/memmove assumptions. Since this memory copy optimization seems only intended for m68020, disable for other m680X0 variants. Checked on a build for m68k-linux-gnu target mc68020 and mc68040. Diff: --- sysdeps/m68k/m680x0/m68020/wordcopy.S | 1 - sysdeps/m68k/wordcopy.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) 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..f12d5b7803 --- /dev/null +++ b/sysdeps/m68k/wordcopy.c @@ -0,0 +1,21 @@ +/* Definitions for memory copy functions. Motorola 680X0 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 + . */ + +#ifndef __mc68020__ +# include +#endif