From nobody Sun Apr 28 15:26:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1528350445700863.2106884590892; Wed, 6 Jun 2018 22:47:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9E38A21164F03; Wed, 6 Jun 2018 22:47:24 -0700 (PDT) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 33B842114AD1D for ; Wed, 6 Jun 2018 22:47:23 -0700 (PDT) Received: by mail-wm0-x22f.google.com with SMTP id r125-v6so16082988wmg.2 for ; Wed, 06 Jun 2018 22:47:23 -0700 (PDT) Received: from m1cha-NB.localdomain ([2a02:908:5a3:da80:7a8d:2699:26c0:ba14]) by smtp.gmail.com with ESMTPSA id e2-v6sm12032217wro.97.2018.06.06.22.47.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jun 2018 22:47:20 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::22f; helo=mail-wm0-x22f.google.com; envelope-from=sigmaepsilon92@gmail.com; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ItjAc85DxRitV3OzCM2YJsBB3p4fL9r0LHMCfst7Wok=; b=lmyjsC/tZoNoM/Ox2El5h/mJt6iLxoe4ypfUV8i6APC7a54+xezi/4vbctBEqpt9/j A9RJ+H3Qh7aJYEjPTB21Y8MMcq473YNlm3jR/VCRKLhAvJKi3ZgVCaM4RjcEQQGWajCG CQhlc/PUyRL1sn4FI5E4W3o/Ci0suBHefgg1I+lTH2vzIjVWBtHS17tVL2ScJgLWpN1E Fv9/ZvadoYIGhZojgNN5CH4Sbx5KaleuHz0xgX5c8uHGfcQdYcp216x0C0VpRfTiOfYc 1vifbTdwnVwMff7A+iWfZCV4oJfG01K84L6d7CJIOPAx3vnyKf2SgYi0+2GAWkYhshJN 3cyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ItjAc85DxRitV3OzCM2YJsBB3p4fL9r0LHMCfst7Wok=; b=tiNG6IQk2ctPLnyJYHPYVzadI01uG++SQqT3/bHg2JMT0NNdFUkamk5ibtTbVBY+bR whoxmxiBlqkxxIf3LG107gCR3x9mA3Y0QA+wG/4f3zY9N8IQ8BNysIJoFQaalbo+eIli tYee3PVdewSfpb93cZkTSmm9uF2zkXaRvJgPyPcFQA7SnT5uYJe4TYnzjGo6BT0Q2mc1 tsiUwsZgiQ2yqtWatedBtYUp1+6IiTDbzYUXPoy3k/pvK/1YiMehmnuXt3WI6QNkYkJU b4+KPW5Osdanx3tQLomV6CzLe5gBqqLlZBCIGP9VOPNEHfuLxznRQqAcCa9J5lJd1K3h Y/8w== X-Gm-Message-State: APt69E0jthslNuwc89GeL25a+2croTVxYgqpxBAqR9HpBGiBEnJ78/at lwOWZ4Ku5rmoPonPKRRTftQL0fkY X-Google-Smtp-Source: ADUXVKJl4hewLfJhoyk4rJQlanJHWmzWNix8CWy17aGAD0ui5b3Cod/zy/V2/Y+/pWOUIxd++chH+Q== X-Received: by 2002:a1c:4787:: with SMTP id m7-v6mr550129wmi.92.1528350441424; Wed, 06 Jun 2018 22:47:21 -0700 (PDT) From: Michael Zimmermann To: edk2-devel@lists.01.org Date: Thu, 7 Jun 2018 07:47:20 +0200 Message-Id: <20180607054720.15940-1-sigmaepsilon92@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [edk2] [PATCH] ArmPkg/CompilerIntrinsicsLib: fix GCC8 warning for __aeabi_memcpy aliases X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This was the warning(shown for __aeabi_memcpy, __aeabi_memcpy4 and __aeabi_= memcpy8): ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c:42:6: error: '__aeabi_memcpy8= ' alias between functions of incompatible types 'void(void *, const void *, size_t)' {aka 'void(void *, const void *, unsigned int)'} = and 'void *(void *, const void *, size_t)' {aka 'void *(void *, const void *, unsigned int)'} [-Werror=3Dattribute-alias] void __aeabi_memcpy8(void *dest, const void *src, size_t n); ^~~~~~~~~~~~~~~ ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c:19:7: note: aliased declarati= on here void *__memcpy(void *dest, const void *src, size_t n) The problem is the different return type(void vs void*). This commit adds a wrapper '__aeabi___memcpy' with a void return value. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Zimmermann --- ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c b/ArmPkg/Library= /CompilerIntrinsicsLib/memcpy.c index a944e00b89e1..507234186fa9 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c +++ b/ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c @@ -31,14 +31,19 @@ __attribute__((__alias__("__memcpy"))) void *memcpy(void *dest, const void *src, size_t n); =20 #ifdef __arm__ +static __attribute__((__used__)) +void __aeabi___memcpy(void *dest, const void *src, size_t n) +{ + __memcpy(dest, src, n); +} =20 -__attribute__((__alias__("__memcpy"))) +__attribute__((__alias__("__aeabi___memcpy"))) void __aeabi_memcpy(void *dest, const void *src, size_t n); =20 -__attribute__((__alias__("__memcpy"))) +__attribute__((__alias__("__aeabi___memcpy"))) void __aeabi_memcpy4(void *dest, const void *src, size_t n); =20 -__attribute__((__alias__("__memcpy"))) +__attribute__((__alias__("__aeabi___memcpy"))) void __aeabi_memcpy8(void *dest, const void *src, size_t n); =20 #endif --=20 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel