From patchwork Fri Nov 2 00:44:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 150000 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1453865ljp; Thu, 1 Nov 2018 17:45:13 -0700 (PDT) X-Google-Smtp-Source: AJdET5dcSofI+VeGwPc1cEP/y8weq95ZuYLaSaZIJksUWpL8DlRWNBeCPSJjz/R9cXQQLMijYJOb X-Received: by 2002:a62:c6c8:: with SMTP id x69-v6mr9818587pfk.37.1541119513712; Thu, 01 Nov 2018 17:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541119513; cv=none; d=google.com; s=arc-20160816; b=a/LpNOHzgYJnso44tERyg49+B1kKMDPSLaTybuG5IkLaR2y9vFmbl/mlrPlpPSF8O4 NPBoa1l3kRvXS29klHgR2zcTGO54NP2bqhkOVN/1DNaBCeGb3mm583ox9uf1IeoD5Ui5 R82w06g/QqBgJD9X4Uw6B12Z5pwcJTlMympb3v+BEL4CDQ3+qvGw4DiuYDqyBNzPPu4V Ez5sIpICBcMyVWx6FXgTKRxZi3SQ+t64Ep7lq6N0IVyRTPyxo99gjLTBATpZZJM8KVHm IdLGMoUXdZfVdOJcz2N70G6k/O4ZBgCGAMJHaFP5JKiZlo/b2ilGya803qQja979Xcyu 1nUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HIonunmopofPGzSNm75ie2dBu2DrhPo42aMJpvxj16s=; b=lk5zfQG0nOIKBLTGmmgf9jFE8KuB3Lqsx7HW0PyJitHOoHDyBBH6YCPNdTK/j/vSPr 2m3O7b81IadH8V1YBYPEUtc3TUV3HDuBMQfF650lkLjRlyU0dlIO42hnewqz0TIwkRHo DFRwOqCsKjceva4giH5q63YHqSRWyyxwWf5TZp6ilAYBp4efhe+T8+9hxv5Z6Vayi7jX SWXS0w2FUgvcMFYJl7yNXZci6BZc4SXeQcwB6mvovIodN1rfWUaSKo08BVLdkPxVOZIh xx/2Iezp0wADEzpEaS+DZg6jG3upFhAcqSWad4vr7ToI28ZAA7VQTsk8tFpQYC+0MiUy 3YYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WKsCC6US; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si14173348plu.228.2018.11.01.17.45.13; Thu, 01 Nov 2018 17:45:13 -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=fail header.i=@gmail.com header.s=20161025 header.b=WKsCC6US; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726413AbeKBJuX (ORCPT + 32 others); Fri, 2 Nov 2018 05:50:23 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:39803 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725969AbeKBJuX (ORCPT ); Fri, 2 Nov 2018 05:50:23 -0400 Received: by mail-pf1-f193.google.com with SMTP id n11-v6so165670pfb.6 for ; Thu, 01 Nov 2018 17:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HIonunmopofPGzSNm75ie2dBu2DrhPo42aMJpvxj16s=; b=WKsCC6USfGKBWf7sdRhHN+Ns+u3Qi32TVhckF5ZO7P/46ZbZOBigxEMdQQKLJPL+If RLmfgP2oPrqyib7TPKpSWDcTGx0c2xjbYUQC9p599wXUdy+GhNG67bKZv2bOp+/w6Pyl hNHmJluj5nx0is7boind93FL8tpe7hkyfaoqP2By9AVVoJtA9sUAtsI0VusJVckORxZe KR/VocN/LnSRTni4VQq30Ki6Lavr230lNBIVivTgksMdYullPVBZHEiiWSyeR/1lqJeK yNnCG2SzaTXAQ2vx38V1cTnMUj3DtTsaRrDQ02i5vd6RjlhTa5FSHhbUAT0Rkjvd1Y8J +oyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=HIonunmopofPGzSNm75ie2dBu2DrhPo42aMJpvxj16s=; b=OTl3NdXSQ70pRcuoT5sjW3H6pqHJ8p7+NaMxiKPkDYWfMI7PfP8ethmeHvTd+rYHlA RdZVZUOG1mLqk/ngYZsvirbkvLyb4UWsaMyWzzKdt+pmWTCsJkY2YQYCZWQk6lLA/1+j hC/oqrjCmFW0+waW9D6ZEGMYM8njbE5scN03YOe8S6z5tnKk6TkarMhc3GBVRYVVPFnu CB8g5ESGpafZzeTj+VD3f4Ft3n9yWMpAC3fw9u3tRtGt0ez1nTe0rK9P+0BYMNuIOALe UHXnBgW3Xw8d5ZzfjIvLoADyW3oj4PbIHxey5okgWw12Cdt9EKQKfMQ7SBNCV/6zs+FI U9Ew== X-Gm-Message-State: AGRZ1gJTFkubd4ZrLtCaopEE08jVI4R+hIDXdOp60Dm9mGpA79x+ByvR +N7R/fV1QP/8cF3BgTeiWxE= X-Received: by 2002:a62:e707:: with SMTP id s7-v6mr9865843pfh.124.1541119507975; Thu, 01 Nov 2018 17:45:07 -0700 (PDT) Received: from aurora.jms.id.au ([45.124.203.15]) by smtp.gmail.com with ESMTPSA id q7-v6sm26252401pgv.78.2018.11.01.17.45.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Nov 2018 17:45:07 -0700 (PDT) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Fri, 02 Nov 2018 11:15:00 +1030 From: Joel Stanley To: Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Jinsong Ji Subject: [PATCH v2] raid6/ppc: Fix build for clang Date: Fri, 2 Nov 2018 11:14:55 +1030 Message-Id: <20181102004455.10157-1-joel@jms.id.au> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.19.1 Reviewed-by: Nick Desaulniers 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 endif # The GCC option -ffreestanding is required in order to compile code containing