Commit ec27706e authored by Sylvestre Ledru's avatar Sylvestre Ledru

rebase of the patch

parents 77e1bc45 eb425e63
......@@ -49,12 +49,20 @@ llvm-toolchain-snapshot (1:9~svn351375-1~exp1) experimental; urgency=medium
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 16 Jan 2019 21:59:29 +0100
llvm-toolchain-8 (1:8~+rc1-1~exp2) UNRELEASED; urgency=medium
llvm-toolchain-8 (1:8~+rc2-1~exp2) unstable; urgency=medium
* Activate -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN for all
gcc
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 08 Feb 2019 21:34:32 +0100
llvm-toolchain-8 (1:8~+rc2-1~exp1) unstable; urgency=medium
* New snapshot release
* Add support for kfreebsd (Closes: #921246)
Many thanks to Svante Signell for all patches
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 04 Feb 2019 23:38:37 +0100
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 07 Feb 2019 17:09:15 +0100
llvm-toolchain-8 (1:8~+rc1-1~exp1) experimental; urgency=medium
......
......@@ -82,9 +82,10 @@ Index: llvm-toolchain-snapshot_9~svn353038/clang/lib/Driver/ToolChains/Gnu.cpp
"i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
"i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu",
"i686-linux-android", "i386-gnu", "i486-gnu",
+ "i686-kfreebsd-gnu", "i686-pc-kfreebsd-gnu", "i486-kfreebsd-gnu",
+ "i386-kfreebsd-gnu",
"i586-gnu", "i686-gnu"};
- "i586-gnu", "i686-gnu"};
+ "i586-gnu", "i686-gnu",
+ "i686-kfreebsd-gnu", "i686-pc-kfreebsd-gnu", "i486-kfreebsd-gnu",
+ "i386-kfreebsd-gnu" };
static const char *const MIPSLibDirs[] = {"/lib"};
Index: llvm-toolchain-snapshot_9~svn353038/clang/lib/Driver/ToolChains/KFreeBSD.cpp
......@@ -103,6 +104,7 @@ Index: llvm-toolchain-snapshot_9~svn353038/clang/lib/Driver/ToolChains/KFreeBSD.
+
+#include "KFreeBSD.h"
+#include "CommonArgs.h"
+#include "llvm/Support/VirtualFileSystem.h"
+#include "clang/Config/config.h"
+#include "clang/Driver/Driver.h"
+#include "clang/Driver/Options.h"
......@@ -110,7 +112,6 @@ Index: llvm-toolchain-snapshot_9~svn353038/clang/lib/Driver/ToolChains/KFreeBSD.
+#include "llvm/Option/ArgList.h"
+#include "llvm/ProfileData/InstrProf.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/VirtualFileSystem.h"
+
+using namespace clang::driver;
+using namespace clang::driver::toolchains;
......@@ -528,7 +529,7 @@ Index: llvm-toolchain-snapshot_9~svn353038/clang/lib/Driver/ToolChains/KFreeBSD.
+}
+
+/* FIXME:
+/home/srs/DEBs/llvm-toolchain-7/llvm-toolchain-7-7.0.1~+rc2-7/tools/clang/lib/Driver/ToolChains/KFreeBSD.cpp:431:15: error: no declaration matches ‘clang::SanitizerMask clang::driver::toolchains::kFreeBSD::getSupportedSanitizers() const’
+/home/srs/DEBs/llvm-toolchain-7/llvm-toolchain-7-7.0.1~+rc2-7/clang/lib/Driver/ToolChains/KFreeBSD.cpp:431:15: error: no declaration matches ‘clang::SanitizerMask clang::driver::toolchains::kFreeBSD::getSupportedSanitizers() const’
+ SanitizerMask kFreeBSD::getSupportedSanitizers() const {
+*/
+SanitizerMask kFreeBSD::getSupportedSanitizers() const {
......
......@@ -9,7 +9,7 @@ VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p")
DETAILED_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1\2\3,p")
DEB_HOST_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}-dbgsym_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}-dbgsym_${DETAILED_VERSION}_amd64.deb"
LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}-dbgsym_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}-dbgsym_${DETAILED_VERSION}_amd64.deb"
echo "To install everything:"
echo "sudo dpkg -i $LIST"
L=""
......@@ -252,8 +252,14 @@ fi
clang-$VERSION -fuse-ld=lld -O2 foo.c main.c -o foo
./foo > /dev/null
clang-$VERSION -fuse-ld=lld -flto -O2 foo.c main.c -o foo
./foo > /dev/null
if ls -al1 /usr/bin/ld.lld|grep ld.lld-$VERSION; then
# https://bugs.llvm.org/show_bug.cgi?id=40659
# -fuse-ld=lld will call lld
# Mismatch of version can fail the check
# so, only run it when /usr/bin/lld == $VERSION
clang-$VERSION -fuse-ld=lld -flto -O2 foo.c main.c -o foo
./foo > /dev/null
fi
clang-$VERSION -fuse-ld=lld-$VERSION -O2 foo.c main.c -o foo
./foo > /dev/null
......@@ -366,6 +372,33 @@ int main(int argc, char **argv)
clang-$VERSION -fsanitize=address foo.c -o foo -lc
./foo &> /dev/null || true
echo '
class a {
public:
~a();
};
template <typename, typename> using b = a;
struct f {
template <typename d> using e = b<a, d>;
};
struct g {
typedef f::e<int> c;
};
class h {
struct : g::c {};
};
struct m {
h i;
};
template <typename> void __attribute__((noreturn)) j();
void k() {
m l;
j<int>();
}' > foo.cpp
clang++-$VERSION -std=c++14 -O3 -fsanitize=address -fsanitize=undefined -c foo.cpp -fno-crash-diagnostics
# fails on 32 bit, seems a real BUG in the package, using 64bit static libs?
LANG=C clang-$VERSION -fsanitize=fuzzer test_fuzzer.cc &> foo.log || true
if ! grep "No such file or directory" foo.log; then
......@@ -383,9 +416,10 @@ echo 'int main() {
' > foo.c
clang-$VERSION -g -o bar foo.c
# ABI issue between gcc & clang
# ABI issue between gcc & clang with clang 7
# https://bugs.llvm.org/show_bug.cgi?id=39427
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=913271
if test $VERSION -eq 7; then
echo '
#include <llvm/ADT/ArrayRef.h>
#include <llvm/ADT/Optional.h>
......@@ -427,6 +461,7 @@ if test -f /usr/bin/g++; then
./foo
fi
rm part1.o part2.o
fi
if test ! -f /usr/lib/llvm-$VERSION/lib/libomp.so; then
echo "Install libomp-$VERSION-dev";
......
......@@ -369,6 +369,7 @@ override_dh_auto_configure: preconfigure
-DPOLLY_BUNDLED_JSONCPP=OFF \
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly;AVR" \
-DCLANG_ENABLE_BOOTSTRAP=ON \
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
-DCLANG_VENDOR=$(VENDOR) \
-DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE;CMAKE_BUILD_TYPE;CMAKE_CXX_FLAGS_RELWITHDEBINFO;LLVM_LINK_LLVM_DYLIB;LLVM_INSTALL_UTILS;LLVM_VERSION_SUFFIX;LLVM_ENABLE_SPHINX;SPHINX_WARNINGS_AS_ERRORS;LLVM_BUILD_LLVM_DYLIB;LLVM_ENABLE_RTTI;LLVM_ENABLE_FFI;LIBCLANG_LIBRARY_VERSION;ENABLE_LINKER_BUILD_ID;POLLY_BUNDLED_JSONCPP;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;LLVM_USE_PERF;LLVM_ENABLE_ASSERTIONS;LLVM_BINUTILS_INCDIR;LLVM_HOST_TRIPLE;;LLVM_COMPILER_CHECKED;COMPILER_RT_BUILD_BUILTINS;LIBOMP_LIBFLAGS;CMAKE_SHARED_LINKER_FLAGS"
......
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