diff --git a/debian/TODO b/debian/TODO index 6bc80b6e..e57bb40b 100644 --- a/debian/TODO +++ b/debian/TODO @@ -1,2 +1,18 @@ -* moved the header at the right place in libclang-dev +* apply the patches: + * llvm + * clang + * lldb + +* regarder pour les alternatives + +* appliquer le patch de c++ i386 + +* remove of clang & llvm 3.2 + +* look at the bugs of llvm 3.2 + +* move the header at the right place in libclang-dev + * add the soname + +* bootstrap of clang with itslef diff --git a/debian/changelog b/debian/changelog index ed6a1a0b..5b2142be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ -clang (3.2-1~exp4) experimental; urgency=low +llvm-toolchain-3.2 (3.2-1) unstable; urgency=low + * Build the whole LLVM toolchain at once. + TODO * Build using cmake instead of the autotools * Also install clang-check & clang-tblgen in the clang-3.2 package diff --git a/debian/control b/debian/control index 3a39d6b4..d60bf642 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: llvm-toolchain +Source: llvm-toolchain-3.2 Section: devel Priority: optional Maintainer: LLVM Packaging Team diff --git a/debian/rules b/debian/rules index 81f6da47..4c20c37b 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f -TARGET_BUILD := build-clang +TARGET_BUILD := build-llvm GCC_VERSION := 4.7 LLVM_VERSION := 3.2 SONAME_EXT := 1 @@ -37,42 +37,41 @@ endif dh $@ --buildsystem=cmake --builddirectory=$(TARGET_BUILD) override_dh_auto_configure: - xzcat /usr/src/llvm-$(LLVM_VERSION)/llvm-$(LLVM_VERSION).tar.xz|tar -x -f - - mkdir -p tools/clang/include/clang/Debian mkdir -p $(TARGET_BUILD) + mkdir -p clang/include/clang/Debian sed -e "s|@DEB_HOST_MULTIARCH@|$(dpkg-architecture -qDEB_HOST_MULTIARCH)|" \ -e "s|@DEB_HOST_GNU_TYPE@|$(dpkg-architecture -qDEB_HOST_GNU_TYPE)|" \ -e "s|@DEB_PATCHSETVERSION@|$(DEBIAN_REVISION)|" \ - debian/debian_path.h > tools/clang/include/clang/Debian/debian_path.h + debian/debian_path.h > clang/include/clang/Debian/debian_path.h # Remove some old symlinks - cd llvm-$(LLVM_VERSION)/tools/ && \ + cd tools/ && \ if test -h clang; then \ rm clang; \ fi; \ - ln -s ../../tools/clang .; \ + ln -s ../clang .; \ readlink clang; \ if test -h lldb; then \ rm lldb; \ fi; \ - ln -s ../../tools/lldb .; \ + ln -s ../lldb .; \ - cd llvm-$(LLVM_VERSION)/projects/ && \ + cd projects/ && \ if test -h compiler-rt; then \ rm compiler-rt; \ fi; \ - ln -s ../../compiler-rt .; \ + ln -s ../compiler-rt .; \ readlink compiler-rt # Start the actual configure - cd $(TARGET_BUILD) && \ - ../llvm-$(LLVM_VERSION)/configure $(confargs) \ - --prefix=/usr/ \ - --disable-assertions --enable-shared --enable-optimized \ - --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi \ - CLANG_VENDOR=Debian || { cat config.log; exit 1; } -# cd $(TARGET_BUILD) && cmake ../llvm-$(LLVM_VERSION)/ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON +# cd $(TARGET_BUILD) && \ +# ../configure $(confargs) \ +# --prefix=/usr/ \ +# --disable-assertions --enable-shared --enable-optimized \ +# --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi \ +# CLANG_VENDOR=Debian || { cat config.log; exit 1; } + cd $(TARGET_BUILD) && cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON override_dh_auto_build: $(MAKE) $(NJOBS) -C $(TARGET_BUILD) VERBOSE=1 ONLY_TOOLS="clang lldb" CLANG_VENDOR=Debian CXXFLAGS=-std=c++0x @@ -81,10 +80,10 @@ override_dh_auto_build: # && make -f Makefile.sphinx man override_dh_auto_install: - chrpath -d build-clang/Release/bin/clang + chrpath -d $(TARGET_BUILD)/Release/bin/clang $(MAKE) -C $(TARGET_BUILD) VERBOSE=1 ONLY_TOOLS="clang lldb" install DESTDIR=$(CURDIR)/debian/tmp/ cd debian/tmp/usr/lib/&& mv libclang.so libclang.so.$(SONAME_EXT) && ln -s libclang.so.$(SONAME_EXT) libclang.so -# cd build-clang/tools/clang/runtime/compiler-rt/ && rm -rf $$(find . -iname "SubDir.lib*" -o -iname .dir) && rm -rf $$(find -empty) +# cd $(TARGET_BUILD)/tools/clang/runtime/compiler-rt/ && rm -rf $$(find . -iname "SubDir.lib*" -o -iname .dir) && rm -rf $$(find -empty) mkdir -p $(CURDIR)/debian/compiler-rt/usr/bin/ cp compiler-rt/lib/asan/scripts/asan_symbolize.py $(CURDIR)/debian/compiler-rt/usr/bin/asan_symbolize # Create this fake directory to make the install libclang-common-dev happy @@ -99,4 +98,4 @@ override_dh_auto_test: $(MAKE) -C $(TARGET_BUILD) check || true override_dh_auto_clean: - rm -rf build-clang llvm-$(LLVM_VERSION) tools/clang/include/clang/Debian/debian_path.h + rm -rf $(TARGET_BUILD) tools/clang/include/clang/Debian/debian_path.h