Your message dated Sun, 31 Mar 2013 12:32:44 +0000
with message-id <e1umhre-0004yc...@franck.debian.org>
and subject line Bug#704111: fixed in clang 1:3.0-6.2
has caused the Debian Bug report #704111,
regarding clang fails to correctly implement hard float ABI during default
compiles due to rediculously low default CPU setting.
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
704111: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704111
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: clang
Version: 1:3.0-6.1
Severity: grave
x-debbugs-cc: debian-...@lists.debian.org; cfe-...@cs.uiuc.edu
(note for non-debian people reading this, the version of clang in debian
wheezy is a 3.0 based version which already has patches to make it
invoke the linker with appropriate arguments. The llvm version also
appears to be 3.0 again somewhat patched by debian)
I recently discovered that the version of clang in debian wheezy and
raspbian wheezy does not work correctly on either debian armhf or
raspbian. It seems the problem is that clang can't work out what CPU
type it should be using and defaults to something very low (specifically
arm7tdmi). With this CPU selected clang silently fails to properly use
the hard float ABI and as such any armhf code it generates is broken and
won't call floating point routines correctly. It also causes an
assertion failure in the bfd linker (but links successfully with the
gold linker). Setting the CPU type to something sensible makes it
implement the hard float ABI correctly and also stops the assertion
failure in the bfd linker.
I have managed to figure out how to patch clang to change the default
CPU for armhf (patch attatched). However i'm not sure what it is best to
set it to for debian armhf*. In particular this block of code from just
below where my patch is applied seems to map all armv7 variants to a CPU
type of "coretex-a8".
return llvm::StringSwitch<const char
*>(MArch)
.Cases("armv2",
"armv2a","arm2")
.Case("armv3",
"arm6")
.Case("armv3m",
"arm7m")
.Cases("armv4", "armv4t",
"arm7tdmi")
.Cases("armv5", "armv5t",
"arm10tdmi")
.Cases("armv5e", "armv5te",
"arm1026ejs")
.Case("armv5tej",
"arm926ej-s")
.Cases("armv6", "armv6k",
"arm1136jf-s")
.Case("armv6j",
"arm1136j-s")
.Cases("armv6z", "armv6zk",
"arm1176jzf-s")
.Case("armv6t2",
"arm1156t2-s")
.Cases("armv7", "armv7a", "armv7-a",
"cortex-a8")
.Cases("armv7r", "armv7-r",
"cortex-r4")
.Cases("armv7m", "armv7-m",
"cortex-m3")
.Case("ep9312",
"ep9312")
.Case("iwmmxt",
"iwmmxt")
.Case("xscale",
"xscale")
.Cases("armv6m", "armv6-m",
"cortex-m0")
// If all else failed, return the most base CPU LLVM
supports.
.Default("arm7tdmi");
Now it is my understanding that "traditional cortex a8" includes CPU
features not required by debian armhf. Specifically neon and the extra
vfp registers. The questions I have are
1: What does the "coretex-a8" CPU setting imply for clang/llvm? in
particular does it imply neon and the extra vfp registers?
2: If noone can provide an answer to the above question then taking into
the account how late we are in the freeze should we play it safe and
specify a lower (armv6) CPU version to make sure that neon and the extra
vfp registers don't get accidently used. I personally think that the
answer is yes but I'm open to arguments.
If I get no response to this within about a weak I intend to attach a
nmu diff containing a version of the patch that sets the default set to
armv6. Then file a pre-approval request with the release team. Finally
if the release team approves and noone objects I intend to upload the NMU.
Description: Fix CPU type default for armhf
Without this patch clang defaults to a CPU type of "arm7tdmi" which
does not work correctly with -mfloat-abi=hard leading to broken
code.
Author: Peter Michael Green <plugw...@debian.org>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>
Index: clang-3.0/tools/clang/lib/Driver/Tools.cpp
===================================================================
--- clang-3.0.orig/tools/clang/lib/Driver/Tools.cpp 2013-03-27 19:50:18.000000000 +0000
+++ clang-3.0/tools/clang/lib/Driver/Tools.cpp 2013-03-27 19:53:28.000000000 +0000
@@ -442,6 +442,9 @@
if (Arg *A = Args.getLastArg(options::OPT_march_EQ)) {
// Otherwise, if we have -march= choose the base CPU for that arch.
MArch = A->getValue(Args);
+ } else if (Triple.getEnvironment() == llvm::Triple::GNUEABIHF) {
+ // Use armv7-a for armhf
+ MArch = "armv7-a";
} else {
// Otherwise, use the Arch from the triple.
MArch = Triple.getArchName();
--- End Message ---
--- Begin Message ---
Source: clang
Source-Version: 1:3.0-6.2
We believe that the bug you reported is fixed in the latest version of
clang, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 704...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Peter Michael Green <plugw...@debian.org> (supplier of updated clang package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Thu, 28 Mar 2013 09:02:01 +0000
Source: clang
Binary: clang libclang1 libclang-dev libclang-common-dev
Architecture: source amd64
Version: 1:3.0-6.2
Distribution: unstable
Urgency: low
Maintainer: LLVM Packaging Team <pkg-llvm-t...@lists.alioth.debian.org>
Changed-By: Peter Michael Green <plugw...@debian.org>
Description:
clang - Low-Level Virtual Machine (LLVM), C language family frontend
libclang-common-dev - clang library - Common development package
libclang-dev - clang library - Development package
libclang1 - clang library
Closes: 704111
Changes:
clang (1:3.0-6.2) unstable; urgency=low
.
* Non-maintainer upload with maintainer's approval.
* 29-set-default-cpu-for-armhf.diff increase default cpu for armhf builds.
Previous absurdly low default did not work correctly with
-mfloat-abi=hard leading to broken code. (Closes: #704111)
+ Use armv6 as new default because in clang 3.0 armv7 implies features that
we don't require in debian armhf (extra fpu registers and neon)
* 30-powerpc-no-altivec.patch disable altivec by default on powerpc because
debian powerpc does not require altivec (patch cherry picked from ubuntu)
Checksums-Sha1:
02c5ca394ccb877abd3bb746e2a3c5e918fbc60c 2364 clang_3.0-6.2.dsc
9a6300a89b1a4ae5b237a7608d7e68df27e29a75 23095 clang_3.0-6.2.debian.tar.gz
1a5440fc183686eab8dc62666c327c23665419a5 4880768 clang_3.0-6.2_amd64.deb
188b97d52f8b0f0cf85346e1270274e34697287c 3268184 libclang1_3.0-6.2_amd64.deb
358cb3c0031ce0191364ff8e1e22e9e08fe5ea5d 988100 libclang-dev_3.0-6.2_amd64.deb
444716d87f088aac086bac215050f0aab9b1a475 76972
libclang-common-dev_3.0-6.2_amd64.deb
Checksums-Sha256:
67f88e3a3b295a2781330012476fe294115f041eb0289741c407071c63fe0af0 2364
clang_3.0-6.2.dsc
793d73ef83369767c58135d200788fe2e9b67db557123ceae5bf5f5c39fd85e6 23095
clang_3.0-6.2.debian.tar.gz
a09d50e5ffdb6af1ae18016e6584d25847a9f3a934c9226a2b8dfc99de5f0f5a 4880768
clang_3.0-6.2_amd64.deb
6ab5de70529da9ed96d2110f285565e23bc6ff0781d68a560e3c7d2970a57c60 3268184
libclang1_3.0-6.2_amd64.deb
c9b34a47f131da43f678fac83523ddbbb1dd4757449a0f81eceebdfb6912fe9b 988100
libclang-dev_3.0-6.2_amd64.deb
2a19edc2d0395de7d60819798236bc909a153d783cd27431e1ade62a2919be61 76972
libclang-common-dev_3.0-6.2_amd64.deb
Files:
01f1d51597e6576e216aae1dbc4b603c 2364 devel optional clang_3.0-6.2.dsc
0bea968021509dfef0b81d3e5fda9b8f 23095 devel optional
clang_3.0-6.2.debian.tar.gz
a903973b1b5149a986fd79538689994a 4880768 devel optional clang_3.0-6.2_amd64.deb
26ef8728a9c9622a5e65b34221f10483 3268184 devel optional
libclang1_3.0-6.2_amd64.deb
3f00a74ec4909c59b900b2a3fe464800 988100 libdevel optional
libclang-dev_3.0-6.2_amd64.deb
20ab6b18fa503c29788874daa5ee3c6c 76972 libdevel optional
libclang-common-dev_3.0-6.2_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQIcBAEBCAAGBQJRWCmpAAoJEAxI6ip6j/178UoQAJMgnLSmIOSlV+jSoDX2ONLc
NaKoucgFa5commv5IOUn5PJ6x7Kxi8rWNBnMdSP76cOl76j3odn+LB6bPiugqqOF
63DlWYLtVx2fk/y6gj1eO+KMOySkVOCW+cPqdpYg2r4M0WC6zIDXjJbnuOAWBlaR
MdkkFJ/IdSfpgJmOm7HuXRN1qi5Ei0tkqMDInCvYF9yRElMG334dOfO5LrRAI0vT
vkVmebNdlOz+T7il5yGZbbPCxVuDKjDrcidnI4hA1pFql1yD4ybuo2pBXxBD1rE1
7hcLyi4MRD8JAlxE4EWW/quyqiCHX9ngiJ/C2AaE4u8IHKZcIlc0DtAWAnqGGjJO
zWGqc01nC9xZ0/QCA1QgVFzttCAzSvoq9+ZW7IEP3rBe++rvCgcWU3gnCy9pRIin
D/IyAD0ruZyG0fq87SA6X22rsxOfvkUiFrmccVMaM8SvyYLMwL0ro3ALHkl3GRIt
eBvz9kUiNilM1pTPxJvux+8TGKaYq9kByJTbVjF1LZP3gd+T51n0cgPIB7xRdobu
S4/zBBtxD0Vuc0U/JASKpSp5LaV86zp50FiCO3SH0hZpY94tFjNQoTb1LPeEV2my
SfuetWSIB4FKYSCa3gHwWT2sdvC+pc+3SaU0RLd4d0c/soNUsAX692Ru1m1EtdB0
ftDEekGqKrp7gI7kijQ5
=y2HH
-----END PGP SIGNATURE-----
--- End Message ---