From: Waldemar Kozaczuk <jwkozac...@gmail.com> Committer: Nadav Har'El <n...@scylladb.com> Branch: master
tests: handle more generic CROSS_PREFIX for aarch64 builds Instead of the gcc specific 'aarch64-linux-gnu-' CROSS_PREFIX, we look for more generic one that starts with aarch64. This makes the tests makefile function properly with toolchains other than gcc. Also we explicitly set LD_LIBRARY_PATH to boost-lib-dir set by modules/common.gmk to make ldd find locations of boost binaries even where tests are built against arbitrary version of boost specified by the boost_base parameter. Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com> Message-Id: <20210208012512.1167449-1-jwkozac...@gmail.com> --- diff --git a/modules/tests/Makefile b/modules/tests/Makefile --- a/modules/tests/Makefile +++ b/modules/tests/Makefile @@ -229,10 +229,10 @@ build_all_tests: $(all_tests:%=$(out)/%) usr.manifest: build_all_tests $(lastword $(MAKEFILE_LIST)) usr.manifest.skel FORCE @echo " generating modules/tests/usr.manifest" @cat $@.skel > $@ - @if [ "$(CROSS_PREFIX)" = "aarch64-linux-gnu-" ]; then \ + @if [[ "$(CROSS_PREFIX)" == aarch64* ]]; then \ ./add_aarch64_boost_libraries.sh $(OSV_BASE) >> $@; \ else \ - ldd $(addprefix $(out)/tests/,$(boost-tests)) | grep libboost | sed 's/ *[^ ] *\(.*\) => \(.*\) .*/\/usr\/lib\/\1: \2/' | sort | uniq >> $@; \ + LD_LIBRARY_PATH=$(boost-lib-dir) ldd $(addprefix $(out)/tests/,$(boost-tests)) | grep libboost | sed 's/ *[^ ] *\(.*\) => \(.*\) .*/\/usr\/lib\/\1: \2/' | sort | uniq >> $@; \ fi @echo $(all_tests) | tr ' ' '\n' | grep -v "tests/rofs/tst-.*.so" | awk '{print "/" $$0 ": ./" $$0}' >> $@ @echo $(all_tests) | tr ' ' '\n' | grep "tests/rofs/tst-.*.so" | sed 's/\.so//' | awk 'BEGIN { FS = "/" } ; { print "/tests/" $$3 "-rofs.so: ./tests/" $$2 "/" $$3 ".so"}' >> $@ @@ -243,10 +243,10 @@ FORCE: common.manifest: build_all_tests $(lastword $(MAKEFILE_LIST)) usr.manifest.skel FORCE @echo " generating modules/tests/common.manifest" @cat usr.manifest.skel > $@ - @if [ "$(CROSS_PREFIX)" = "aarch64-linux-gnu-" ]; then \ + @if [[ "$(CROSS_PREFIX)" == aarch64* ]]; then \ ./add_aarch64_boost_libraries.sh $(OSV_BASE) >> $@; \ else \ - ldd $(addprefix $(out)/tests/,$(boost-tests)) | grep libboost | sed 's/ *[^ ] *\(.*\) => \(.*\) .*/\/usr\/lib\/\1: \2/' | sort | uniq >> $@; \ + LD_LIBRARY_PATH=$(boost-lib-dir) ldd $(addprefix $(out)/tests/,$(boost-tests)) | grep libboost | sed 's/ *[^ ] *\(.*\) => \(.*\) .*/\/usr\/lib\/\1: \2/' | sort | uniq >> $@; \ fi @echo $(common-tests) $(solaris-tests) | tr ' ' '\n' | awk '{print "/tests/" $$0 ": ./tests/" $$0}' >> $@ -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/000000000000bc41e405bad095e0%40google.com.