summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac15
-rw-r--r--external/liborcus/ExternalProject_liborcus.mk2
-rw-r--r--external/liborcus/libtool.patch.02
-rw-r--r--external/libwps/ExternalProject_libwps.mk2
-rw-r--r--external/libwps/libtool.patch.02
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk2
6 files changed, 16 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 5e846685cf1a..f651056fc11c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1418,7 +1418,10 @@ AC_ARG_ENABLE(icecream,
AC_ARG_ENABLE(ld,
AS_HELP_STRING([--enable-ld=<linker>],
[Use the specified linker. Both 'gold' and 'lld' linkers generally use less memory and link faster.
- By default tries to use the best linker possible, use --disable-ld to use the default linker.]),
+ By default tries to use the best linker possible, use --disable-ld to use the default linker.
+ If <linker> contains any ':', the part before the first ':' is used as the value of
+ -fuse-ld, while the part after the first ':' is used as the value of --ld-path (which is
+ needed for Clang 12).]),
,)
libo_FUZZ_ARG_ENABLE(cups,
@@ -4006,12 +4009,16 @@ dnl All checks for linker features/options should come after this.
dnl ===================================================================
check_use_ld()
{
- use_ld=$1
+ use_ld=-fuse-ld=${1%%:*}
+ use_ld_path=${1#*:}
+ if test "$use_ld_path" != "$1"; then
+ use_ld="$use_ld --ld-path=$use_ld_path"
+ fi
use_ld_fail_if_error=$2
use_ld_ok=
- AC_MSG_CHECKING([for -fuse-ld=$use_ld linker support])
+ AC_MSG_CHECKING([for $use_ld linker support])
use_ld_ldflags_save="$LDFLAGS"
- LDFLAGS="$LDFLAGS -fuse-ld=$use_ld"
+ LDFLAGS="$LDFLAGS $use_ld"
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <stdio.h>
],[
diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
index 38658cc81908..136fa538397e 100644
--- a/external/liborcus/ExternalProject_liborcus.mk
+++ b/external/liborcus/ExternalProject_liborcus.mk
@@ -86,7 +86,7 @@ ifeq ($(ENABLE_GDB_INDEX),TRUE)
liborcus_LDFLAGS+=-Wl,--gdb-index
liborcus_CXXFLAGS+=-ggnu-pubnames
ifneq ($(USE_LD),)
-liborcus_LDFLAGS += -fuse-ld=$(USE_LD)
+liborcus_LDFLAGS += $(USE_LD)
endif
endif
diff --git a/external/liborcus/libtool.patch.0 b/external/liborcus/libtool.patch.0
index 93b677303374..aa6ffa908ec3 100644
--- a/external/liborcus/libtool.patch.0
+++ b/external/liborcus/libtool.patch.0
@@ -5,7 +5,7 @@
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
- -specs=*|-fsanitize=*)
-+ -specs=*|-fsanitize=*|-fuse-ld=*)
++ -specs=*|-fsanitize=*|-fuse-ld=*|--ld-path=*)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
diff --git a/external/libwps/ExternalProject_libwps.mk b/external/libwps/ExternalProject_libwps.mk
index a7c37aeddf7e..0bcfc5ceb72d 100644
--- a/external/libwps/ExternalProject_libwps.mk
+++ b/external/libwps/ExternalProject_libwps.mk
@@ -38,7 +38,7 @@ ifeq ($(ENABLE_GDB_INDEX),TRUE)
libwps_LDFLAGS+=-Wl,--gdb-index
libwps_CXXFLAGS+=-ggnu-pubnames
ifneq ($(USE_LD),)
-libwps_LDFLAGS += -fuse-ld=$(USE_LD)
+libwps_LDFLAGS += $(USE_LD)
endif
endif
diff --git a/external/libwps/libtool.patch.0 b/external/libwps/libtool.patch.0
index d3989d79927d..f2e10ac3822f 100644
--- a/external/libwps/libtool.patch.0
+++ b/external/libwps/libtool.patch.0
@@ -5,7 +5,7 @@
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
- -fsanitize=*)
-+ -fsanitize=*|-fuse-ld=*)
++ -fsanitize=*|-fuse-ld=*|--ld-path=*)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 1707a7481ee6..11d85608a22d 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -38,7 +38,7 @@ endif
gb_COMPILER_SETUP :=
ifneq ($(USE_LD),)
-gb_LinkTarget_LDFLAGS += -fuse-ld=$(USE_LD)
+gb_LinkTarget_LDFLAGS += $(USE_LD)
endif
ifeq ($(strip $(gb_COMPILEROPTFLAGS)),)