* build using gold on arm64 and s390x. For backports, arm64 might still

need the BFD linker, and building with only one or two processes in
  parallel.
* On amd64, s390x, arm64 and ppc64el, build with -g1 instead of -g.
* Set CMAKE_CXX_FLAGS_RELWITHDEBINFO and pass opt_flags.
This commit is contained in:
Sylvestre Ledru 2017-09-18 19:59:54 +00:00
parent 00fc80f264
commit 3d3d89deda
3 changed files with 17 additions and 3 deletions

10
debian/changelog vendored
View File

@ -1,8 +1,14 @@
llvm-toolchain-5.0 (1:5.0-1ubuntu1) artful; urgency=medium
llvm-toolchain-5.0 (1:5.0-2) unstable; urgency=medium
[ Matthias Klose ]
* Link with --no-keep-files-mapped --no-map-whole-files when using gold.
* build using gold on arm64 and s390x. For backports, arm64 might still
need the BFD linker, and building with only one or two processes in
parallel.
* On amd64, s390x, arm64 and ppc64el, build with -g1 instead of -g.
* Set CMAKE_CXX_FLAGS_RELWITHDEBINFO and pass opt_flags.
-- Matthias Klose <doko@ubuntu.com> Fri, 08 Sep 2017 10:43:24 +0200
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 18 Sep 2017 21:53:00 +0200
llvm-toolchain-5.0 (1:5.0-1) unstable; urgency=medium

4
debian/control vendored
View File

@ -229,6 +229,8 @@ Section: libs
Depends: ${shlibs:Depends}, ${misc:Depends}
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Breaks: libllvm3.9v4
Replaces: libllvm3.9v4
Description: Modular compiler and toolchain technologies, runtime library
LLVM is a collection of libraries and tools that make it easy to build
compilers, optimizers, just-in-time code generators, and many other
@ -243,6 +245,8 @@ Priority: extra
Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm5.0 (= ${binary:Version})
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Breaks: libllvm3.9v4-dbg
Replaces: libllvm3.9v4-dbg
Description: Modular compiler and toolchain technologies, debugging libraries
LLVM is a collection of libraries and tools that make it easy to build
compilers, optimizers, just-in-time code generators, and many other

6
debian/rules vendored
View File

@ -61,6 +61,9 @@ export CC=gcc-$(GCC_VERSION)
export CXX=g++-$(GCC_VERSION)
opt_flags = -g -O2
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el s390x))
opt_flags = -g1 -O2
endif
ifneq (,$(findstring $(DEB_HOST_ARCH),armel))
opt_flags += -marm
# 3.8 fails to build, disable the compiler_rt builtins
@ -81,7 +84,7 @@ else
control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev'
endif
BINUTILS_GOLD_ARCHS := amd64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32
BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32 s390x
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0)
ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS)))
# -fused-ld=gold enables the gold linker (but is not supported by all archs / distro)
@ -274,6 +277,7 @@ override_dh_auto_configure: preconfigure
-DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-$(LLVM_VERSION) \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(opt_flags)" \
-DCMAKE_CXX_FLAGS='$(CXXFLAGS_EXTRA)' \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_INSTALL_UTILS=ON \