Commit 25272f3a authored by Sylvestre Ledru's avatar Sylvestre Ledru

Merge branch '7' of into 7

parents 8b2eb315 e57a28c1
llvm-toolchain-7 (1:7-6) UNRELEASED; urgency=medium
llvm-toolchain-7 (1:7-6~exp1) experimental; urgency=medium
* Add python-pygments as dep of llvm-7-tools because needs it
* Add back (untested)
* Start the work on bootstraping clang
- bootstrap-with-openmp-version-export-missing.diff: fix a link issue
- bootstrap-fix-include-next.diff: Fix an include issue at bootstrap phase
* Fix the install of clang bash completion
[ Gianfranco Costamagna ]
* Take option two in bug #877567 to fix FTBFS on mips and mipsel
-- Sylvestre Ledru <> Sat, 06 Oct 2018 23:04:24 +0200
usr/lib/llvm-@LLVM_VERSION@/bin/clang usr/lib/llvm-@LLVM_VERSION@/bin/clang-@LLVM_VERSION@
usr/lib/llvm-@LLVM_VERSION@/lib/cmake/clang usr/lib/cmake/clang-@LLVM_VERSION@
usr/lib/llvm-@LLVM_VERSION@/share/clang/ etc/bash_completion.d/clang-@LLVM_VERSION@
\ No newline at end of file
usr/lib/llvm-@LLVM_VERSION@/share/clang/ usr/share/bash-completion/completions/clang-@LLVM_VERSION@
......@@ -293,8 +293,9 @@ Description: Modular compiler and toolchain technologies, libraries and headers
Package: llvm-7-tools
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python,
llvm-7-dev (= ${binary:Version}), python-pygments
Depends: ${shlibs:Depends}, ${misc:Depends}, python,
python-pygments, python-yaml,
llvm-7-dev (= ${binary:Version})
Description: Modular compiler and toolchain technologies, tools
LLVM is a collection of libraries and tools that make it easy to build
compilers, optimizers, just-in-time code generators, and many other
This diff is collapsed.
When doing a bootstrap, we use a newly built clang.
When this one is used, if already installed on the system,
we have clang header in two places:
Because clang expects only one of his headers to be available, it uses
include_next to get the glibc (libc6-dev package) header.
However, in the previous example, because we have inttypes.h twice in the
include search path, clang's header will call itself without any effect.
Therefor, it will do include_next until the define from the libc is existing (ex: _INTTYPES_H)
Index: llvm-toolchain-7-7/clang/lib/Headers/inttypes.h
--- llvm-toolchain-7-7.orig/clang/lib/Headers/inttypes.h
+++ llvm-toolchain-7-7/clang/lib/Headers/inttypes.h
@@ -20,7 +20,7 @@
+#if !defined(__CLANG_INTTYPES_H) || !defined(_INTTYPES_H)
#if defined(_MSC_VER) && _MSC_VER < 1800
Index: llvm-toolchain-7-7/clang/lib/Headers/limits.h
--- llvm-toolchain-7-7.orig/clang/lib/Headers/limits.h
+++ llvm-toolchain-7-7/clang/lib/Headers/limits.h
@@ -22,7 +22,7 @@
-#ifndef __CLANG_LIMITS_H
+#if !defined(__CLANG_LIMITS_H) || !defined(_LIBC_LIMITS_H_)
#define __CLANG_LIMITS_H
/* The system's limits.h may, in turn, try to #include_next GCC's limits.h.
Index: llvm-toolchain-7-7/openmp/runtime/src/CMakeLists.txt
--- llvm-toolchain-7-7.orig/openmp/runtime/src/CMakeLists.txt
+++ llvm-toolchain-7-7/openmp/runtime/src/CMakeLists.txt
@@ -174,7 +174,8 @@ endif()
# Linking command will include libraries in LIBOMP_CONFIGURED_LIBFLAGS
-target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS})
+target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS}
+ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports_so.txt")
# Create *.inc before compiling any sources
# objects depend on : .inc files
......@@ -29,7 +29,7 @@ Index: llvm-toolchain-snapshot_7.0~svn293997/lldb/source/Plugins/Process/gdb-rem
#define DEBUGSERVER_BASENAME "debugserver"
-#define DEBUGSERVER_BASENAME "lldb-server"
......@@ -76,3 +76,5 @@ D51108-rust-powerpc.diff
# Stop at the first error
set -e
......@@ -176,10 +176,16 @@ if ! ./a.out 2>&1 | grep -q -E "(Test unit written|PreferSmall)"; then
echo "fuzzer"
exit 42
clang-$VERSION -fsanitize=fuzzer
if ! ./a.out 2>&1 | grep -q -E "(Test unit written|PreferSmall)"; then
echo "fuzzer"
exit 42
# fails on 32 bit, seems a real BUG in the package, using 64bit static libs?
LANG=C clang-$VERSION -fsanitize=fuzzer &> foo.log
if ! grep "No such file or directory" foo.log; then
# This isn't failing on 64, so, look at the results
if ! ./a.out 2>&1 | grep -q -E "(Test unit written|PreferSmall)"; then
echo "fuzzer"
exit 42
echo 'int main() {
......@@ -496,7 +502,8 @@ EOF
echo "if it fails, please run"
echo "apt-get install libc6-dev:i386 libgcc-5-dev:i386 libc6-dev-x32 libx32gcc-5-dev libx32gcc-8-dev"
for SYSTEM in ""; do
for MARCH in -m64 -m32 -mx32 "-m32 -march=i686"; do
# for MARCH in -m64 -m32 -mx32 "-m32 -march=i686"; do
for MARCH in -m64; do
for LIB in --rtlib=compiler-rt -fsanitize=address -fsanitize=thread -fsanitize=memory -fsanitize=undefined -fsanitize=dataflow; do # -fsanitize=efficiency-working-set; do
if test "$MARCH" == "-m32" -o "$MARCH" == "-mx32"; then
if test $LIB == "-fsanitize=thread" -o $LIB == "-fsanitize=memory" -o $LIB == "-fsanitize=dataflow" -o $LIB == "-fsanitize=address" -o $LIB == "-fsanitize=undefined"; then
......@@ -49,22 +49,6 @@ endif
# Cxx flags for building libcxx and libcxxabi
LIBCXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
# Only enable gsplit dwarf on archs which needs it (32 bits)
ifeq ($(DEB_HOST_ARCH_BITS),32)
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge ; echo $$?),0)
# when using -gsplit-dwarf, it will requires extract-dwo which doesn't exist on precise:
# More:
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 7.1.0-7~ || \
dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 7.2.0-2; echo $$?),0)
# Only pass -gsplit-dwarf with working version of gcc 7
# More: &
CXXFLAGS_EXTRA += -gsplit-dwarf
$(error "Broken gcc version for -gsplit-dwarf support. Please use < gcc 7 or >= 7.2.0-2")
endif # < gcc 7 or >= 7.2.0-2
endif # binutils
endif # archs
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.9-20140411-1~ ; echo $$?),0)
# Too old version of gcc. Force 4.9
......@@ -75,6 +59,11 @@ export CXX=g++-$(GCC_VERSION)
opt_flags = -O2 -DNDEBUG
# Only enable g1 on archs which needs it (it fixes an OOM during dh_strip due to huge symbols)
ifeq ($(DEB_HOST_ARCH_BITS),32)
opt_flags += -g1
ifneq (,$(findstring $(DEB_HOST_ARCH),armel))
opt_flags += -marm
# 3.8 fails to build, disable the compiler_rt builtins
Test-Command: sh -v ./debian/
Depends: @
Test-Command: bash -v ./debian/
Depends: @, cmake, g++
Restrictions: allow-stderr
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment