From patchwork Wed Nov 15 21:34:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10060331 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A837060231 for ; Wed, 15 Nov 2017 21:36:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9579C2A312 for ; Wed, 15 Nov 2017 21:36:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A8B92A31B; Wed, 15 Nov 2017 21:36:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1D1FB2A312 for ; Wed, 15 Nov 2017 21:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=CHdX/0EoDIRvYt1EXCDXKZzP6QbU4LkJrx4NErnNlEM=; b=IxG5G5oYXlWpiXQxhmz/AmZO8I jYW9cvc4Vf7FdQsWHtmlVSJ2o8221b8UyQxE0Zh0/CTLYCtkzNX8VXtefxqYnM+WIFuCu+APA30me gbW//6XDFMeXW18luwJK7SQ7ZSUczS1Y4FrwuKhFMtonsUCR3Vi/PHKCeVnrTjzUU0OHr0sTrK+l6 WDrzseyXa77qSgnb99mobhNUVR1WDcVaYaQ/Z2LSAYzxtnvBc0t3ghKHWqZl20eG+pUsPsBlsJbF+ 0TMpLIINOlQGkwv3uyD65+F7IUOHiEaA5ItZ+/64jotyzj4FqESViiOApekWmkqenpcwml3jSHUUT KP91VDoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eF5MP-0002DG-5c; Wed, 15 Nov 2017 21:36:41 +0000 Received: from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eF5Ku-00088y-PA for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2017 21:35:12 +0000 Received: by mail-io0-x241.google.com with SMTP id v21so3096888ioi.4 for ; Wed, 15 Nov 2017 13:34:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YGuKqsj4rKPdLruymqmAVvd/p3IbFE7bZeoAoc3jjYE=; b=LpCEDOiDaZW8QvFpcOsaGb98mZFfDqQtHPZ74MuNCTmjdVjtqwTGZQLQgShSUHsgRs 7wVM1I6TFgMDLDciw5juDWwV8AxBwYAeFHbR7C563EcvDczJ/Qyhpa1pmlBN2Kgd6Ksf fSBVfcJYzU2+BgSBl9usn1xCRUXm6w/GoUND1/Mmr8oJG0JXCM3jYZVVCfhqdFUZ57+t aai8u/KAPUt4zyqvHFkC4zZqTscxylC8IdtUddXeX6AXe39dr3AhxXhGdWkx1WUy8lUX HcMQRWU61hChFbIiXxZIlGEB174ltId5vyUhplsi9Y2EmT7Dm9nLfjzhfcYKpNbFZ5Sp E9Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YGuKqsj4rKPdLruymqmAVvd/p3IbFE7bZeoAoc3jjYE=; b=VqqVs/5yBwmrpeQb0COncevNUIQ/W4iwTfV+x4GVhp43OOdi30IFf6rBiiqE59O0JK F8LvpnvG/w4QasxYsCjIm7tr1rxrJLJdHeEZei057fbucvggI9C+UrOZRRUJV3A+RurK caF2mmQMzEXdexcTUg8cnmMd/bgt28xBVCvgGbHL0Bv148ogMzqvXrPsfhBlV2wWyoqt VHFabRjL3ZcmqAkrSfLgkoUou79Afwt0PYPAO+gHA00oJNnJ30i6ZNjQx0lHupssj8Gy p5dWVH5k0UTCCyCbFmNAoYDWovOz+d7fKBqTLD1tLkXgV5FHGk7NOEMTSr0lxxIBuLXy bGwA== X-Gm-Message-State: AJaThX5oOL2q5IwOT5BXv6IYGqDT9UIg+vUkQ2LIMBDrpnmL3owYhH01 hCOeA6TtVkIvHrest15dTSnzQQ== X-Google-Smtp-Source: AGs4zMYENusmGGK1deKVWWt96pVy1zKVr4dj+06DbjUTYqFKSz9+hyLIsUdfPup7LTFBw3v91SFw4g== X-Received: by 10.107.185.9 with SMTP id j9mr2823941iof.267.1510781687087; Wed, 15 Nov 2017 13:34:47 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id 68sm9735197iov.2.2017.11.15.13.34.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 13:34:45 -0800 (PST) From: Sami Tolvanen To: Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Nick Desaulniers , Yury Norov , Matthias Kaehlcke Subject: [PATCH v2 04/18] arm64: use -mno-implicit-float instead of -mgeneral-regs-only Date: Wed, 15 Nov 2017 13:34:14 -0800 Message-Id: <20171115213428.22559-5-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171115213428.22559-1-samitolvanen@google.com> References: <20171115213428.22559-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171115_133509_076198_359CA4D2 X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sami Tolvanen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Greg Hackmann LLVM bug 30792 causes clang's AArch64 backend to crash compiling arch/arm64/crypto/aes-ce-cipher.c. Replacing -mgeneral-regs-only with -mno-implicit-float is the suggested workaround. Signed-off-by: Greg Hackmann Cc: Matthias Kaehlcke [added cc-ifversion to enable the workaround only for clang <6.0] Signed-off-by: Sami Tolvanen --- arch/arm64/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index b35788c909f1..ecd5ed11c764 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -49,7 +49,13 @@ $(warning Detected assembler with broken .inst; disassembly will be unreliable) endif endif -KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) $(brokengasinst) +ifeq ($(cc-name),clang) +# This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=30792. +KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0600, -mno-implicit-float, -mgeneral-regs-only) +else +KBUILD_CFLAGS += -mgeneral-regs-only +endif +KBUILD_CFLAGS += $(lseinstr) $(brokengasinst) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads) KBUILD_AFLAGS += $(lseinstr) $(brokengasinst)