From patchwork Thu Dec 20 11:03:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 154328 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6016695ljp; Thu, 20 Dec 2018 03:03:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/VFYlnyBVl6BIWvqTC47QwPCcZwgpu00tqrS4VNFx9KetUh+013pG440QhhZs6KXonHH7jU X-Received: by 2002:a62:cd1:: with SMTP id 78mr8760677pfm.219.1545303821804; Thu, 20 Dec 2018 03:03:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545303821; cv=none; d=google.com; s=arc-20160816; b=bcQ6QUm1RqaH4CbBWsDtkCL3MXzrA225vc6cY6dQuENI5hwaVKjkcIEdqGXBk0We0+ Bn61pdgQEjvIP8jnaOpGdkiZbIUOoeh/ds0EPj0hU9gz4i9XHvMbhRkYF6cBhZ6hm/OO xze+f6mRACcGaI2YdXbykUbGfP6JgzLZHuxJ+CR+T9m5FlOmoa/8ZOPlkYORabpduOeY 4QUlKM/M5umSYg2b/Ku3RT2SUfRduRqBS54OEcL79fX1qX8+WH5IvWNr7cHdhHFW7NuG oQFn6C2Ol+G5XNVtEEW52M2vjqZsaPPcZZfyn1s6hoMES2kSh1G3JBD/6WWcSJ4FFdll +wbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=gohDMQUcuGt8lu/cGA6CNm1/9wFMEi1GU0WAlwz5Pe4=; b=QtEJdd7e8KKS09gXWLJxg9n/6SJM7mYGvQKkscLVgi85zn3+hZr8/oquMjzXdWe7Ps C9nv4Is3Q80Zz3sUPIcgPWGwNVw9ppopOcwGJdoffJuuXiHrxmAjS6lFYSOz203dBN3B sjn6s1oSLDn01qriGYBss2cZX0tELIv4Pq7NxcH4FneSIRyKwWqqBaiZ/9f94EGLCWFB lXaVhYbvKFsuGOiSdRc37AoESkELKfQ0TBSCkeKnpkZ/B9Ckd3u37HSsxW7oyM61fqV3 lE24FiSPBDeQBYBzsWYiaQ1IA1mH6WvQAq2ablgq6hQNT7QSRvZ7Z3UKK5dmTZqMDqai 43GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=E0w3THq5; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id a17si5406005pfn.213.2018.12.20.03.03.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 03:03:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=E0w3THq5; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 785C4211A4585; Thu, 20 Dec 2018 03:03:40 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::344; helo=mail-wm1-x344.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 C1EA7211A2D83 for ; Thu, 20 Dec 2018 03:03:38 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id b11so1527488wmj.1 for ; Thu, 20 Dec 2018 03:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aR9ZwRcEFKbOP97xtO7AYFJeoxj4Rra7S1CC9FnebcE=; b=E0w3THq5v00lp2jOgNa5YwinnbyS0E1oPFiojN6gMQPJK/mpidAzY7yN56yfu4eG40 aFa8gDkSpbyOHoZX/2lp89MDzxsUp9wkm0JtJ/f69oY0+wwd9e8zUBOJMJ9ck3SRSXqn mCFiIg6VQjdr5ssADI0aOQPAGbHNVehd4qtVo= 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:mime-version :content-transfer-encoding; bh=aR9ZwRcEFKbOP97xtO7AYFJeoxj4Rra7S1CC9FnebcE=; b=aCL7E5pkrgjGWdGNyk8WSzVQE+7lBFaJQdZECMZL5TFDUfSmYsESEJKgAiwcqKZaqN RaC7YylIqpu7EMYI4yc5mFe1ZkpsWox+SpNNl0TQXfkHKZwfbvK2gsDRQkgLHr5gqqfD KNsSm1lqkjM5t7+A9+26Vad8poXdDh6HuH42vWfgxatRgyeLun7/iG7j9Q5re/M/k3+U +FzImZKS95m8wJPhwGSuEfhsOiRItBYKMFHD33mboK7f6O8J7NVHbu9HSy/Lqe4XGHdN asBpnitAFpz/s9kt3v+glQMmncC6PrQs5tWawmoW/sDzd8U/qimqpqqXm9akvOUjYMm0 nc2g== X-Gm-Message-State: AA+aEWb5RU7/96zQ5ToP1QJXoRslm2omixYjQu3ZVTjEkmpLcuZY/FaH tMffKgZNlHgW4zjcDRaBB6uKTt4p5FZqsw== X-Received: by 2002:a1c:9c0a:: with SMTP id f10mr11190624wme.73.1545303816457; Thu, 20 Dec 2018 03:03:36 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:e5c9:6e00:25cb:e32e]) by smtp.gmail.com with ESMTPSA id m21sm5556876wmi.43.2018.12.20.03.03.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 03:03:35 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 20 Dec 2018 12:03:32 +0100 Message-Id: <20181220110332.30145-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [edk2] [PATCH v2] BaseTools/tools_def ARM: use softfloat target for CLANG3x X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: liming.gao@intel.com Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The 'arm-linux-gnueabihf' target triplet we use for CLANG35 and CLANG38 specifies a hardfloat target, and so the binaries that are emitted are annotated as using VFP registers for passing floating point arguments, even though no VFP is used anywhere in the code. This works fine as long as we don't try to link against code that uses software floating point, but combining object files with different floating point calling conventions is not permitted. So switch to the softfloat arm-linux-gnueabi triplet instead. This affects both the name Clang uses when invoking the linker, and the arguments it passes to it, and we are mostly interested in the latter (since any version of GNU ld.bfd will do the right thing as long as it targets EABI ARM) For native builds, this change has no effect, since the unprefixed system linker will take priority, and so Clang will pass the right arguments to whichever linker happens to be the system linker. For cross builds, the fact that Clang composes the name of the linker by prefixing '-ld' with the target triplet implies that users will have to switch to a version of binutils that targets arm-linux-gnueabi rather than arm-linux-gnueabihf. Note that the GCCx toolchain targets can use either when building for ARM so this does not create a need to install two versions of the ARM cross toolchain. Also, note that all ARM toolchains in the GCC family are already documented as requiring a toolchain that targets arm-linux-gnueabi and not arm-linux-gnueabihf. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- v2: improve commit log BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.19.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 902680c24c85..f7eb87af14c2 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -5231,7 +5231,7 @@ RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 *_CLANG35_*_DLINK_PATH = ENV(CLANG35_BIN)clang *_CLANG35_*_ASLDLINK_PATH = ENV(CLANG35_BIN)clang -DEFINE CLANG35_ARM_TARGET = -target arm-linux-gnueabihf +DEFINE CLANG35_ARM_TARGET = -target arm-linux-gnueabi DEFINE CLANG35_AARCH64_TARGET = -target aarch64-linux-gnu DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unknown-warning-option @@ -5384,7 +5384,7 @@ NOOPT_CLANG38_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS) -O0 ################## # CLANG38 ARM definitions ################## -DEFINE CLANG38_ARM_TARGET = -target arm-linux-gnueabihf +DEFINE CLANG38_ARM_TARGET = -target arm-linux-gnueabi DEFINE CLANG38_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS) DEF(CLANG38_ARM_TARGET) DEF(CLANG38_WARNING_OVERRIDES) -mno-movt DEFINE CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_TARGET) DEF(GCC_ARM_DLINK_FLAGS)