Your message dated Sat, 08 Dec 2012 11:03:49 +0000
with message-id <e1thicd-0002g0...@franck.debian.org>
and subject line Bug#693208: fixed in clang 3.2~rc1-1~exp1
has caused the Debian Bug report #693208,
regarding clang unable to link trivial test program on armhf
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.)


-- 
693208: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693208
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: clang
Version: 3.0-6
Severity: grave
Tags: patch
x-debbugs-cc: debian-rele...@lists.debian.org

RT in cc because of proposed TPU upload.

Unfortunately it seems that the changes in 3.0-6 fixed clang on armel
but not on armhf.

root@debian:/# clang -v test.c
Debian clang version 3.0-6 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: arm-unknown-linux-gnueabihf
Thread model: posix
clang: warning: unknown platform, assuming -mfloat-abi=soft
"/usr/bin/clang" -cc1 -triple armv4t-unknown-linux-gnueabihf -S
-disable-free -disable-llvm-verifier -main-file-name test.c
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-target-abi apcs-gnu -target-cpu arm7tdmi -msoft-float -mfloat-abi soft
-target-feature +soft-float -target-feature +soft-float-abi
-target-feature -neon -target-linker-version 2.22
-momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.0
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem /usr/bin/../lib/clang/3.0/include
-internal-externc-isystem /usr/include/arm-linux-gnueabihf
-internal-externc-isystem /usr/include -ferror-limit 19 -fmessage-length
80 -fno-signed-char -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/test-TUFgUO.s -x c test.c
clang -cc1 version 3.0 based upon llvm 3.0 hosted on
arm-unknown-linux-gnueabihf
ignoring nonexistent directory "/usr/bin/../lib/clang/3.0/include"
ignoring nonexistent directory "/usr/bin/../lib/clang/3.0/include"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/include/arm-linux-gnueabihf"
ignoring duplicate directory "/usr/include/arm-linux-gnueabihf"
ignoring duplicate directory "/usr/include/arm-linux-gnueabihf"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/include/arm-linux-gnueabihf
/usr/include
/usr/include/clang/3.0/include/
/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/
/usr/lib/gcc/arm-linux-gnueabihf/4.6/include-fixed/
End of search list.
"/usr/bin/as" -o /tmp/test-8d1iPt.o /tmp/test-TUFgUO.s
"/usr/bin/ld" -X --hash-style=both --build-id --eh-frame-hdr -m
armelf_linux_eabi -dynamic-linker /lib/ld-linux.so.3 -o a.out crt1.o
crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o
-L/usr/lib/gcc/arm-linux-gnueabihf/4.6
-L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib -L/usr/lib
/tmp/test-8d1iPt.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc
--as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o crtn.o
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
root@debian:/#

I decided to first look at the warning about float abi, this seems to
have been a simple case of a missing condition in the logic that decides
what float ABI to use. While fixing that I also noticed that the code
uses "softfp" by default on armel when for debian armel it should be
using "soft" by default (since debian supports hardware without a fpu)
so I changed that too.

Reading that code also gave me a hint on how to fix the code that made
the path descisions which I proceeded to do.

Then I had to fix the dynamic linker path for armhf.

This is sufficient to make clang work with the gold linker on armhf.
Unfortunately the bfd linker fails with an assertion failure. I intend
to file a seperate bug report about this but still I think working with
one or the two linker choices debian offers is better than working with
neither.

While working on the fixes I also found the clean target was not
cleaning up properly and so fixed it.

I have attatched a diff which I would like to upload to TPU are the
maintainer and release team happy with this? I have tested that the
patch does not break linking on armel with either bfd or gold.

P.S. it seems the version in unstable has regressed from the version
in testing and does not link a trivial test app successfully on either
armel or armhf I have not investigated details of that (IMO fixing
wheezy is more important than fixing a package that is in sid and
unlikely to make it for wheezy).



diff -Nru clang-3.0/debian/changelog clang-3.0/debian/changelog
--- clang-3.0/debian/changelog  2012-02-25 13:05:54.000000000 +0000
+++ clang-3.0/debian/changelog  2012-11-13 12:15:15.000000000 +0000
@@ -1,3 +1,14 @@
+clang (3.0-6.1) wheezy; urgency=low
+
+  * Non-maintainer upload.
+  * 26-set-correct-float-abi.diff: Fix default float abis for armel and armhf
+  * 24-path-multiarch.diff: Fix paths for armhf
+  * 27-dynamic-linker.patch: Fix dynamic linker path for armhf
+  * debian/rules: fix clean target to remove generated file 
+    tools/clang/include/clang/Debian/debian_path.h
+
+ -- Peter Michael Green <plugw...@debian.org>  Mon, 12 Nov 2012 22:04:07 +0000
+
 clang (3.0-6) unstable; urgency=low
 
   * Improve the soname patch
