From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by sourceware.org (Postfix) with ESMTPS id 0714B386480A for ; Fri, 18 Aug 2023 18:35:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0714B386480A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-1c26bb27feeso721705fac.0 for ; Fri, 18 Aug 2023 11:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692383751; x=1692988551; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=33B/spo9YjGcI3b94EIkgakDdosl00meWK0VMSdUYh0=; b=r19hKRhni4FpKmbloBExnUYdhulRpTG+lDj6zMH5dI6t5/u/5INkXKfXVxw9Paaf8G 4H4Fazw0UNMCcq2Yw0OyhIu/1dIyeDxLxOabNCIIAzsh9zVIK+TzMsnsKIvtwFRQaVzg ZvTYVXRXqS54mPyprqpRO8ejkPGgCVTDY0hQgZPpy2j4gDoytUJB1fFNQb+bqprGU59L gUN/E1Y2uTxH9KX/D+QgYwc/Yp3bSSM6ICK700erqMLEw1y8g31zsgxkbuh/WmAWIoVU Kbc8jRojoF6lNmAh/GU8/2vPH4TFkJVdyFKJOj9m8sPz03qIlspPQx6BMkdyHIvJPOom ZxkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692383751; x=1692988551; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=33B/spo9YjGcI3b94EIkgakDdosl00meWK0VMSdUYh0=; b=HOzAImMSuCOt2sfmmJHaakTnonFz3JhnCV/aE1yDK+orkieE0gMwBhJRjs8YU9YEhO DnJYhIbKD1dvIWlIeJRHqKtgjZqNTb03BNs2VEP5seKUCyp/A+UeXeg3BKsa7tLWCu3L QkDmOITFcb4Pv+VkzXU7K+lJ7I6gbuKkXvuUZEQGH6jeA5mqC5bDn7b3NgTq0WHiQlys HXWAqEMOcAt5sEr1obXOrxId0ezejjHXVi8+52h6OdNOs2zUMDeJTHkxUHoWGhwDfuBI AzaBVswawg9TyHDr0WIKbsOfERa2YPdDR18zVGYiTQEc5mvt82hWyMH+RqwPWEgK0kFZ UWCQ== X-Gm-Message-State: AOJu0YwKQtAKvtvSyzgBf8r7G7fODLJlvIwDJtSFX1RxhX8mkDDMV8Xs pCWcqN5vDMzLxM6V80GX+BDNwH6fn9dERWFH5Dw= X-Google-Smtp-Source: AGHT+IG4d8LAJ39cVq3p7grouXHVmnXSWucZa4AKC1mB9C09V0NajfVkEHzL+vBj67Bvmj9s2s0KjA== X-Received: by 2002:a05:6871:202:b0:1c0:1caf:3341 with SMTP id t2-20020a056871020200b001c01caf3341mr7930oad.30.1692383750705; Fri, 18 Aug 2023 11:35:50 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:c275:7563:d0a5:7f5d:1313]) by smtp.gmail.com with ESMTPSA id e3-20020a056870944300b001b0550b2affsm1301721oal.10.2023.08.18.11.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 11:35:50 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Andreas Schwab Subject: [PATCH] m68k: Fix build with -mcpu=68040 or higher (BZ 30740) Date: Fri, 18 Aug 2023 15:35:46 -0300 Message-Id: <20230818183546.2081067-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. --- sysdeps/m68k/m680x0/m68020/wordcopy.S | 1 - sysdeps/m68k/wordcopy.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) delete mode 100644 sysdeps/m68k/m680x0/m68020/wordcopy.S create mode 100644 sysdeps/m68k/wordcopy.c 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 -- 2.34.1