From patchwork Thu Nov 30 23:39:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10085795 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 35303602BC for ; Thu, 30 Nov 2017 23:40:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2798E2A16A for ; Thu, 30 Nov 2017 23:40:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C41B2A1A9; Thu, 30 Nov 2017 23:40:26 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C331B2A16A for ; Thu, 30 Nov 2017 23:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750898AbdK3Xj7 (ORCPT ); Thu, 30 Nov 2017 18:39:59 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:39621 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbdK3XjS (ORCPT ); Thu, 30 Nov 2017 18:39:18 -0500 Received: by mail-it0-f66.google.com with SMTP id 68so504400ite.4 for ; Thu, 30 Nov 2017 15:39:17 -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=T36s4U/v0YsWzEb6Bb6uSImAC2+Tk5vnDDCv7yyurEQ=; b=hCq4Jm7FRdZh5lco23/ER1acjAhGB4pRFU7uoKKoTf+Rz6915WQ94nElFUlMsR9RkF eoYLDaLZLNOWm+VFOtpq93uMs7vrUSpyMkxwYTCI+eMCtu3AMb4VoOWWFtvuuWAjKBNs g65RjUz0sRTyQwBLooCQcQYFtNT1WxsUILl110TBC/cJ6UfKT1IkhqjIOu4ttrUJTeA5 8X1i5yBQB6nYQ2tUNSXX0+KTdKzKTGS41OP+6FUH6e4F5kb+JdJe2fhHUUA8nBrd9miz WzRgXsCxhKB3hSFi1L14Kgr8IO81tqXqdL8rw06NtqzG4+U0oWozj3QTQlz5WzwDLQdF kqsw== 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=T36s4U/v0YsWzEb6Bb6uSImAC2+Tk5vnDDCv7yyurEQ=; b=uDzjpeQjlxRpzKs8PbW4Uz7r0OQrEdtUowFkX5SfBgoXiwXibKZDTdUemvnxgpwN90 mN/GF2+tAuy1BDE5ETsR4vcwpp75DA3aeTdbVtaVFA7wXaD6yFENf3d62XGH42J/DokI 6mwbfGzL4jWC040c3Kn9aYGgGXjFqBedJR/ceQg7UuPXpHPrJ2Dhgpm7Hm3UYDa4uAnw B5630Gozkl/3w+K1QpmdVvQE1QD4e2cwo9dUCERv0+/PriGREYBTyQCy63hwQymWdPnF VQMWwhWyvBnBy2WN8szncbJdKxlwgQu9B3tEgIaurZrye3Ke53vOMguuqlZ8EgglhjC6 QZ4w== X-Gm-Message-State: AJaThX7uZKAM7KusRUNZRBS5rUIW2wNA/LZ25qzHbYDr5JF0dviCsJvi akS3P5kX+zOl8cKpoaOY1xH1Gg== X-Google-Smtp-Source: AGs4zMaVRSsrdV5EGbboc7PzvdxMGcF+EyFvq1gbF0T8bIE5Lkm00N3KaS56lwu5PmkE5ppJNrHE9g== X-Received: by 10.36.73.210 with SMTP id e79mr5426295itd.78.1512085157030; Thu, 30 Nov 2017 15:39:17 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id h73sm2896676itb.21.2017.11.30.15.39.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Nov 2017 15:39:16 -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 , Nicholas Piggin Cc: Sami Tolvanen Subject: [PATCH v2 5/7] arm64: fix -m for GNU gold Date: Thu, 30 Nov 2017 15:39:03 -0800 Message-Id: <20171130233905.130602-6-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog In-Reply-To: <20171130233905.130602-1-samitolvanen@google.com> References: <20171129234442.655-1-samitolvanen@google.com> <20171130233905.130602-1-samitolvanen@google.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP GNU gold supports different emulations than bfd. Use aarch64_elf64_*_vec instead of aarch64linux. Signed-off-by: Sami Tolvanen Acked-by: Yury Norov --- arch/arm64/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index b35788c909f1..82a0df6e865e 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -64,14 +64,22 @@ KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__AARCH64EB__ AS += -EB LD += -EB +ifeq ($(ld-name),gold) +LDFLAGS += -maarch64_elf64_be_vec +else LDFLAGS += -maarch64linuxb +endif UTS_MACHINE := aarch64_be else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__AARCH64EL__ AS += -EL LD += -EL +ifeq ($(ld-name),gold) +LDFLAGS += -maarch64_elf64_le_vec +else LDFLAGS += -maarch64linux +endif UTS_MACHINE := aarch64 endif