From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Ard Biesheuvel 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: [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: , X-List-Received-Date: Tue, 06 Sep 2016 14:27:40 -0000 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(-) 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); -- 2.7.4