From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 938181A1E3E for ; Tue, 6 Sep 2016 07:38:14 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id w12so96222610wmf.0 for ; Tue, 06 Sep 2016 07:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hscdKgh4aRN5sceXjC0dsf0ZgvZ9HsgoSYHDr6yA+H0=; b=eHr3RCpcCwQA0jCAhQgk/A13BXqFLdCzembaNFImiKccQPFmnA5zLanP0tbnxVrQU4 4CsBNqodhnyuZfzV1WB+QYnLv7mHxXpGzoYfrHAoIgjBDXiFlXVuEhMKmy+ly/t7PeqF a40i8JAo2Cf4kyyv3JM895bPKx6aPGHwNEKfw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hscdKgh4aRN5sceXjC0dsf0ZgvZ9HsgoSYHDr6yA+H0=; b=Tm+4JDMGmCx23m18slScnbcmohE+ytAseHDtyhZrPGst+MZZO1h4wbZM0gc79T9WH+ gHeMR4JahxqEF+3UvDQLUK57ZlKQAl1lSfSxqjTkI40UIpWIb/fFAbRKW5cxTwMD1pIo hDwGYVQ3aEDMeggzDhdugVAIjgJfmrKneolKhnAEZyVmzLt4mJy+dKSjQobWarDI2zVc 1ZZyPUDsBrcQOeT6r/szEiZrYNb/jyQAmGNAE6HHZnQtXJVjOiBs405jTCc9MQaH0rT0 rmLcbnnhSua8HyfviM7tpTu8gWIhXB/kYtcyYgTa+YZOQ7NTlwpZ0+R02Itm2OiDj3VO jBzg== X-Gm-Message-State: AE9vXwOSA+xZsshswtUNwlHsT2zVHr2UwWING2qp3U/zZJc1nhEPk0jvjFVDi5Yeoqp9ZeAU X-Received: by 10.194.140.131 with SMTP id rg3mr18420264wjb.180.1473172693106; Tue, 06 Sep 2016 07:38:13 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id u64sm20925057wmd.20.2016.09.06.07.38.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 07:38:12 -0700 (PDT) Date: Tue, 6 Sep 2016 15:38:10 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20160906143810.GD16080@bivouac.eciton.net> References: <1473172051-25022-1-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1473172051-25022-1-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [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:38:15 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 06, 2016 at 03:27:31PM +0100, Ard Biesheuvel wrote: > 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 Reviewed-by: Leif Lindholm > --- > > 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 >