diff -Nru clang-3.0/debian/patches/24-path-multiarch.diff 
clang-3.0/debian/patches/24-path-multiarch.diff
--- clang-3.0/debian/patches/24-path-multiarch.diff     2012-02-25 
13:05:16.000000000 +0000
+++ clang-3.0/debian/patches/24-path-multiarch.diff     2012-11-12 
22:03:48.000000000 +0000
@@ -1,8 +1,8 @@
 Index: clang-3.0/tools/clang/lib/Driver/ToolChains.cpp
 ===================================================================
---- clang-3.0.orig/tools/clang/lib/Driver/ToolChains.cpp       2012-02-25 
13:20:26.235542936 +0100
-+++ clang-3.0/tools/clang/lib/Driver/ToolChains.cpp    2012-02-25 
13:21:02.951542117 +0100
-@@ -1785,6 +1785,15 @@
+--- clang-3.0.orig/tools/clang/lib/Driver/ToolChains.cpp       2012-11-12 
21:17:23.000000000 +0000
++++ clang-3.0/tools/clang/lib/Driver/ToolChains.cpp    2012-11-12 
22:03:25.000000000 +0000
+@@ -1785,6 +1785,19 @@
      if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-unknown-linux-gnu"))
        return "x86_64-unknown-linux-gnu";
      return TargetTriple.str();
@@ -11,8 +11,12 @@
 +      return "powerpc-linux-gnu";
 +    return TargetTriple.str();
 +  case llvm::Triple::arm:
-+    if (llvm::sys::fs::exists(SysRoot + "/lib/arm-linux-gnueabi"))
-+      return "arm-linux-gnueabi";
++    if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABI)
++      if (llvm::sys::fs::exists(SysRoot + "/lib/arm-linux-gnueabi"))
++        return "arm-linux-gnueabi";
++    if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF)
++      if (llvm::sys::fs::exists(SysRoot + "/lib/arm-linux-gnueabihf"))
++        return "arm-linux-gnueabihf";
 +    return TargetTriple.str();
 +
    }
diff -Nru clang-3.0/debian/patches/26-set-correct-float-abi.diff 
clang-3.0/debian/patches/26-set-correct-float-abi.diff
--- clang-3.0/debian/patches/26-set-correct-float-abi.diff      1970-01-01 
00:00:00.000000000 +0000
+++ clang-3.0/debian/patches/26-set-correct-float-abi.diff      2012-11-13 
12:03:39.000000000 +0000
@@ -0,0 +1,37 @@
+Description: set correct float abi settings for armel and armhf
+ debian armel supports systems that don't have a fpu so should use a "float 
abi"
+ setting of soft by default.
+ 
+ Debian armhf needs a float abi setting of "hard"
+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    2012-11-12 
22:03:29.000000000 +0000
++++ clang-3.0/tools/clang/lib/Driver/Tools.cpp 2012-11-13 12:03:33.000000000 
+0000
+@@ -583,7 +583,11 @@
+ 
+     case llvm::Triple::Linux: {
+       if (getToolChain().getTriple().getEnvironment() == 
llvm::Triple::GNUEABI) {
+-        FloatABI = "softfp";
++        FloatABI = "soft";
++        break;
++      }
++      if (getToolChain().getTriple().getEnvironment() == 
llvm::Triple::GNUEABIHF) {
++        FloatABI = "hard";
+         break;
+       }
+     }
diff -Nru clang-3.0/debian/patches/27-dynamic-linker.diff 
clang-3.0/debian/patches/27-dynamic-linker.diff
--- clang-3.0/debian/patches/27-dynamic-linker.diff     1970-01-01 
00:00:00.000000000 +0000
+++ clang-3.0/debian/patches/27-dynamic-linker.diff     2012-11-13 
12:12:44.000000000 +0000
@@ -0,0 +1,33 @@
+Description: set correct dynamic linker path for armhf
+ armhf uses a different dynamic linker path from armel
+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    2012-11-13 
12:04:59.000000000 +0000
++++ clang-3.0/tools/clang/lib/Driver/Tools.cpp 2012-11-13 12:04:59.000000000 
+0000
+@@ -4315,7 +4315,10 @@
+       CmdArgs.push_back("/lib/ld-linux.so.2");
+     else if (ToolChain.getArch() == llvm::Triple::arm ||
+              ToolChain.getArch() == llvm::Triple::thumb)
+-      CmdArgs.push_back("/lib/ld-linux.so.3");
++      if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
++        CmdArgs.push_back("/lib/ld-linux-armhf.so.3");
++      else
++        CmdArgs.push_back("/lib/ld-linux.so.3");
+     else if (ToolChain.getArch() == llvm::Triple::ppc)
+       CmdArgs.push_back("/lib/ld.so.1");
+     else if (ToolChain.getArch() == llvm::Triple::ppc64)
diff -Nru clang-3.0/debian/patches/series clang-3.0/debian/patches/series
--- clang-3.0/debian/patches/series     2012-02-25 13:05:54.000000000 +0000
+++ clang-3.0/debian/patches/series     2012-11-13 12:14:01.000000000 +0000
@@ -6,3 +6,5 @@
 23-strlcpy_strlcat_warning_removed.diff
 24-path-multiarch.diff
 25-amdfam10.diff
