summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-07-10 11:19:36 +0200
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-07-10 16:06:52 +0200
commitb3300387f2e14ea59c70db513a8f6eda6fe17afa (patch)
treeff77a4e95d235ab41d192f3eb07520896122833d /external
parentff55c7d386a8dca90bc6e4b15cf4fd3506b7190c (diff)
Fix UBSan build of ExternalProject_redland
...after c75c21eef670fce33eb5a501357935dbd25be923 "Upgrade raptor to 2.0.16", where it now started to fail with > libtool: link: LD_RUN_PATH="/usr/local/lib:" /usr/bin/ccache /home/tdf/lode/opt_private/clang-llvmorg-12.0.1/bin/clang --gcc-toolchain=/opt/rh/gcc-toolset-12/root/usr -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/tdf/lode/jenkins/workspace/lo_ubsan/sanitize-ubsan-excludelist -fno-sanitize=function -DLIBRDF_INTERNAL=1 -O0 -Wp,-U_FORTIFY_SOURCE -fstrict-aliasing -fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang -debug-info-kind=constructor -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath-link -Wl,/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath-link -Wl,/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program -o .libs/redland-db-upgrade db_upgrade.o -L/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/raptor/src/.libs /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so -L/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/libxml2/.libs /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/libxml2/.libs/libxml2.so -L/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/rasqal/src/.libs /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/rasqal/src/.libs/librasqal.so ../src/.libs/librdf.so > /opt/rh/gcc-toolset-12/root/usr/bin/ld: /home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: undefined reference to `__ubsan_vptr_type_cache' > /opt/rh/gcc-toolset-12/root/usr/bin/ld: /home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: undefined reference to `__ubsan_handle_function_type_mismatch_v1' > /opt/rh/gcc-toolset-12/root/usr/bin/ld: /home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: undefined reference to `__ubsan_handle_dynamic_type_cache_miss' > clang-12: error: linker command failed with exit code 1 (use -v to see invocation) > make[3]: *** [Makefile:489: redland-db-upgrade] Error 1 (<https://ci.libreoffice.org/job/lo_ubsan/3239/>) because $(CC) is used to link a (nominally C-only) executable that links against C++ ICU shared libraries that in turn require a C++-specific UBSan library to be linked in. So just use $(CXX) for linking instead. Change-Id: If7c61c6ee7e1b43965a928b1560f8ab4ae2b0603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170277 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'external')
-rw-r--r--external/redland/UnpackedTarball_redland.mk1
-rw-r--r--external/redland/redland/ubsan.patch11
2 files changed, 12 insertions, 0 deletions
diff --git a/external/redland/UnpackedTarball_redland.mk b/external/redland/UnpackedTarball_redland.mk
index 66e766d20fee..31ebcb8f2f0a 100644
--- a/external/redland/UnpackedTarball_redland.mk
+++ b/external/redland/UnpackedTarball_redland.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,redland,\
external/redland/redland/rpath.patch \
external/redland/redland/clang-cl.patch \
external/redland/redland/libtool.patch \
+ external/redland/redland/ubsan.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/redland/ubsan.patch b/external/redland/redland/ubsan.patch
new file mode 100644
index 000000000000..8226258ea38b
--- /dev/null
+++ b/external/redland/redland/ubsan.patch
@@ -0,0 +1,11 @@
+--- utils/Makefile.in
++++ utils/Makefile.in
+@@ -106,7 +106,7 @@
+ AM_V_at = $(am__v_at_@AM_V@)
+ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+ am__v_at_0 = @
+-CCLD = $(CC)
++CCLD = $(CXX)
+ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@