From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 4F7771A1EE9 for ; Wed, 7 Sep 2016 08:27:06 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id 1so39205764wmz.1 for ; Wed, 07 Sep 2016 08:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=KwmUhNP+yCvmgTRtlHDCjrkUiZ4aHa/lr4h24Xel12k=; b=Xx7114IrL/melVENKaF5+QPOA6OTZgcSsSVglnl0IzXRdDPDSxt0CulPyAQNmJIhFv J5sgGv0HrzuDR4j20dAEjKpDdtAmRKI1WJjSjKo/1On/SW26LooSM5U2a7bjaIYNpQ8a PEl2oTZpcl7HG3g1m60sxe4IL/GH3oisCNc+8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=KwmUhNP+yCvmgTRtlHDCjrkUiZ4aHa/lr4h24Xel12k=; b=KeZYB6IFNyJPCK7DXs8idFbtLUYSqAOVi7vj6Kj9EXk2j1h646Q4uWvB+YzDmCDVB3 QINHCWrXzWR1ddKGB5I1AICzEOht9d8plemTTpvILICrR0X3e673ynlEvNE2/AZKgzRS cdRR5YCdS6PRN+x1QCLd84NVcfh2woK5dJxqEv3NtviTqSmkVkVG52Tgan+7U0MPdFq+ rwvyETi33ZDXhvfydixyWq8Myck+UN1b2L+8/lKR5hObK4e2oulmJTcwxCXoTRqRgD+r unTmqqIl6i177z1g0d8zXHVU8p4PUVoc9TngJ45IvT6LnzfhM/BG/7ZSKV7IhiKo1RN5 NfMg== X-Gm-Message-State: AE9vXwONNpk3T9tPOGXiwANTza9VDbI+0bswhIE+zVRhrFdhvq671KEflMEUhfHHEYfSyD6M X-Received: by 10.28.94.18 with SMTP id s18mr4733857wmb.44.1473262024637; Wed, 07 Sep 2016 08:27:04 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id vh6sm39375994wjb.0.2016.09.07.08.27.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 08:27:03 -0700 (PDT) Date: Wed, 7 Sep 2016 16:27:01 +0100 From: Leif Lindholm To: edk2-devel@lists.01.org Message-ID: <20160907152701.GG16080@bivouac.eciton.net> MIME-Version: 1.0 User-Agent: Mutt/1.5.23 (2014-03-12) Subject: CLANG cross-compilation issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2016 15:27:06 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, This is a report for the archive, rather than anything easily fixable. While testing one of Ard's sets against CLANG, I tripped over a behaviour exposed by commit a1b8baccc30b (BaseTools GCC: use 'gcc' as the linker command for GCC44 and later). This commit changes the CLANG profiles to invoke the linker via the 'clang' command, rather than as previously directly calling ld (with appropriate cross toolchain prefix where needed). Turns out clang, at least the one packaged in Debian 'Jessie', does not scan the PATH when looking for cross-variants of GNU ld, but rather goes and looks for it in some commonly used locations. Failing to find any, it then falls back to the system-provided ld. The symptom is a failed link step with the message: /usr/bin/ld: unrecognised emulation mode: aarch64linux As a workaround, I was able to get my build functional again by creating a symbolic link /usr/bin/aarch64-linux-gnueabi-ld pointing at the actual location of my cross-ld. / Leif