external/redland/raptor/ubsan.patch | 11 +++++++++++ 1 file changed, 11 insertions(+)
New commits: commit 8b2f6b4fba6c466ed399f4f4b80e9631f13a6232 Author: Stephan Bergmann <[email protected]> AuthorDate: Tue Jan 7 17:49:45 2025 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Tue Jan 7 19:37:59 2025 +0100 Fix UBSan build of ExternalProject_raptor Using an autogen.input somewhat different from what I usually use for ASan/UBSan builds, that caused > libtool: link: /home/sberg/llvm/inst/bin/clang -fdiagnostics-color=always -fsanitize=address -fsanitize-address-globals-dead-stripping -fsanitize-address-use-after-return=always -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize=nullability -fno-sanitize=function -O0 -Wp,-U_FORTIFY_SOURCE -fstrict-aliasing -fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang -debug-info-kind=constructor -ggnu-pubnames -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath-link -Wl,/home/sberg/lo-asanubsan/core/instdir/program -o .libs/rapper rapper.o ../src/.libs/libraptor2.so -Wl,-rpath -Wl,/usr/local/lib > /usr/bin/ld: /home/sberg/lo-asanubsan/core/instdir/program/libicuuc.so.75: undefined reference to `__ubsan_vptr_type_cache' > /usr/bin/ld: /home/sberg/lo-asanubsan/core/instdir/program/libicuuc.so.75: undefined reference to `__ubsan_handle_dynamic_type_cache_miss' > clang: error: linker command failed with exit code 1 (use -v to see invocation) > make[3]: *** [Makefile:540: rapper] Error 1 > make[3]: *** Waiting for unfinished jobs.... > libtool: link: /home/sberg/llvm/inst/bin/clang -fdiagnostics-color=always -fsanitize=address -fsanitize-address-globals-dead-stripping -fsanitize-address-use-after-return=always -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize=nullability -fno-sanitize=function -O0 -Wp,-U_FORTIFY_SOURCE -fstrict-aliasing -fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang -debug-info-kind=constructor -ggnu-pubnames -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath-link -Wl,/home/sberg/lo-asanubsan/core/instdir/program -o .libs/rdfdiff rdfdiff.o ../src/.libs/libraptor2.so -Wl,-rpath -Wl,/usr/local/lib > /usr/bin/ld: /home/sberg/lo-asanubsan/core/instdir/program/libicuuc.so.75: undefined reference to `__ubsan_vptr_type_cache' > /usr/bin/ld: /home/sberg/lo-asanubsan/core/instdir/program/libicuuc.so.75: undefined reference to `__ubsan_handle_dynamic_type_cache_miss' > clang: error: linker command failed with exit code 1 (use -v to see invocation) It appears that different configurations cause different libraries to be created in ExternalProject_raptor, so that's why I never ran into this before, but the solution is the same as in b3300387f2e14ea59c70db513a8f6eda6fe17afa "Fix UBSan build of ExternalProject_redland". Change-Id: I8bf955632af8c6490d9bd66a1d7dcd19b623c305 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179898 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/external/redland/raptor/ubsan.patch b/external/redland/raptor/ubsan.patch index 54b041e80f1f..58ef502f0400 100644 --- a/external/redland/raptor/ubsan.patch +++ b/external/redland/raptor/ubsan.patch @@ -9,3 +9,14 @@ /* Remove <component>/.. at the end of the path */ *prev = ' path_len -= (s-prev); +--- utils/Makefile.in ++++ utils/Makefile.in +@@ -174,7 +17,7 @@ + am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) + am__v_CC_0 = @echo " CC " $@; + am__v_CC_1 = +-CCLD = $(CC) ++CCLD = $(CXX) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@
