Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2394450imd; Fri, 2 Nov 2018 10:35:56 -0700 (PDT) X-Google-Smtp-Source: AJdET5dLSJWB7yOE0dG3loR26PLxWEnaT4VPIXOoGWZ1syullNRqJJ8TIMfgSwxirxhIisAyhklw X-Received: by 2002:a17:902:124:: with SMTP id 33-v6mr3052474plb.287.1541180156245; Fri, 02 Nov 2018 10:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541180156; cv=none; d=google.com; s=arc-20160816; b=KPSav64gT1GH/pnDuMwBB06YMEzTxZ5cAD4eWd4SJH53rIlzgm8csaooJrRS0MAdEU 7aZun4nHXJplszfYb43OMuFuXjLc304M2uotfvqaRtnU+Y+agRDIzEdnK6cJ46yWT6yk GDtQU+3DhPexbxMCPR/sxWg4DICt0R9y6LqdeKzp0YXQOJrFvLQOGQlUH2fcxlRzDzEd PRlMs5BRKZYjSCnaCZAD1f4cXSL06gXU9g1bfpKFo1HNKlPPA+MB+dQLn9C2oFm0BMN3 t/nzoYZjnaaLEeQb1oBjnNvXRJQ0LxpOFnLfQUBvwUA8qH3E8I68AlTdV4MP2VJTvqav 1WKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=W5cpov5BUBzUk05UG86XRpq/4qB8M3Cgo8tsQRLRHzI=; b=A6Rfl4Zl13h6q5oLZhg+GMuIwugUmRJCTHnmjRzHi8ccKy/DKVVAiIG7vg3dcdHrfT QBdOtzNwrYOCVJ0TGc9Q4Bq7QxnVEHyQ88DxtOr5UEis5e3V3yCHN0+ohoQMVGMILeCj 5+KFRjf1bPOwtZ87u5hTyeqP6dzKTzvSNpMBr0odIARpxsgsxNLejT5MorrSTTvn6y3U Ik6VBcXHTTexO/F6Ezq1wfZts8Yspes9COuyAn3mu5J/eGWv0N76csSFumBFumj2Xx9S mN6E62WG5LH+22XMYlu5LqThjIXydyZaKvnWNvEH/JPXdTxzlVLncWs/oZjkdUxNCtQK gySw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="B+V/DVKz"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5-v6si33406161pli.248.2018.11.02.10.35.41; Fri, 02 Nov 2018 10:35:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="B+V/DVKz"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728137AbeKCCmw (ORCPT + 99 others); Fri, 2 Nov 2018 22:42:52 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40817 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbeKCCmw (ORCPT ); Fri, 2 Nov 2018 22:42:52 -0400 Received: by mail-pf1-f194.google.com with SMTP id g21-v6so1334817pfi.7 for ; Fri, 02 Nov 2018 10:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W5cpov5BUBzUk05UG86XRpq/4qB8M3Cgo8tsQRLRHzI=; b=B+V/DVKzBFgI/iaBjPgFGYEahDPwrCF8G6iKlIXoDDyoEf5uFJGomwv2ycltuvSdXg ID3XjWRKO56PW4AoQudq+a1S+8a9LQ4Iv8+xCYjC5D8ELYEoOZpey/Rfm8MTzpKb2FwB dmJk1ih4+Xy89imU7rllOYbpG4pzhy1OEObE8tZdv/FLPNaDa4wGPAp3/FH/OihJrOI8 9lFGFjYbKC7qhOTE5Z516hpr+yb75N/ABON/wfxJnn39O//WTOzWJoS/2zmYduCVX1Oe j8w6SBH/y3TH7iesrdY9byi0G7aazEtjiIwes8MQbNVmSFacXnCcXcwZHLBXOFx71p2p MZBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W5cpov5BUBzUk05UG86XRpq/4qB8M3Cgo8tsQRLRHzI=; b=oe49jED09I2xJIbHmi2x8QHr2shLFRwWiNTGBDk5PFUG0CZMxvyIl/YSj54TwRoYpy f+/OQCPnRM8v4UOgoWotGBVmOy7hOjMGnIcqrPZOM0Bg6PrhJLW7QxUCQmLvjhfKJBq1 sJHqBLYqEsCLl6gyQDkAKZYByIMePVdWywgyUsfEbDUeBlLuh1rkogQYTOh7bqxXUfXz nI2fRNfSYWSRbXoROq2xXkm5en0oFouK9TRAuEh2ZAB7IDaiNhv14Jg+cDSO0falajGx gBfGHn7HR/SzmZdzgwhya2nJk9itYEJdegsRT8fsxmwtMrwj9vexxw772AjX39ig+cdR MyKA== X-Gm-Message-State: AGRZ1gJSfIuXsSis8gWgqsp1bz0V/Gd8e+14jMFmeUsbaapryBsUYsdX /pjC+nogfbRwj6q6pVlhMx/wNpZ9FU3L3oB0nRGCXw== X-Received: by 2002:a62:4b09:: with SMTP id y9-v6mr12626347pfa.93.1541180095479; Fri, 02 Nov 2018 10:34:55 -0700 (PDT) MIME-Version: 1.0 References: <20181102004455.10157-1-joel@jms.id.au> In-Reply-To: <20181102004455.10157-1-joel@jms.id.au> From: Nick Desaulniers Date: Fri, 2 Nov 2018 10:34:44 -0700 Message-ID: Subject: Re: [PATCH v2] raid6/ppc: Fix build for clang To: joel@jms.id.au Cc: mpe@ellerman.id.au, LKML , linuxppc-dev@lists.ozlabs.org, Arnd Bergmann , Kees Cook , jji@us.ibm.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 1, 2018 at 5:45 PM Joel Stanley wrote: > > We cannot build these files with clang as it does not allow altivec > instructions in assembly when -msoft-float is passed. > > Jinsong Ji wrote: > > We currently disable Altivec/VSX support when enabling soft-float. So > > any usage of vector builtins will break. > > > > Enable Altivec/VSX with soft-float may need quite some clean up work, so > > I guess this is currently a limitation. > > > > Removing -msoft-float will make it work (and we are lucky that no > > floating point instructions will be generated as well). > > This is a workaround until the issue is resolved in clang. > > Link: https://bugs.llvm.org/show_bug.cgi?id=31177 > Link: https://github.com/ClangBuiltLinux/linux/issues/239 > Signed-off-by: Joel Stanley > --- > v2: fix typo in comment, thanks Jinsong > > lib/raid6/Makefile | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile > index 2f8b61dfd9b0..7ed43eaa02ef 100644 > --- a/lib/raid6/Makefile > +++ b/lib/raid6/Makefile > @@ -18,6 +18,21 @@ quiet_cmd_unroll = UNROLL $@ > > ifeq ($(CONFIG_ALTIVEC),y) > altivec_flags := -maltivec $(call cc-option,-mabi=altivec) > + > +ifdef CONFIG_CC_IS_CLANG > +# clang ppc port does not yet support -maltivec when -msoft-float is > +# enabled. A future release of clang will resolve this > +# https://bugs.llvm.org/show_bug.cgi?id=31177 > +CFLAGS_REMOVE_altivec1.o += -msoft-float > +CFLAGS_REMOVE_altivec2.o += -msoft-float > +CFLAGS_REMOVE_altivec4.o += -msoft-float > +CFLAGS_REMOVE_altivec8.o += -msoft-float > +CFLAGS_REMOVE_altivec8.o += -msoft-float > +CFLAGS_REMOVE_vpermxor1.o += -msoft-float > +CFLAGS_REMOVE_vpermxor2.o += -msoft-float > +CFLAGS_REMOVE_vpermxor4.o += -msoft-float > +CFLAGS_REMOVE_vpermxor8.o += -msoft-float > +endif Hi Joel, thanks for this patch! My same thoughts about CONFIG_CC_IS_CLANG vs cc-option from https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-November/180939.html apply here as well. I don't feel strongly about either though. What are your thoughts? > endif > > # The GCC option -ffreestanding is required in order to compile code containing > -- > 2.19.1 > -- Thanks, ~Nick Desaulniers