summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/liborcus/ExternalProject_liborcus.mk8
-rw-r--r--external/liborcus/UnpackedTarball_liborcus.mk1
-rw-r--r--external/liborcus/libtool.patch.011
-rw-r--r--external/libwps/ExternalProject_libwps.mk23
-rw-r--r--external/libwps/UnpackedTarball_libwps.mk1
-rw-r--r--external/libwps/libtool.patch.011
6 files changed, 51 insertions, 4 deletions
diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
index f1e82f54f4f7..8cc1c030fa98 100644
--- a/external/liborcus/ExternalProject_liborcus.mk
+++ b/external/liborcus/ExternalProject_liborcus.mk
@@ -82,6 +82,14 @@ ifeq ($(OS),LINUX)
liborcus_LDFLAGS+=-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN
endif
+ifeq ($(ENABLE_GDB_INDEX),TRUE)
+liborcus_LDFLAGS+=-Wl,--gdb-index
+liborcus_CXXFLAGS+=-ggnu-pubnames
+ifneq ($(USE_LD),)
+liborcus_LDFLAGS += -fuse-ld=$(USE_LD)
+endif
+endif
+
$(call gb_ExternalProject_get_state_target,liborcus,build) :
$(call gb_ExternalProject_run,build,\
$(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index 6814782bd9e2..e1d810a49dc2 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
external/liborcus/gcc9.patch.0 \
external/liborcus/version.patch.0 \
+ external/liborcus/libtool.patch.0 \
external/liborcus/0001-Prevent-unsigned-integer-underflow.patch \
))
diff --git a/external/liborcus/libtool.patch.0 b/external/liborcus/libtool.patch.0
new file mode 100644
index 000000000000..93b677303374
--- /dev/null
+++ b/external/liborcus/libtool.patch.0
@@ -0,0 +1,11 @@
+--- ltmain.sh.sav 2018-09-14 23:47:13.000000000 +0200
++++ ltmain.sh 2019-05-05 23:11:30.406904472 +0200
+@@ -7278,7 +7278,7 @@ func_mode_link ()
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -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=*)
+ 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 9c6a5ea137b3..bb8a5d977b6e 100644
--- a/external/libwps/ExternalProject_libwps.mk
+++ b/external/libwps/ExternalProject_libwps.mk
@@ -25,6 +25,23 @@ libwps_CPPFLAGS+=-D_GLIBCXX_DEBUG
endif
endif
+libwps_CXXFLAGS=$(gb_CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))
+
+libwps_LDFLAGS=
+ifeq ($(OS),LINUX)
+ifeq ($(SYSTEM_REVENGE),)
+libwps_LDFLAGS+=-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN
+endif
+endif
+
+ifeq ($(ENABLE_GDB_INDEX),TRUE)
+libwps_LDFLAGS+=-Wl,--gdb-index
+libwps_CXXFLAGS+=-ggnu-pubnames
+ifneq ($(USE_LD),)
+libwps_LDFLAGS += -fuse-ld=$(USE_LD)
+endif
+endif
+
$(call gb_ExternalProject_get_state_target,libwps,build) :
$(call gb_ExternalProject_run,build,\
export PKG_CONFIG="" \
@@ -41,11 +58,9 @@ $(call gb_ExternalProject_get_state_target,libwps,build) :
$(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
--disable-werror \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
- CXXFLAGS="$(gb_CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))" \
+ $(if $(libwps_CXXFLAGS),CXXFLAGS='$(libwps_CXXFLAGS)') \
$(if $(libwps_CPPFLAGS),CPPFLAGS='$(libwps_CPPFLAGS)') \
- $(if $(filter LINUX,$(OS)),$(if $(SYSTEM_REVENGE),, \
- 'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \
- -Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN')) \
+ $(if $(libwps_LDFLAGS),LDFLAGS='$(libwps_LDFLAGS)') \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
&& $(MAKE) \
diff --git a/external/libwps/UnpackedTarball_libwps.mk b/external/libwps/UnpackedTarball_libwps.mk
index b148db2f93d2..a383a2d12377 100644
--- a/external/libwps/UnpackedTarball_libwps.mk
+++ b/external/libwps/UnpackedTarball_libwps.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwps))
$(eval $(call gb_UnpackedTarball_add_patches,libwps,\
$(if $(SYSTEM_REVENGE),,external/libwps/rpath.patch.0) \
+ external/libwps/libtool.patch.0 \
))
ifneq ($(OS),MACOSX)
diff --git a/external/libwps/libtool.patch.0 b/external/libwps/libtool.patch.0
new file mode 100644
index 000000000000..d3989d79927d
--- /dev/null
+++ b/external/libwps/libtool.patch.0
@@ -0,0 +1,11 @@
+--- ltmain.sh.sav 2018-08-02 14:21:34.000000000 +0200
++++ ltmain.sh 2019-05-05 22:04:15.433588776 +0200
+@@ -7277,7 +7277,7 @@ func_mode_link ()
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+- -fsanitize=*)
++ -fsanitize=*|-fuse-ld=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"