+26-set-correct-float-abi.diff
+27-dynamic-linker.diff
diff -Nru clang-3.0/debian/rules clang-3.0/debian/rules
--- clang-3.0/debian/rules      2011-10-04 12:58:06.000000000 +0000
+++ clang-3.0/debian/rules      2012-11-13 12:09:43.000000000 +0000
@@ -36,5 +36,6 @@
 endif
        $(RM) -r $(D)/debian/ccache
        find utils -name '*.py[co]' | xargs rm -f
+       $(RM) tools/clang/include/clang/Debian/debian_path.h
 
 .PHONY: clean

--- End Message ---
--- Begin Message ---
Source: clang
Source-Version: 3.2~rc1-1~exp1

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 693...@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: Sat, 17 Nov 2012 15:31:19 +0100
Source: clang
Binary: clang clang-3.2 libclang1 libclang-dev libclang-common-dev compiler-rt
Architecture: source all amd64
Version: 3.2~rc1-1~exp1
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)
 compiler-rt - Runtime C library - LLVM based
 libclang-common-dev - clang library - Common development package
 libclang-dev - clang library - Development package
 libclang1  - clang library
Closes: 666539 674155 685013 688811 691989 693208 693240
Changes: 
 clang (3.2~rc1-1~exp1) experimental; urgency=low
 .
   * New testing version
     - Fix when a bug when class with multiple copy constructors is in a union
       (Closes: #691989)
     - Improved support of C++ 11 (Closes: #666539)
   * Use gcc 4.7 to build clang (instead of 4.6) (Closes: #685013) (LP: 
#1081905)
   * Make asan (address sanitizer) work (Closes: #674155)
   * Make --coverage work (LP: #954709)
   * Also register clang for /usr/bin/c89 & /usr/bin/c99 (Closes: #688811)
   * Take in account the new gcc C++ paths (Closes: #693240)
   * Explicit dependency on libstdc++6-4.7-dev, libgcc-4.7-dev, libobjc-4.7-dev
     from clang. Thanks to new changes of gcc (4.7.2-10)
   * Enable parallel build when available
 .
   [ Peter Michael Green ]
   * 26-set-correct-float-abi.diff: Fix default float abis for armel and armhf
   * 24-path-multiarch.diff: Fix paths for armhf
     (Closes: #693208)
Checksums-Sha1: 
 65c4b1799114f16dab3c4e5313401a569e1f1d29 2096 clang_3.2~rc1-1~exp1.dsc
 a96dd5bf431cf9c12bbdeb129261f71997418d7c 1027210 
clang_3.2~rc1.orig-compiler-rt.tar.bz2
 24991d6b7e1973122b96da0d1b09deee8f6a8ab4 6987407 clang_3.2~rc1.orig.tar.bz2
 b058355729d25b6484ca58887aefbbdd6a3bb5ea 17079 
clang_3.2~rc1-1~exp1.debian.tar.gz
 5c8e70f30afe3a145011fe04119196a77e33ccca 8818 clang_3.2~rc1-1~exp1_all.deb
 89c90f1ccbb42bd2cb4de496263cafda76244f3a 6074666 
clang-3.2_3.2~rc1-1~exp1_amd64.deb
 60fe6f35897e6ce940a834c6c39cbc1e81caa90e 4188608 
libclang1_3.2~rc1-1~exp1_amd64.deb
 62cddf76e81505d48e41169136001f617e632e62 10561744 
libclang-dev_3.2~rc1-1~exp1_amd64.deb
 9760798bd189c9823c988778eb237324cb574a86 301942 
libclang-common-dev_3.2~rc1-1~exp1_amd64.deb
 7b19d19e6999a41d49d774413c09dddcaabbb0f7 204118 
compiler-rt_3.2~rc1-1~exp1_amd64.deb
Checksums-Sha256: 
 dfe749ae0a1f92401125f18597e6ac54103c5c4e78c1b96af404504ab6126d29 2096 
clang_3.2~rc1-1~exp1.dsc
 4054447416c5f5e9aad6d93a28dd8c4722c15cb8fbc8f9ddfd9b83fe21e14505 1027210 
clang_3.2~rc1.orig-compiler-rt.tar.bz2
 6148949506ce246c29e53e63755583691a8433d356bd0a3ebdeee829c185f828 6987407 
clang_3.2~rc1.orig.tar.bz2
 32851b2e999c131b9597707d53c9565a3e8703c90faa3b8a67a2f81c8c930e8a 17079 
clang_3.2~rc1-1~exp1.debian.tar.gz
 3a59980bbb51f29975a59d97a9fcbad78cb894ccb29e07aff5423ab7efd8fb90 8818 
clang_3.2~rc1-1~exp1_all.deb
 09870b2b4a5f8c25d13e4433c65af4b90c28a021e51f141bf38b5ccb619e6303 6074666 
clang-3.2_3.2~rc1-1~exp1_amd64.deb
 607be2654ddffd66ef086127c94f4d11b695bb9be3e9dcbbc55869f8425fc1ca 4188608 
libclang1_3.2~rc1-1~exp1_amd64.deb
 1a78582c2c49dc824cfa76696bee796f30139cc7c096180ee67f1dd7765d4933 10561744 
libclang-dev_3.2~rc1-1~exp1_amd64.deb
 5a55a6e01f709c05ab453547b85124b1fae2b2c7479fa193e751443e5734892d 301942 
libclang-common-dev_3.2~rc1-1~exp1_amd64.deb
 e5a773670f0dc533343db778309609d58853d6e5cc678cd895fefc5aaa459522 204118 
compiler-rt_3.2~rc1-1~exp1_amd64.deb
Files: 
 40f1789ba53c794c2695f1b00c37c8ef 2096 devel optional clang_3.2~rc1-1~exp1.dsc
 76914ad7b0d74d29ec4a783c81ae200b 1027210 devel optional 
clang_3.2~rc1.orig-compiler-rt.tar.bz2
 a4e586486a78acee0637785b18890128 6987407 devel optional 
clang_3.2~rc1.orig.tar.bz2
 17b1ef74345faac1082205c7d19aafff 17079 devel optional 
clang_3.2~rc1-1~exp1.debian.tar.gz
 614231cd3f2f899c177506ed892b9612 8818 devel optional 
clang_3.2~rc1-1~exp1_all.deb
 019d70d30fe48098366b9250deed3f62 6074666 devel optional 
clang-3.2_3.2~rc1-1~exp1_amd64.deb
 a7482d13e75411db475b4b1e24ba4f98 4188608 devel optional 
libclang1_3.2~rc1-1~exp1_amd64.deb
 21a0465544319bfeb31c772b262ff9ba 10561744 libdevel optional 
libclang-dev_3.2~rc1-1~exp1_amd64.deb
 2fae0b9679ade8096929a388a0769647 301942 libdevel optional 
libclang-common-dev_3.2~rc1-1~exp1_amd64.deb
 c98d6b427ac8db596cea409d08fd6808 204118 libdevel optional 
compiler-rt_3.2~rc1-1~exp1_amd64.deb

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

iEYEARECAAYFAlC3UEUACgkQiOXXM92JlhBXLgCgz+TTiRAFQFaFqdkU2+GSKl9j
I2EAoKbjUTq1SZM8chc4DkBrv3+56SkQ
=Woei
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to