From patchwork Tue Sep 6 14:27:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75533 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp578348qgf; Tue, 6 Sep 2016 07:27:42 -0700 (PDT) X-Received: by 10.98.41.195 with SMTP id p186mr72164477pfp.81.1473172062414; Tue, 06 Sep 2016 07:27:42 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id al5si35660821pad.16.2016.09.06.07.27.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 07:27:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B8FC41A1E48; Tue, 6 Sep 2016 07:27:41 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (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 D0AC81A1E02 for ; Tue, 6 Sep 2016 07:27:39 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id w12so95605908wmf.0 for ; Tue, 06 Sep 2016 07:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=YDrAuvhrg44Zpvk1NcRfUwR2eb4X7dxtBVLttwRJOC0=; b=P50IwzTphc49e5cwLKE9vyxswDqjbYxUpDO3cP42Iou7ece7S+bbw9bYOEG/C0TqUa KyeTel/OcVu7Gslsn/1JWJ7xx1TWP8rOcld4wlBv85OASBj15dqc/ZokOXqX/nFiERDD Ke5HjrnnpuR5u7wXGXaYF85U4JDDtwns5wQC8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YDrAuvhrg44Zpvk1NcRfUwR2eb4X7dxtBVLttwRJOC0=; b=b+ebET9L5wpjeb/23d1I3TigRB0m+a6OpU5Mbucm2N2Wtv8oFWAaQKT4F1LWNcDxSA BCcixkPHsclborxBefWS77DRefSD1d4Mm0buhAO4QbPsJplwp8q/3SU+7GuLMU9M5tXb yM1FhrQ5K6ke8UWfls+dVNmFwb8LjZWJfOxPZNU0MwoFuBb/rBhLYtvcmY80h7TnXMbj q08tusdasXOMLCOLG1KARrWXsFR0KdIWR2BzqhRKXJvq0XBCE021V7IX8YJGJJxZ2nb6 yXWLV/iO4jTbP5MdPzmp9UhmNr3bVpIn9jOqsnzA1dM5arlaOIADXGRSUJEDobvBDw7y 4alg== X-Gm-Message-State: AE9vXwM7M/vTIkTPPrLXWYAWPsvEGrEIXHjCL20et8anKOOPW2VZFt1aTJgm9NspwjILY4Mt X-Received: by 10.28.46.134 with SMTP id u128mr21924016wmu.41.1473172058441; Tue, 06 Sep 2016 07:27:38 -0700 (PDT) Received: from localhost.localdomain ([197.130.133.164]) by smtp.gmail.com with ESMTPSA id gg10sm33745294wjd.4.2016.09.06.07.27.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Sep 2016 07:27:37 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Tue, 6 Sep 2016 15:27:31 +0100 Message-Id: <1473172051-25022-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [PATCH] ArmPkg/CompilerIntrinsicsLib: use Clang-compatible 'weak' attribute X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Clang does not like separate definitions for the __alias__ and the __weak__ attributes, so merge the definitions into one. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Note that the CI job is currently broken due to this clang issue. ArmPkg/Library/CompilerIntrinsicsLib/memset.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c index 0d837fcecf09..7271b4be6f96 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c +++ b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c @@ -26,20 +26,17 @@ void *__memset(void *s, int c, size_t n) return s; } -__attribute__((__alias__("__memset"))) -void *memset(void *dest, int c, size_t n); - -#ifdef __arm__ - // // Other modules (such as CryptoPkg/IntrinsicLib) may provide another // implementation of memset(), which may conflict with this one if this // object was pulled into the link due to the definitions below. So make // our memset() 'weak' to let the other implementation take precedence. // -__attribute__((__weak__)) +__attribute__((__weak__, __alias__("__memset"))) void *memset(void *dest, int c, size_t n); +#ifdef __arm__ + void __aeabi_memset(void *dest, size_t n, int c) { __memset(dest, c, n);