Use ld --no-as-needed in Travis Ubuntu 18.04 wxGTK build

This works around a problem in our build system which doesn't set rpath
correctly when linking our own libraries, which means that "qa" library,
for example, doesn't record the path to its "xml" library dependency.

We already worked around this by linking any program using "qa" with
"xml" too, however this doesn't do anything if "--as-needed" flag is in
effect, as is the case by default under Ubuntu 18.04, so make our
workaround work by forcefully disabling this flag.

Real solution would be to use -Wl,-rpath correctly and then stop linking
with "xml" library unnecessarily in e.g. test_gui bakefile.
This commit is contained in:
Vadim Zeitlin 2020-04-23 00:02:10 +02:00
parent f1ee627736
commit 0397da2a8f
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ matrix:
name: wxGTK 2 UTF-8 Ubuntu 18.04
- dist: bionic
compiler: gcc
env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl --disable-webview" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxUSE_XVFB=1
env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl --disable-webview" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11 LDFLAGS=-Wl,--no-as-needed" wxUSE_XVFB=1
name: wxGTK 3 STL Ubuntu 18.04
- dist: bionic
compiler: clang

View File

@ -70,7 +70,7 @@ case $wxTOOLSET in
echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r'
[ "$wxSKIP_GUI" = 1 ] || make -C tests $wxJOBS failtest
make -C tests $wxJOBS
make -C tests $wxJOBS $wxMAKEFILE_FLAGS
echo -en 'travis_fold:end:script.tests\\r'
echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r'