Your message dated Tue, 02 Apr 2013 21:03:12 +0000
with message-id <e1un8mk-0006gq...@franck.debian.org>
and subject line Bug#704111: fixed in clang 1:3.2-1~exp9
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.2-1~exp9

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.
Sylvestre Ledru <sylves...@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: SHA1

Format: 1.8
Date: Tue, 02 Apr 2013 19:37:22 +0200
Source: clang
Binary: clang clang-3.2 clang-3.2-doc libclang1 libclang1-dbg libclang-dev 
libclang-common-dev compiler-rt
Architecture: source all amd64
Version: 1:3.2-1~exp9
Distribution: experimental
Urgency: low
Maintainer: LLVM Packaging Team <pkg-llvm-t...@lists.alioth.debian.org>
Changed-By: Sylvestre Ledru <sylves...@debian.org>
Description: 
 clang      - C, C++ and Objective-C compiler (LLVM based)
 clang-3.2  - C, C++ and Objective-C compiler (LLVM based)
 clang-3.2-doc - C, C++ and Objective-C compiler (LLVM based) - Documentation
 compiler-rt - Runtime C library - LLVM based
 libclang-common-dev - clang library - Common development package
 libclang-dev - clang library - Development package
 libclang1  - clang library
 libclang1-dbg - clang library
Closes: 704111
Changes: 
 clang (1:3.2-1~exp9) experimental; urgency=low
 .
   [ Peter Michael Green ]
   * Use binutils-gold only on architectures where it is actually available
   * 33-armhf-defaults.diff Fix defaults to use correct CPU and FPU for
     debian  armhf (Closes: #704111)
   * 34-powerpc-no-altivec.diff disable altivec by default on powerpc because
     debian powerpc does not require altivec (patch cherry picked from ubuntu)
Checksums-Sha1: 
 861c9cccd21e60b4439bcbd971a363c6178d082d 2240 clang_3.2-1~exp9.dsc
 6befcad4a5484619c092c59729660ee6cdca2cc0 20566 clang_3.2-1~exp9.debian.tar.gz
 ba178cfa3a34ad7d0a172a797a7c00738db8c032 9968 clang_3.2-1~exp9_all.deb
 a6f0beb15432a343891e57f9e15bfc98b548a70c 10071098 
clang-3.2_3.2-1~exp9_amd64.deb
 8e7b012209ad0ebed429f975a472bfc1acf6ca2b 380242 
clang-3.2-doc_3.2-1~exp9_all.deb
 662304dbf75b27f629178e8bb023eaeb2ef07373 4203374 libclang1_3.2-1~exp9_amd64.deb
 071262ac2e4a869d90c38c0222633446db3619ef 80132974 
libclang1-dbg_3.2-1~exp9_amd64.deb
 e18ca12964ead180fc168074a51d4d6451863d5f 10489080 
libclang-dev_3.2-1~exp9_amd64.deb
 7b33fdc9fc187644de244fbc0d3170e6a6c07df7 303060 
libclang-common-dev_3.2-1~exp9_amd64.deb
 754d8ce6d974967710b246bd6cce77d84739283a 312826 
compiler-rt_3.2-1~exp9_amd64.deb
Checksums-Sha256: 
 f1facfec83c892fb4f3be5b724e4bc7a98578a0c6e92580a468847012e28f0eb 2240 
clang_3.2-1~exp9.dsc
 7c821ae4a7619bf1782353b54fc8aeae530a0c1ed7269bce7d5da18b87c6ac5b 20566 
clang_3.2-1~exp9.debian.tar.gz
 9afcd0dfbf87235960ce8d4b92265ee916b3b9bf47e2f343863a065da32eec89 9968 
clang_3.2-1~exp9_all.deb
 1d50f6d5568a22a9b935974dd9be5e2838d68da5d54b649792d03d1bd74cd285 10071098 
clang-3.2_3.2-1~exp9_amd64.deb
 ec0d9c5b36861308a30a259591ac569a56526cb48272c05553c9af920fb48968 380242 
clang-3.2-doc_3.2-1~exp9_all.deb
 593ab80a4832b366043008db3b4da5e099b143442e5732eec412a901b421836f 4203374 
libclang1_3.2-1~exp9_amd64.deb
 4ae611d5efc965dc630730358b3248f2f7686fdc1c61a3099727e2dffe67dccf 80132974 
libclang1-dbg_3.2-1~exp9_amd64.deb
 5d69193ab738e2d4c3b6e2d481b2016462682893e6b057ef39af49b89b1ee329 10489080 
libclang-dev_3.2-1~exp9_amd64.deb
 a9bb04356d365e9fc6605a5f1544bd83e376cd1b8d06f423e719d3644f21538c 303060 
libclang-common-dev_3.2-1~exp9_amd64.deb
 f15cc1a483e0b17d335822d28cc2d133046050918e134998a905d136b1a83ff4 312826 
compiler-rt_3.2-1~exp9_amd64.deb
Files: 
 587c9505b15c6ccedaf381893f4f74c9 2240 devel optional clang_3.2-1~exp9.dsc
 d5a40122cc1aba4aa63072998a872a45 20566 devel optional 
clang_3.2-1~exp9.debian.tar.gz
 57f593d6ae6b2b5ae005a11f95a6f455 9968 devel optional clang_3.2-1~exp9_all.deb
 7f0d7942a41996ae572cd7a9b4769049 10071098 devel optional 
clang-3.2_3.2-1~exp9_amd64.deb
 0f55e039fdeacc0392685123b52f4f06 380242 doc optional 
clang-3.2-doc_3.2-1~exp9_all.deb
 3be138a4e40d96a9f88c88ff0d079572 4203374 devel optional 
libclang1_3.2-1~exp9_amd64.deb
 60026d7d7b35fa293e64ae2fe79e2b03 80132974 debug extra 
libclang1-dbg_3.2-1~exp9_amd64.deb
 e4bb35430fc3482f37dcc8ea7089e61a 10489080 libdevel optional 
libclang-dev_3.2-1~exp9_amd64.deb
 6e3dabded1735c80b932e25852347c0d 303060 libdevel optional 
libclang-common-dev_3.2-1~exp9_amd64.deb
 f1cf8c2c19af5458861c4a6eda88cb01 312826 libdevel optional 
compiler-rt_3.2-1~exp9_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlFbQxkACgkQiOXXM92JlhBqOACbB6+Pw7hxsjAAHoWuHX8PNaxH
oM8AoNtvsNLgqEeSQdGj+bbuT04YxkDm
=whvy
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to