Source: klibc
Version: 2.0.4
Severity: minor

Dear Maintainer,

Hello,

Using the rebuilding infrastructure, your package failed to build with clang 
instead of gcc. 

Error is like this:
http://clang.debian.net/status.php?version=3.6.0&key=FILE_NOT_FOUND

Full build log is available here:
http://clang.debian.net/logs/2015-03-25/klibc_2.0.4-2_unstable_clang.log


Thanks,
Joseph


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.0.4-2-ARCH (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru klibc-2.0.4/debian/patches/clang_build.patch klibc-2.0.4/debian/patches/clang_build.patch
--- klibc-2.0.4/debian/patches/clang_build.patch	1970-01-01 00:00:00.000000000 +0000
+++ klibc-2.0.4/debian/patches/clang_build.patch	2015-05-24 14:33:14.000000000 +0000
@@ -0,0 +1,16 @@
+--- a/scripts/Kbuild.klibc
++++ b/scripts/Kbuild.klibc
+@@ -118,6 +118,13 @@
+ 		       -I$(KLIBCKERNELOBJ)/include -I$(srctree)/include)    \
+ 		     $(KLIBCARCHINCFLAGS)
+ 
++# when building with clang, clang's builtin header files's location is not in the search path.
++ifeq ($(shell $(KLIBCCC) -v 2>&1 | grep -c "clang version"),1)
++      CLANGVERSION    := $(shell $(KLIBCCC) --version 2>&1 | grep "clang version" | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/")
++      KLIBCCPPFLAGS   += -I/usr/include/clang/$(CLANGVERSION)/include
++endif
++	
++
+ # klibc definitions
+ KLIBCDEFS        += -D__KLIBC__=$(KLIBCMAJOR)          \
+ 		    -D__KLIBC_MINOR__=$(KLIBCMINOR)    \
diff -Nru klibc-2.0.4/debian/patches/series klibc-2.0.4/debian/patches/series
--- klibc-2.0.4/debian/patches/series	2014-10-05 00:13:46.000000000 +0000
+++ klibc-2.0.4/debian/patches/series	2015-05-24 14:29:36.000000000 +0000
@@ -9,3 +9,4 @@
 readlink-add-f-option.patch
 mount-implement-o-defaults.patch
 mips-update-archfcntl-h.patch
+clang_build.patch

Reply via email to