From 5cb811360040043f4913173c1fddeb56305954fe Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sat, 23 Mar 2019 16:25:08 +0100 Subject: [PATCH] Azure CI: Make prebuilt Linux package usable on Ubuntu 14.04 again By instructing the C(++) compiler not to emit relax relocations for the default libs, so that older binutils can be used to link against them. Resolves #3020. --- azure-pipelines.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6dc5cbf3012..4953f4aa561 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -107,7 +107,10 @@ jobs: vmImage: 'ubuntu-16.04' variables: CI_OS: linux - EXTRA_CMAKE_FLAGS: -DMULTILIB=ON -DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON + # To improve portability of the generated binaries, link the C++ standard library statically. + # Also don't use relax relocations for the C(++) parts of the default libraries in order to + # support older user binutils (e.g., Ubuntu 14.04). + EXTRA_CMAKE_FLAGS: -DMULTILIB=ON -DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DRT_CFLAGS=-Wa,-mrelax-relocations=no -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON steps: - template: .azure-pipelines/posix.yml