[Libreoffice-commits] core.git: Branch 'feature/windows-cross-build' - 351 commits - accessibility/inc accessibility/source avmedia/inc avmedia/source basctl/inc basctl/sdi basctl/source basctl/uiconfig basegfx/source basegfx/test basic/inc basic/qa basic/source binaryurp/source bin/find-can-be-private-symbols.classes.results bin/find-mergedlib-can-be-private.classes.results bin/get_config_variables bridges/inc bridges/source canvas/inc canvas/source chart2/inc chart2/Library_chartcore.mk chart2/qa chart2/source chart2/uiconfig chart2/workbench codemaker/source comphelper/source compilerplugins/clang config_host/config_skia.h.in config_host.mk.in configmgr/source configure.ac connectivity/inc connectivity/source cppcanvas/inc cppcanvas/source cppuhelper/inc cui/inc cui/source cui/uiconfig dbaccess/inc dbaccess/source dbaccess/uiconfig desktop/inc desktop/source distro-configs/Jenkins distro-configs/LibreOfficeWin32.conf distro-configs/LibreOfficeWin64.conf download.lst drawinglayer/inc drawinglay er/source editeng/source embedserv/source extensions/source external/apache-commons external/beanshell external/gpgmepp external/hsqldb external/jfreereport external/languagetool external/libassuan external/libgpg-error external/libjpeg-turbo external/liblangtag external/mdds external/pdfium external/redland external/rhino external/skia filter/qa filter/source forms/inc formula/source fpicker/source framework/inc framework/source .git-hooks/pre-commit .git-hooks/README helpcontent2 hwpfilter/source i18npool/source icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_dark_svg icon-themes/breeze_svg icon-themes/colibre icon-themes/colibre_svg icon-themes/elementary icon-themes/elementary_svg icon-themes/karasa_jaga icon-themes/karasa_jaga_svg icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-themes/sifr_svg icon-themes/sukapura icon-themes/sukapura_svg idl/inc idl/source include/avmedia include/basegfx include/oox include/osl include/rtl include/sfx2 inclu de/svl include/svtools include/svx include/unotools include/vcl include/xmloff libreofficekit/qa lotuswordpro/inc Makefile.gbuild Makefile.in oox/source postprocess/CustomTarget_images.mk postprocess/CustomTarget_registry.mk postprocess/Module_postprocess.mk postprocess/Rdb_services.mk qadevOOo/tests readlicense_oo/docs registry/source RepositoryExternal.mk RepositoryModule_build.mk sal/CompilerTest_sal_rtl_oustring.mk sal/CppunitTest_sal_rtl.mk sal/Module_sal.mk sal/osl sal/qa sal/rtl sal/util sax/source sc/inc sc/qa sc/sdi sc/source sc/uiconfig sdext/source sd/inc sd/qa sd/sdi sd/source sd/uiconfig sfx2/inc sfx2/qa sfx2/source sfx2/uiconfig shell/Module_shell.mk shell/source solenv/bin solenv/clang-format solenv/CompilerTest_compilerplugins_clang.mk solenv/flatpak-manifest.in solenv/gbuild solenv/gcc-wrappers solenv/sanitizers sot/inc starmath/inc starmath/sdi starmath/source stoc/source svl/inc svl/qa svl/source svtools/source svtools/uiconfig svx/inc svx/Library_svxcore.mk svx/M odule_svx.mk svx/qa svx/source svx/uiconfig sw/CppunitTest_sw_core_draw.mk sw/CppunitTest_sw_uibase_uiview.mk sw/CppunitTest_sw_updateall_object_replacements.mk sw/CppunitTest_sw_ww8export.mk sw/inc sw/Module_sw.mk sw/PythonTest_sw_python.mk sw/qa sw/sdi sw/source sw/uiconfig sysui/desktop toolkit/source tools/source translations uitest/ui_logger_dsl unotest/Module_unotest.mk unotools/source unoxml/Module_unoxml.mk uui/inc uui/source vcl/inc vcl/Library_vcl.mk vcl/Library_vclplug_win.mk vcl/osx vcl/qa vcl/qt5 vcl/skia vcl/source vcl/unx vcl/win writerfilter/source xmlhelp/source xmloff/Module_xmloff.mk xmloff/source xmloff/util xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source xmlsecurity/uiconfig xmlsecurity/workben
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 10 19:45:19 UTC 2020
Rebased ref, commits from common ancestor:
commit 7eb66500b126e8d68bd872982216bd7c928fd870
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Wed Jul 29 12:04:03 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Sep 10 21:43:12 2020 +0200
cross-build: fix Java NI linking
LibreOffice has a JNI component on Windows and Linux, the
officebean. Therefore we need a host JDK for linkage to the
jawt, and a build JDK to compile the Java code.
Change-Id: I4138628ab3ea2ef5900a5b4e9281050ae84e4eb5
diff --git a/config_host.mk.in b/config_host.mk.in
index e3014b015a48..6cea6ccf795e 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -267,7 +267,6 @@ export HARFBUZZ_LIBS=$(gb_SPACE)@HARFBUZZ_LIBS@
export GSSAPI_LIBS=@GSSAPI_LIBS@
export GSTREAMER_1_0_CFLAGS=$(gb_SPACE)@GSTREAMER_1_0_CFLAGS@
export GSTREAMER_1_0_LIBS=$(gb_SPACE)@GSTREAMER_1_0_LIBS@
-export GTHREAD_CFLAGS=$(gb_SPACE)@GTHREAD_CFLAGS@
export GTK3_CFLAGS=$(gb_SPACE)@GTK3_CFLAGS@
export GTK3_LIBS=$(gb_SPACE)@GTK3_LIBS@
export USING_X11=@USING_X11@
@@ -320,15 +319,18 @@ export IWYU_PATH=@IWYU_PATH@
export JAVACOMPILER=@JAVACOMPILER@
export JAVADOC=@JAVADOC@
export JAVADOCISGJDOC=@JAVADOCISGJDOC@
-export JAVAFLAGS=@JAVAFLAGS@
+export JAVACFLAGS=@JAVACFLAGS@
export JAVAIFLAGS=@JAVAIFLAGS@
+export JAVAIFLAGS_FOR_BUILD=@JAVAIFLAGS@
export JAVA_CLASSPATH_NOT_SET=@JAVA_CLASSPATH_NOT_SET@
export JAVAINTERPRETER=@JAVAINTERPRETER@
export JAVA_HOME=@JAVA_HOME@
+export JAVA_HOME_FOR_BUILD=@JAVA_HOME_FOR_BUILD@
export JAVA_SOURCE_VER=@JAVA_SOURCE_VER@
export JAVA_TARGET_VER=@JAVA_TARGET_VER@
export JAWTLIB=@JAWTLIB@
export JDK=@JDK@
+export JDK_FOR_BUILD=@JDK_FOR_BUILD@
export JFREEREPORT_JAR=@JFREEREPORT_JAR@
export JITC_PROCESSOR_TYPE=@JITC_PROCESSOR_TYPE@
export JVM_ONE_PATH_CHECK=@JVM_ONE_PATH_CHECK@
diff --git a/configure.ac b/configure.ac
index 6ae8f714e5fa..4115b98d861f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4932,7 +4932,18 @@ if test "$cross_compiling" = "yes"; then
sub_conf_opts=""
test -n "$enable_ccache" && sub_conf_opts="$sub_conf_opts --enable-ccache=$enable_ccache"
test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
- test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
+ test "$with_junit" = "no" && sub_conf_opts="$sub_conf_opts --without-junit"
+ if test -n "$ENABLE_JAVA"; then
+ if test "$_os" != "iOS" -a "$_os" != "Android"; then
+ if ! echo "$with_build_platform_configure_options" | grep -q -- '--with-jdk-home='; then
+ AC_MSG_ERROR([Missing build JDK (see --with-build-platform-configure-options, --with-jdk-home and use 'cygpath -ms' on Windows)!])
+ fi
+ else
+ test -n "$with_jdk_home" && sub_conf_opts="$sub_conf_opts --with-jdk-home=$with_jdk_home"
+ fi
+ else
+ sub_conf_opts="$sub_conf_opts --without-java"
+ fi
test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu"
sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
@@ -4953,7 +4964,6 @@ if test "$cross_compiling" = "yes"; then
--disable-skia \
--enable-icecream="$enable_icecream" \
--without-doxygen \
- --without-java \
--without-webdav \
--with-parallelism="$with_parallelism" \
--with-theme="$with_theme" \
@@ -5005,15 +5015,53 @@ if test "$cross_compiling" = "yes"; then
mkdir -p ../config_build
mv config_host/*.h ../config_build
+ # all these will get a _FOR_BUILD postfix
+ DIRECT_FOR_BUILD_SETTINGS="
+ CC
+ CXX
+ ILIB
+ JAVA_HOME
+ JAVAIFLAGS
+ JDK
+ LIBO_BIN_FOLDER
+ LIBO_LIB_FOLDER
+ LIBO_URE_LIB_FOLDER
+ LIBO_URE_MISC_FOLDER
+ OS
+ SDKDIRNAME
+ SYSTEM_LIBXML
+ SYSTEM_LIBXSLT
+"
+ # these overwrite host config with build config
+ OVERWRITING_SETTINGS="
+ ANT
+ ANT_HOME
+ ANT_LIB
+ HSQLDB_USE_JDBC_4_1
+ JAVA_CLASSPATH_NOT_SET
+ JAVA_SOURCE_VER
+ JAVA_TARGET_VER
+ JAVACFLAGS
+ JAVACOMPILER
+ JAVADOC
+ JAVADOCISGJDOC
+"
+ # these need some special handling
+ EXTRA_HANDLED_SETTINGS="
+ INSTDIR
+ INSTROOT
+ PATH
+ WORKDIR
+"
OLD_PATH=$PATH
- . ./bin/get_config_variables CC CXX ILIB INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER LIBO_URE_MISC_FOLDER OS PATH SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT WORKDIR
+ . ./bin/get_config_variables $DIRECT_FOR_BUILD_SETTINGS $OVERWRITING_SETTINGS $EXTRA_HANDLED_SETTINGS
BUILD_PATH=$PATH
PATH=$OLD_PATH
line=`echo "LO_PATH_FOR_BUILD='${BUILD_PATH}'" | sed -e 's,/CONF-FOR-BUILD,,g'`
echo "$line" >>build-config
- for V in CC CXX ILIB LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER LIBO_URE_MISC_FOLDER OS SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT; do
+ for V in $DIRECT_FOR_BUILD_SETTINGS; do
VV='$'$V
VV=`eval "echo $VV"`
if test -n "$VV"; then
@@ -5022,6 +5070,15 @@ if test "$cross_compiling" = "yes"; then
fi
done
+ for V in $OVERWRITING_SETTINGS; do
+ VV='$'$V
+ VV=`eval "echo $VV"`
+ if test -n "$VV"; then
+ line=${V}='${'${V}:-$VV'}'
+ echo "$line" >>build-config
+ fi
+ done
+
for V in INSTDIR INSTROOT WORKDIR; do
VV='$'$V
VV=`eval "echo $VV"`
@@ -7729,11 +7786,9 @@ dnl ===================================================================
dnl Checks for JDK.
dnl ===================================================================
-# Note that JAVA_HOME as for now always means the *build* platform's
-# JAVA_HOME. Whether all the complexity here actually is needed any
-# more or not, no idea.
+# Whether all the complexity here actually is needed any more or not, no idea.
-if test "$ENABLE_JAVA" != ""; then
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
_gij_longver=0
AC_MSG_CHECKING([the installed JDK])
if test -n "$JAVAINTERPRETER"; then
@@ -7769,21 +7824,27 @@ if test "$ENABLE_JAVA" != ""; then
# set to limit VM usage for JunitTests
JAVAIFLAGS=-Xmx64M
# set to limit VM usage for javac
- JAVAFLAGS=-J-Xmx128M
+ JAVACFLAGS=-J-Xmx128M
fi
else
AC_MSG_ERROR([Java not found. You need at least JDK 9])
fi
else
- dnl Java disabled
- JAVA_HOME=
- export JAVA_HOME
+ if test -z "$ENABLE_JAVA"; then
+ dnl Java disabled
+ JAVA_HOME=
+ export JAVA_HOME
+ elif test "$cross_compiling" = "yes"; then
+ # Just assume compatibility of build and host JDK
+ JDK=$JDK_FOR_BUILD
+ JAVAIFLAGS=$JAVAIFLAGS_FOR_BUILD
+ fi
fi
dnl ===================================================================
dnl Checks for javac
dnl ===================================================================
-if test "$ENABLE_JAVA" != ""; then
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
javacompiler="javac"
: ${JAVA_SOURCE_VER=8}
: ${JAVA_TARGET_VER=8}
@@ -7810,7 +7871,7 @@ fi
dnl ===================================================================
dnl Checks for javadoc
dnl ===================================================================
-if test "$ENABLE_JAVA" != ""; then
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
if test -z "$with_jdk_home"; then
AC_PATH_PROG(JAVADOC, javadoc)
else
@@ -7836,6 +7897,7 @@ if test "$ENABLE_JAVA" != ""; then
JAVADOCISGJDOC="yes"
fi
fi
+AC_SUBST(JAVADOC)
AC_SUBST(JAVADOCISGJDOC)
if test "$ENABLE_JAVA" != ""; then
@@ -8063,16 +8125,18 @@ if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
fi
SOLARINC="$SOLARINC $JAVAINC"
+AC_SUBST(JAVACFLAGS)
AC_SUBST(JAVACOMPILER)
-AC_SUBST(JAVADOC)
AC_SUBST(JAVAINTERPRETER)
AC_SUBST(JAVAIFLAGS)
-AC_SUBST(JAVAFLAGS)
+AC_SUBST(JAVAIFLAGS_FOR_BUILD)
AC_SUBST(JAVA_CLASSPATH_NOT_SET)
AC_SUBST(JAVA_HOME)
+AC_SUBST(JAVA_HOME_FOR_BUILD)
+AC_SUBST(JDK)
+AC_SUBST(JDK_FOR_BUILD)
AC_SUBST(JAVA_SOURCE_VER)
AC_SUBST(JAVA_TARGET_VER)
-AC_SUBST(JDK)
dnl ===================================================================
@@ -9294,7 +9358,7 @@ fi
dnl ===================================================================
dnl Check for system hsqldb
dnl ===================================================================
-if test "$with_java" != "no"; then
+if test "$with_java" != "no" -a "$cross_compiling" != "yes"; then
HSQLDB_USE_JDBC_4_1=
AC_MSG_CHECKING([which hsqldb to use])
if test "$with_system_hsqldb" = "yes"; then
@@ -9356,10 +9420,14 @@ if test "$with_java" != "no"; then
AC_MSG_RESULT([no])
fi
fi
- AC_SUBST(SYSTEM_HSQLDB)
- AC_SUBST(HSQLDB_JAR)
- AC_SUBST([HSQLDB_USE_JDBC_4_1])
+else
+ if test "$with_java" != "no" -a -z "$HSQLDB_JAR"; then
+ BUILD_TYPE="$BUILD_TYPE HSQLDB"
+ fi
fi
+AC_SUBST(SYSTEM_HSQLDB)
+AC_SUBST(HSQLDB_JAR)
+AC_SUBST([HSQLDB_USE_JDBC_4_1])
dnl ===================================================================
dnl Check for PostgreSQL stuff
@@ -12634,7 +12702,7 @@ dnl ===================================================================
dnl Test for the presence of Ant and that it works
dnl ===================================================================
-if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE"; then
+if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE" -a "$cross_compiling" != "yes"; then
ANT_HOME=; export ANT_HOME
WITH_ANT_HOME=; export WITH_ANT_HOME
if test -z "$with_ant_home" -a -n "$LODE_HOME" ; then
@@ -12725,8 +12793,6 @@ EOF
PathFormat "$ANT"
ANT="$formatted_path"
fi
- AC_SUBST(ANT_HOME)
- AC_SUBST(ANT)
dnl Checking for ant.jar
if test "$ANT_HOME" != "NO_ANT_HOME"; then
@@ -12760,7 +12826,6 @@ EOF
ANT_LIB="$formatted_path"
AC_MSG_RESULT([Ant lib directory found.])
fi
- AC_SUBST(ANT_LIB)
ant_minver=1.6.0
ant_minminor1=`echo $ant_minver | cut -d"." -f2`
@@ -12782,9 +12847,13 @@ EOF
rm -f conftest* core core.* *.core
fi
+AC_SUBST(ANT)
+AC_SUBST(ANT_HOME)
+AC_SUBST(ANT_LIB)
OOO_JUNIT_JAR=
-if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
+HAMCREST_JAR=
+if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" -a "$cross_compiling" != "yes"; then
AC_MSG_CHECKING([for JUnit 4])
if test "$with_junit" = "yes"; then
if test -n "$LODE_HOME" -a -e "$LODE_HOME/opt/share/java/junit.jar" ; then
@@ -12814,13 +12883,9 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
fi
rm -f conftest.class conftest.java
if test $OOO_JUNIT_JAR != ""; then
- BUILD_TYPE="$BUILD_TYPE QADEVOOO"
+ BUILD_TYPE="$BUILD_TYPE QADEVOOO"
fi
-fi
-AC_SUBST(OOO_JUNIT_JAR)
-HAMCREST_JAR=
-if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
AC_MSG_CHECKING([for included Hamcrest])
printf 'import org.hamcrest.BaseDescription;' > conftest.java
if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
@@ -12851,6 +12916,7 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
fi
rm -f conftest.class conftest.java
fi
+AC_SUBST(OOO_JUNIT_JAR)
AC_SUBST(HAMCREST_JAR)
diff --git a/external/apache-commons/ExternalProject_apache_commons_logging.mk b/external/apache-commons/ExternalProject_apache_commons_logging.mk
index 640810d9c1ed..7c689d18c443 100644
--- a/external/apache-commons/ExternalProject_apache_commons_logging.mk
+++ b/external/apache-commons/ExternalProject_apache_commons_logging.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,apache_commons_logging,\
$(call gb_ExternalProject_get_state_target,apache_commons_logging,build) :
$(call gb_Trace_StartRange,apache_commons_logging,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
ANT_OPTS="$$ANT_OPTS -Dfile.encoding=ISO-8859-1" \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
diff --git a/external/beanshell/ExternalProject_beanshell.mk b/external/beanshell/ExternalProject_beanshell.mk
index d6ce0af49ebe..450ac2b706dd 100644
--- a/external/beanshell/ExternalProject_beanshell.mk
+++ b/external/beanshell/ExternalProject_beanshell.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,beanshell,\
$(call gb_ExternalProject_get_state_target,beanshell,build) :
$(call gb_Trace_StartRange,beanshell,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/hsqldb/ExternalProject_hsqldb.mk b/external/hsqldb/ExternalProject_hsqldb.mk
index d253334549b7..4d5f5f8786f0 100644
--- a/external/hsqldb/ExternalProject_hsqldb.mk
+++ b/external/hsqldb/ExternalProject_hsqldb.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,hsqldb,\
$(call gb_ExternalProject_get_state_target,hsqldb,build) :
$(call gb_Trace_StartRange,hsqldb,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build/build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk b/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
index ffa12623d191..6a782b4dc4ff 100644
--- a/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_flow_engine,\
$(call gb_ExternalProject_get_state_target,jfreereport_flow_engine,build) :
$(call gb_Trace_StartRange,jfreereport_flow_engine,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_flute.mk b/external/jfreereport/ExternalProject_jfreereport_flute.mk
index a9cb63819c87..120c98cbdbb4 100644
--- a/external/jfreereport/ExternalProject_jfreereport_flute.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_flute.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_flute,\
$(call gb_ExternalProject_get_state_target,jfreereport_flute,build) :
$(call gb_Trace_StartRange,jfreereport_flute,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libbase.mk b/external/jfreereport/ExternalProject_jfreereport_libbase.mk
index 2e236d192143..6d97ffa5762a 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libbase.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libbase.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libbase,\
$(call gb_ExternalProject_get_state_target,jfreereport_libbase,build) :
$(call gb_Trace_StartRange,jfreereport_libbase,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libfonts.mk b/external/jfreereport/ExternalProject_jfreereport_libfonts.mk
index b14644c80c3b..9a6edf0b891f 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libfonts.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libfonts.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libfonts,\
$(call gb_ExternalProject_get_state_target,jfreereport_libfonts,build) :
$(call gb_Trace_StartRange,jfreereport_libfonts,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libformula.mk b/external/jfreereport/ExternalProject_jfreereport_libformula.mk
index 95c650e8fe64..1182873e66aa 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libformula.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libformula.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libformula,\
$(call gb_ExternalProject_get_state_target,jfreereport_libformula,build) :
$(call gb_Trace_StartRange,jfreereport_libformula,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_liblayout.mk b/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
index 519368c2b649..fb3f2b9fc67a 100644
--- a/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_liblayout,\
$(call gb_ExternalProject_get_state_target,jfreereport_liblayout,build) :
$(call gb_Trace_StartRange,jfreereport_liblayout,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libloader.mk b/external/jfreereport/ExternalProject_jfreereport_libloader.mk
index 2b37d9a224b8..ddb34e3d8614 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libloader.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libloader.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libloader,\
$(call gb_ExternalProject_get_state_target,jfreereport_libloader,build) :
$(call gb_Trace_StartRange,jfreereport_libloader,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_librepository.mk b/external/jfreereport/ExternalProject_jfreereport_librepository.mk
index e95610b854c6..59fa203fbe63 100644
--- a/external/jfreereport/ExternalProject_jfreereport_librepository.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_librepository.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_librepository,\
$(call gb_ExternalProject_get_state_target,jfreereport_librepository,build) :
$(call gb_Trace_StartRange,jfreereport_librepository,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libserializer.mk b/external/jfreereport/ExternalProject_jfreereport_libserializer.mk
index 34614fb08b6a..1226e14206d4 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libserializer.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libserializer.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libserializer,\
$(call gb_ExternalProject_get_state_target,jfreereport_libserializer,build) :
$(call gb_Trace_StartRange,jfreereport_libserializer,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libxml.mk b/external/jfreereport/ExternalProject_jfreereport_libxml.mk
index 478a75747dc6..295573ec67ab 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libxml.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libxml.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libxml,\
$(call gb_ExternalProject_get_state_target,jfreereport_libxml,build) :
$(call gb_Trace_StartRange,jfreereport_libxml,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_sac.mk b/external/jfreereport/ExternalProject_jfreereport_sac.mk
index b78d8a970b15..a33186183ee7 100644
--- a/external/jfreereport/ExternalProject_jfreereport_sac.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_sac.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_sac,\
$(call gb_ExternalProject_get_state_target,jfreereport_sac,build) :
$(call gb_Trace_StartRange,jfreereport_sac,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/languagetool/ExternalProject_languagetool.mk b/external/languagetool/ExternalProject_languagetool.mk
index 70b22a6aa10f..ed70df41ad69 100644
--- a/external/languagetool/ExternalProject_languagetool.mk
+++ b/external/languagetool/ExternalProject_languagetool.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_ExternalProject_use_jars,languagetool,\
$(call gb_ExternalProject_get_state_target,languagetool,build) : \
$(call gb_Jar_get_target,libreoffice)
cd "$(call gb_UnpackedTarball_get_dir,languagetool)" && \
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/external/rhino/ExternalProject_rhino.mk b/external/rhino/ExternalProject_rhino.mk
index 4d1b3e54409c..6ef30ca34f24 100644
--- a/external/rhino/ExternalProject_rhino.mk
+++ b/external/rhino/ExternalProject_rhino.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,rhino,\
$(call gb_ExternalProject_get_state_target,rhino,build) :
$(call gb_Trace_StartRange,rhino,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+ JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
$(ICECREAM_RUN) "$(ANT)" \
$(if $(verbose),-v,-q) \
-f build.xml \
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index 1bbfeca166eb..9592fbbad6a6 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -64,7 +64,7 @@ define gb_Jar__command
$(gb_Jar_JARCOMMAND) cfm $(2) $(call gb_Jar_get_manifest_target,$(1)) \
META-INF $(PACKAGEROOTS) $(PACKAGEFILES) \
$(foreach root,$(PACKAGEDIRS),&& cd $(dir $(root)) && $(gb_Jar_JARCOMMAND) uf $(2) $(notdir $(root))) \
- || (rm $(2); false) )
+ || (rm -f $(2); false) )
endef
# clean target reuses clean target of ClassSet
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index 2c3f2dc31c94..39887dee6e5b 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -17,7 +17,7 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-gb_JavaClassSet_JAVACCOMMAND = $(ICECREAM_RUN) $(JAVACOMPILER) $(JAVAFLAGS) \
+gb_JavaClassSet_JAVACCOMMAND = $(ICECREAM_RUN) $(JAVACOMPILER) $(JAVACFLAGS) \
-encoding utf8 \
--release $(1) \
$(if $(JAVA_CLASSPATH_NOT_SET),-Xlint:-options)
commit 46d2c93efc6dd6e89cb5ba6aa028380db686fdae
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jul 14 23:06:03 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Sep 10 21:43:11 2020 +0200
WIN cross: fix gpg-related library builds
Cross compiling these libraries requires to supply the cross-
compiler via the CC_FOR_BUILD environment variable. Since we have
to use the gcc-wrappers, we now need two different invocations
with different inclues and libraries, but just have fixed
environment variables. Also, the CC_FOR_BUILD clashes with LO's
own variant, but that is easy to fix.
So this change includes:
- gcc-wrappers: new option --wrapper-env-prefix to add a prefix
to the environment variable names
- gcc-wrappers: new option --wrapper-print-cmdline to dump the
real command called, when a verbose build is executed
- gcc-wrappers: default to exe, if the output has no extension
- unify build flags for gpg related libraries
Change-Id: I4e6a6ba3c6e09237c8ffefa40ce61131290a3852
diff --git a/config_host.mk.in b/config_host.mk.in
index bcebdb669e29..e3014b015a48 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -62,6 +62,7 @@ export BZIP2_LIBS=$(gb_SPACE)@BZIP2_LIBS@
export CAIRO_CFLAGS=$(gb_SPACE)@CAIRO_CFLAGS@
export CAIRO_LIBS=$(gb_SPACE)@CAIRO_LIBS@
export CC=@CC@
+export CC_FOR_BUILD=@CC_FOR_BUILD@
export CCACHE_DEPEND_MODE=@CCACHE_DEPEND_MODE@
export CDR_CFLAGS=$(gb_SPACE)@CDR_CFLAGS@
export CDR_LIBS=$(gb_SPACE)@CDR_LIBS@
@@ -108,6 +109,7 @@ export CURL_LIBS=$(gb_SPACE)@CURL_LIBS@
export CUSTOM_BRAND_DIR=@CUSTOM_BRAND_DIR@
export CUSTOM_BRAND_IMAGES=@CUSTOM_BRAND_IMAGES@
export CXX=@CXX@
+export CXX_FOR_BUILD=@CXX_FOR_BUILD@
export CXX_X64_BINARY=@CXX_X64_BINARY@
export CXX_X86_BINARY=@CXX_X86_BINARY@
@x_CXXFLAGS@ export CXXFLAGS=@CXXFLAGS@
@@ -305,6 +307,7 @@ export ICU_RECLASSIFIED_PREPEND_SET_EMPTY=@ICU_RECLASSIFIED_PREPEND_SET_EMPTY@
export ICU_UCHAR_TYPE=@ICU_UCHAR_TYPE@
export INTROSPECTION_SCANNER=@INTROSPECTION_SCANNER@
export ILIB=@ILIB@
+export ILIB_FOR_BUILD=@ILIB_FOR_BUILD@
export INSTALLDIR=@INSTALLDIR@
export INSTALLDIRNAME=@INSTALLDIRNAME@
export INSTALL_NAME_TOOL=@INSTALL_NAME_TOOL@
diff --git a/configure.ac b/configure.ac
index 6b7c4562db8e..6ae8f714e5fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5006,14 +5006,14 @@ if test "$cross_compiling" = "yes"; then
mv config_host/*.h ../config_build
OLD_PATH=$PATH
- . ./bin/get_config_variables CC CXX INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER LIBO_URE_MISC_FOLDER OS PATH SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT WORKDIR
+ . ./bin/get_config_variables CC CXX ILIB INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER LIBO_URE_MISC_FOLDER OS PATH SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT WORKDIR
BUILD_PATH=$PATH
PATH=$OLD_PATH
line=`echo "LO_PATH_FOR_BUILD='${BUILD_PATH}'" | sed -e 's,/CONF-FOR-BUILD,,g'`
echo "$line" >>build-config
- for V in CC CXX LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER LIBO_URE_MISC_FOLDER OS SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT; do
+ for V in CC CXX ILIB LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER LIBO_URE_MISC_FOLDER OS SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT; do
VV='$'$V
VV=`eval "echo $VV"`
if test -n "$VV"; then
@@ -5065,6 +5065,8 @@ AC_SUBST(LIBO_URE_LIB_FOLDER_FOR_BUILD)
AC_SUBST(LIBO_URE_MISC_FOLDER_FOR_BUILD)
AC_SUBST(SDKDIRNAME_FOR_BUILD)
AC_SUBST(WORKDIR_FOR_BUILD)
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CXX_FOR_BUILD)
dnl ===================================================================
dnl Check for syslog header
@@ -13361,8 +13363,12 @@ if test "$build_os" = "cygwin"; then
ILIB="$ILIB;$DOTNET_FRAMEWORK_HOME/Lib/um/$WIN_HOST_ARCH"
fi
- AC_SUBST(ILIB)
+ if test "$cross_compiling" != "yes"; then
+ ILIB_FOR_BUILD="$ILIB"
+ fi
fi
+AC_SUBST(ILIB)
+AC_SUBST(ILIB_FOR_BUILD)
# ===================================================================
# Creating bigger shared library to link against
diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk
index c2263413ee18..313f1e41be83 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -21,12 +21,11 @@ $(eval $(call gb_ExternalProject_use_externals,gpgmepp,\
))
ifeq ($(COM),MSC)
-gb_ExternalProject_gpgmepp_host := $(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32)
-gb_ExternalProject_gpgmepp_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64)
-$(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_get_target,cpp)
+$(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_get_target_for_build,cpp)
$(call gb_Trace_StartRange,gpgmepp,EXTERNAL)
- $(call gb_ExternalProject_run,build,\
- autoreconf \
+ $(call gb_ExternalProject_run,build, \
+ $(gb_WIN_GPG_cross_setup_exports) \
+ && autoreconf \
&& ./configure \
--disable-shared \
--disable-languages \
@@ -38,8 +37,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \
- --host=$(gb_ExternalProject_gpgmepp_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ $(gb_WIN_GPG_platform_switches) \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk
index 565d38ff9a1c..e4e24aeac7fd 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -19,13 +19,13 @@ $(eval $(call gb_ExternalProject_use_externals,libassuan,\
libgpg-error \
))
+
ifeq ($(COM),MSC)
-gb_ExternalProject_libassuan_host := $(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32)
-gb_ExternalProject_libassuan_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64)
-$(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executable_get_target,cpp)
+$(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executable_get_target_for_build,cpp)
$(call gb_Trace_StartRange,libassuan,EXTERNAL)
$(call gb_ExternalProject_run,build,\
- autoreconf \
+ $(gb_WIN_GPG_cross_setup_exports) \
+ && autoreconf \
&& ./configure \
--enable-static \
--disable-shared \
@@ -34,8 +34,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executabl
CXXFLAGS="$(CXXFLAGS)" \
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
- --host=$(gb_ExternalProject_libassuan_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ $(gb_WIN_GPG_platform_switches) \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk
index cf0b594dca24..736079c77aec 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ b/external/libgpg-error/ExternalProject_libgpg-error.mk
@@ -16,20 +16,18 @@ $(eval $(call gb_ExternalProject_register_targets,libgpg-error,\
$(eval $(call gb_ExternalProject_use_autoconf,libgpg-error,build))
ifeq ($(COM),MSC)
-gb_ExternalProject_libgpg-error_host := $(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32)
-gb_ExternalProject_libgpg-error_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64)
-$(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Executable_get_target,cpp)
+$(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Executable_get_target_for_build,cpp)
$(call gb_Trace_StartRange,libgpg-error,EXTERNAL)
$(call gb_ExternalProject_run,build,\
- MAKE=$(MAKE) ./configure \
+ $(gb_WIN_GPG_cross_setup_exports) \
+ && MAKE=$(MAKE) ./configure \
--enable-static \
--disable-shared \
--disable-rpath \
--disable-languages \
--disable-doc \
--disable-tests \
- --host=$(gb_ExternalProject_libgpg-error_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ $(gb_WIN_GPG_platform_switches) \
&& $(MAKE) \
)
$(call gb_Trace_EndRange,libgpg-error,EXTERNAL)
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index e78748adc6a8..ee51f6caf2a1 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -12573,8 +12573,6 @@ smoketest/libtest.cxx
smoketest/smoketest.cxx
solenv/bin/concat-deps.c
solenv/gbuildtojson/gbuildtojson.cxx
-solenv/gcc-wrappers/g++.cxx
-solenv/gcc-wrappers/gcc.cxx
solenv/gcc-wrappers/wrapper.cxx
soltools/cpp/_cpp.c
soltools/cpp/_eval.c
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 996c5a4b06c5..c27fc0c95446 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -598,10 +598,10 @@ endef
gb_AUTOCONF_WRAPPERS = \
REAL_CC="$(shell cygpath -w $(filter-out -%,$(CC)))" \
REAL_CC_FLAGS="$(filter -%,$(CC))" \
- CC="$(call gb_Executable_get_target_for_build,gcc-wrapper)" \
+ CC="$(call gb_Executable_get_target_for_build,gcc-wrapper) $(if $(verbose),--wrapper-print-cmdline)" \
REAL_CXX="$(shell cygpath -w $(filter-out -%,$(CXX)))" \
REAL_CXX_FLAGS="$(filter -%,$(CXX))" \
- CXX="$(call gb_Executable_get_target_for_build,g++-wrapper)" \
+ CXX="$(call gb_Executable_get_target_for_build,g++-wrapper) $(if $(verbose),--wrapper-print-cmdline)" \
LD="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo"
gb_ExternalProject_INCLUDE := \
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index 05de2691a03e..5a02731bac7b 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -361,4 +361,12 @@ define gb_Helper_extend_ld_path
$(gb_Helper_set_ld_path)';$(shell cygpath $(gb_MAKE_CYGPATH) $(1))'
endef
+# common macros to build GPG related libraries
+# we explicitly have to replace cygwin with mingw32 for the host, but the build must stay cygwin, or cmd.exe processes will be spawned
+gb_WIN_GPG_WINDRES_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64)
+gb_WIN_GPG_platform_switches := --build=$(BUILD_PLATFORM) --host=$(subst cygwin,mingw32,$(HOST_PLATFORM))
+gb_WIN_GPG_cross_setup_exports = export REAL_BUILD_CC="$(CC_FOR_BUILD)" \
+ && export CC_FOR_BUILD="$(call gb_Executable_get_target_for_build,gcc-wrapper) $(if $(verbose),--wrapper-print-cmdline) --wrapper-env-prefix=REAL_BUILD_ $(SOLARINC) -L$(subst ;, -L,$(ILIB_FOR_BUILD))" \
+ && export RC='windres -O COFF --target=$(gb_WIN_GPG_WINDRES_target) --preprocessor='\''$(call gb_Executable_get_target_for_build,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\'
+
# vim: set noet sw=4:
diff --git a/solenv/gcc-wrappers/g++.cxx b/solenv/gcc-wrappers/g++.cxx
index 626b1643590c..2f99d4606ac7 100644
--- a/solenv/gcc-wrappers/g++.cxx
+++ b/solenv/gcc-wrappers/g++.cxx
@@ -9,19 +9,21 @@
#include "wrapper.hxx"
-int main(int argc, char *argv[]) {
+int main(int argc, char* argv[])
+{
vector<string> rawargs(argv + 1, argv + argc);
- string command=getexe("REAL_CXX");
- string flags=getexe("REAL_CXX_FLAGS", true);
+ string env_prefix; // defaults to REAL_
+ bool verbose = false;
+ string args = processccargs(rawargs, env_prefix, verbose);
- string args=flags.empty() ? string() : flags + " ";
- args += processccargs(rawargs);
+ string command = getexe(env_prefix + "CXX");
+ string flags = getexe(env_prefix + "CXX_FLAGS", true);
+ args.insert(0, flags.empty() ? string() : flags + " ");
setupccenv();
- return startprocess(command,args);
-
+ return startprocess(command, args, verbose);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/gcc.cxx b/solenv/gcc-wrappers/gcc.cxx
index f34c2dba8c99..8accb8216a11 100644
--- a/solenv/gcc-wrappers/gcc.cxx
+++ b/solenv/gcc-wrappers/gcc.cxx
@@ -9,19 +9,21 @@
#include "wrapper.hxx"
-int main(int argc, char *argv[]) {
+int main(int argc, char* argv[])
+{
vector<string> rawargs(argv + 1, argv + argc);
- string command=getexe("REAL_CC");
- string flags=getexe("REAL_CC_FLAGS", true);
+ string env_prefix; // defaults to REAL_
+ bool verbose = false;
+ string args = processccargs(rawargs, env_prefix, verbose);
- string args=flags.empty() ? string() : flags + " ";
- args += processccargs(rawargs);
+ string command = getexe(env_prefix + "CC");
+ string flags = getexe(env_prefix + "CC_FLAGS", true);
+ args.insert(0, flags.empty() ? string() : flags + " ");
setupccenv();
- return startprocess(command,args);
-
+ return startprocess(command, args, verbose);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index b156c89dc220..56936155fa47 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -82,7 +82,13 @@ void setupccenv() {
}
}
-string processccargs(vector<string> rawargs) {
+string processccargs(vector<string> rawargs, string &env_prefix, bool &verbose)
+{
+ // default env var prefix
+ env_prefix = "REAL_";
+ verbose = false;
+ bool env_prefix_next_arg = false;
+
// suppress the msvc banner
string args=" -nologo";
// TODO: should these options be enabled globally?
@@ -101,6 +107,13 @@ string processccargs(vector<string> rawargs) {
string linkargs(" -link -debug");
for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) {
+ if (env_prefix_next_arg)
+ {
+ env_prefix = *i;
+ env_prefix_next_arg = false;
+ continue;
+ }
+
args.append(" ");
if(*i == "-o") {
// TODO: handle more than just exe output
@@ -121,10 +134,15 @@ string processccargs(vector<string> rawargs) {
linkargs.append(" -dll -out:");
linkargs.append(*i);
}
+ else if (dot == string::npos)
+ {
+ args.append("-Fe");
+ args.append(*i + ".exe");
+ }
else
{
cerr << "unknown -o argument - please adapt gcc-wrapper for \""
- << (*i) << "\"";
+ << (*i) << "\"" << endl;
exit(1);
}
}
@@ -159,14 +177,41 @@ string processccargs(vector<string> rawargs) {
}
else if(*i == "-Werror")
args.append("-WX");
+ else if (*i == "--wrapper-print-cmdline")
+ verbose = true;
else
- args.append(*i);
+ {
+ size_t pos = i->find("=");
+ if (0 == i->compare(0, pos, "--wrapper-env-prefix"))
+ {
+ if (pos == string::npos)
+ env_prefix_next_arg = true;
+ else if (pos + 1 == i->length())
+ {
+ // bailout - missing arg
+ env_prefix_next_arg = true;
+ break;
+ }
+ else
+ env_prefix = i->substr(pos + 1);
+ }
+ else
+ args.append(*i);
+ }
}
+
+ if (env_prefix_next_arg)
+ {
+ cerr << "wrapper-env-prefix needs an argument!" << endl;
+ exit(1);
+ }
+
args.append(linkargs);
return args;
}
-int startprocess(string command, string args) {
+int startprocess(string command, string args, bool verbose)
+{
STARTUPINFO si;
PROCESS_INFORMATION pi;
SECURITY_ATTRIBUTES sa;
@@ -200,7 +245,8 @@ int startprocess(string command, string args) {
auto cmdline = "\"" + command + "\" " + args;
- //cerr << "CMD= " << command << " " << args << endl;
+ if (verbose)
+ cerr << "CMD= " << command << " " << args << endl;
// Commandline may be modified by CreateProcess
char* cmdlineBuf=_strdup(cmdline.c_str());
diff --git a/solenv/gcc-wrappers/wrapper.hxx b/solenv/gcc-wrappers/wrapper.hxx
index 789bc9280267..208d9b82c449 100644
--- a/solenv/gcc-wrappers/wrapper.hxx
+++ b/solenv/gcc-wrappers/wrapper.hxx
@@ -20,9 +20,9 @@ string getexe(string exename, bool maybeempty = false);
void setupccenv();
-string processccargs(vector<string> rawargs);
+string processccargs(vector<string> rawargs, string& env_prefix, bool& verbose);
-int startprocess(string command, string args);
+int startprocess(string command, string args, bool verbose);
#endif // INCLUDED_SOLENV_GCC_WRAPPERS_WRAPPER_HXX
commit d491b3f674a10626bcf8b30525c343e77f607d87
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat Jul 18 04:00:00 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Sep 10 21:43:11 2020 +0200
WIN cross: fix libjpeg-turbo build
Change-Id: Iae4696df714ba27c0053f7ca3eb485816e8e58c7
diff --git a/external/libjpeg-turbo/ExternalProject_libjpeg-turbo.mk b/external/libjpeg-turbo/ExternalProject_libjpeg-turbo.mk
index a6c8f0d77a2f..a5cd4c57ddc7 100644
--- a/external/libjpeg-turbo/ExternalProject_libjpeg-turbo.mk
+++ b/external/libjpeg-turbo/ExternalProject_libjpeg-turbo.mk
@@ -28,8 +28,8 @@ $(call gb_ExternalProject_get_state_target,libjpeg-turbo,configure) :
$(call gb_Trace_StartRange,libjpeg-turbo,EXTERNAL)
$(call gb_ExternalProject_run,configure,\
MAKE=$(MAKE) ./configure \
- --build=$(if $(filter WNT,$(OS)),$(if $(filter INTEL,$(CPUNAME)),i686-pc-cygwin,x86_64-pc-cygwin),$(BUILD_PLATFORM)) \
- --host=$(if $(filter WNT,$(OS)),$(if $(filter INTEL,$(CPUNAME)),i686-pc-cygwin,x86_64-pc-cygwin),$(HOST_PLATFORM)) \
+ --build=$(BUILD_PLATFORM) \
+ --host=$(HOST_PLATFORM) \
--with-pic \
--enable-static \
--disable-shared \
commit abeea7e6cbfa8d98ad6f2959b3adb903e5b61fc9
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jul 17 23:05:15 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Sep 10 21:43:11 2020 +0200
image-sort: add --quiet option for build-tools
Otherwise you'll get many warnings for missing images, because the
cross-toolset target just builds some small part of LO.
This also converts the program to use argparse.
Change-Id: I22adda23ab3a25bced871a87d38373543cd5ae72
diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index 0d2db4f7b2bb..42ddfdadd8c7 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -115,6 +115,7 @@ $(packimages_DIR)/sorted.lst : \
$(call gb_Helper_abbreviate_dirs, \
$(call gb_ExternalExecutable_get_command,python) \
$(SRCDIR)/solenv/bin/image-sort.py \
+ $(if $(filter build,$(gb_Side)),--quiet) \
$< $(INSTROOT)/$(gb_UIConfig_INSTDIR) $@)
$(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
diff --git a/solenv/bin/image-sort.py b/solenv/bin/image-sort.py
index ce69db3e64a4..d45037e25c7f 100644
--- a/solenv/bin/image-sort.py
+++ b/solenv/bin/image-sort.py
@@ -18,17 +18,19 @@
#
import sys, os, re
+import argparse
global_list = []
global_hash = {}
-base_path = None
+args = None
def read_icons(fname):
- global base_path
+ global args
images = []
- full_path = os.path.join(base_path, fname)
+ full_path = os.path.join(args.base_path, fname)
if not os.path.exists(full_path):
- print("Skipping non-existent {}\n".format(full_path))
+ if not args.quiet:
+ print("Skipping non-existent {}\n".format(full_path), file=sys.stderr)
return images
with open(full_path) as fp:
for line in fp:
@@ -116,34 +118,37 @@ def chew_controlfile(ifile):
else:
filelist.append(line)
-if len(sys.argv) == 1:
- print("image-sort <image-sort.lst> /path/to/OOOo/source/root\n")
- sys.exit(1)
-
+parser = argparse.ArgumentParser()
# where the control file lives
-control = sys.argv[1]
+parser.add_argument('control_file', metavar='image-sort.lst', type=open,
+ help='the sort control file')
# where the uiconfigs live
-base_path = sys.argv[2]
-# output
-if len(sys.argv) > 3:
- output = open(sys.argv[3], 'w')
+parser.add_argument('base_path', metavar='directory',
+ help='path to the UIConfigs directory')
+parser.add_argument('output', metavar='output file', type=argparse.FileType('w'),
+ nargs='?', default=None, help='optionally write to this output file')
+parser.add_argument("-q", "--quiet", action="store_true",
+ help="don't print status messages to stdout")
+
+args = parser.parse_args()
+
+if args.output is not None:
close_output = True
else:
- output = sys.stdout
+ args.output = sys.stdout
close_output = False
-with open(control) as controlfile:
- chew_controlfile(controlfile)
+chew_controlfile(args.control_file)
for icon in global_list:
if not icon.startswith('sc_'):
- output.write(icon + "\n")
+ args.output.write(icon + "\n")
for icon in global_list:
if icon.startswith('sc_'):
- output.write(icon + "\n")
+ args.output.write(icon + "\n")
if close_output:
- output.close()
+ args.output.close()
# dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
commit 8442cd493d0b9825922a63c8b6ad322a252c75ef
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jul 17 22:14:39 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Sep 10 21:43:11 2020 +0200
Fix the minimal build-tools target
The revert commits change the build-tools target for a DESKTOP
build to build the complete LO. This restores the original,
minimal one and also adds a whitelist of allowd build types.
OpenCL needs a configure switch, as it's status is also stored
in a config header, so preventing the build is not enough.
This also reverts:
- commit 802161a505272732566210e9ebbd8fe1b23fb86d
- commit 02d931a59e2966d0c2736db8dee7be3e3dcd6bae
Change-Id: Ibfcb0c54e72da1b7c2e63c082ea6586520a787fa
diff --git a/Makefile.gbuild b/Makefile.gbuild
index c90a9feee3a9..cd7fc973c287 100644
--- a/Makefile.gbuild
+++ b/Makefile.gbuild
@@ -18,12 +18,7 @@ include $(BUILDDIR)/config_$(gb_Side).mk
include $(SRCDIR)/solenv/gbuild/gbuild.mk
-# If cross-compiling to a DESKTOP platform, just use RepositoryModule_host.mk on the build platform, too
-ifeq ($(gb_Side)-$(filter DESKTOP,$(BUILD_TYPE_FOR_HOST)),build-DESKTOP)
-$(eval $(call gb_Module_make_global_targets,$(SRCDIR)/RepositoryModule_host.mk))
-else
$(eval $(call gb_Module_make_global_targets,$(SRCDIR)/RepositoryModule_$(gb_Side).mk))
-endif
upload-symbols:
bin/upload_symbols.py $(WORKDIR)/symbols.zip $(BREAKPAD_SYMBOL_CONFIG) "$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)"
diff --git a/Makefile.in b/Makefile.in
index 7d12aff6ffa7..8b8267fcb6db 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -294,7 +294,7 @@ cross-toolset: bootstrap fetch
ifneq ($(OS),iOS)
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(BUILDDIR)/Makefile fetch
endif
- $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(if $(filter DESKTOP,$(BUILD_TYPE)),build,build-tools)
+ $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
install-gdb-printers:
ifneq ($(filter-out WNT MACOSX iOS,$(OS)),)
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2aa145698410..d9fa980d7f24 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3878,7 +3878,7 @@ $(call gb_Executable_add_runtime_dependencies,gengal,\
$(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
$(if $(filter MACOSX,$(OS)),$(call gb_Library_get_target,vclplug_osx)) \
$(if $(filter WNT,$(OS)),$(call gb_Library_get_target,vclplug_win)) \
- $(call gb_Package_get_target_for_build,postprocess_images) \
+ $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
$(call gb_Package_get_target_for_build,postprocess_registry) \
$(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
$(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
diff --git a/RepositoryModule_build.mk b/RepositoryModule_build.mk
index 9537ccd1d770..34322743197e 100644
--- a/RepositoryModule_build.mk
+++ b/RepositoryModule_build.mk
@@ -55,6 +55,41 @@ $(eval $(call gb_Module_add_moduledirs,cross_toolset,\
unotools \
ure \
xmlreader \
+ $(call gb_Helper_optional_for_host,DESKTOP, \
+ $(if $(WITH_GALLERY_BUILD), \
+ avmedia \
+ basic \
+ canvas \
+ configmgr \
+ connectivity \
+ cppcanvas \
+ drawinglayer \
+ editeng \
+ emfio \
+ filter \
+ framework \
+ linguistic \
+ officecfg \
+ package \
+ postprocess \
+ sfx2 \
+ shell \
+ sot \
+ svgio \
+ svl \
+ svtools \
+ svx \
+ toolkit \
+ ucb \
+ unoxml \
+ uui \
+ vcl \
+ xmloff \
+ xmlscript \
+ ) \
+ helpcompiler \
+ xmlhelp \
+ ) \
$(call gb_Helper_optional,QADEVOOO,qadevOOo) \
))
diff --git a/configure.ac b/configure.ac
index e5b6ab7ca78a..6b7c4562db8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1626,6 +1626,11 @@ AC_ARG_ENABLE(ldap,
[Disable LDAP support.]),
,enable_ldap=yes)
+AC_ARG_ENABLE(opencl,
+ AS_HELP_STRING([--disable-opencl],
+ [Disable OpenCL support.]),
+,enable_opencl=yes)
+
dnl ===================================================================
dnl Optional Packages (--with/without-)
dnl ===================================================================
@@ -3631,7 +3636,9 @@ if test "$_os" = "WINNT"; then
WIN_MULTI_ARCH=""
WIN_OTHER_ARCH=""
fi
- else
+ fi
+
+ if test "$WIN_BUILD_ARCH" = "$WIN_HOST_ARCH"; then
MSVC_BUILD_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/$WIN_BUILD_ARCH"
test_cl_exe "build" "$MSVC_BUILD_PATH"
fi
@@ -4931,21 +4938,67 @@ if test "$cross_compiling" = "yes"; then
sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
# Don't bother having configure look for stuff not needed for the build platform anyway
./configure \
+ --build="$build_alias" \
--disable-cups \
+ --disable-firebird-sdbc \
--disable-gpgmepp \
--disable-gstreamer-1-0 \
--disable-gtk3 \
--disable-mariadb-sdbc \
+ --disable-online-update \
+ --disable-opencl \
+ --disable-pch \
--disable-pdfimport \
--disable-postgresql-sdbc \
+ --disable-skia \
--enable-icecream="$enable_icecream" \
- --with-parallelism="$with_parallelism" \
--without-doxygen \
--without-java \
+ --without-webdav \
+ --with-parallelism="$with_parallelism" \
+ --with-theme="$with_theme" \
+ --with-tls=openssl \
$sub_conf_opts \
--srcdir=$srcdir \
2>&1 | sed -e 's/^/ /'
test -f ./config_host.mk 2>/dev/null || exit
+
+ # filter accepted build types
+ BUILD_TARGETS_WHITELIST="
+ AVMEDIA
+ BOOST
+ CLUCENE
+ DBCONNECTIVITY
+ DESKTOP
+ DYNLOADING
+ EPOXY
+ EXPAT
+ GLM
+ GRAPHITE
+ HARFBUZZ
+ ICU
+ LCMS2
+ LIBJPEG_TURBO
+ LIBLANGTAG
+ LibO
+ LIBFFI
+ LIBPN
+ LIBXML2
+ LIBXSLT
+ MDDS
+ NATIVE
+ OPENSSL
+ ORCUS
+ PYTHON
+ SCRIPTING
+ ZLIB
+"
+ # converts BUILD_TYPE and whitelist into non-whitespace, newlined lists, to use grep as a filter
+ BUILD_TARGETS_WHITELIST=$(echo "$BUILD_TARGETS_WHITELIST" | sed -e '/^ *$/d' -e 's/ *//')
+ BUILD_TARGETS="$(sed -ne '/^export BUILD_TYPE=/ { s/.*=// ; s/ /\n/gp }' config_host.mk)"
+ BUILD_TARGETS="$(echo "$BUILD_TARGETS" | grep -F "$BUILD_TARGETS_WHITELIST" | tr '\n' ' ')"
+ sed -i -e "s/ BUILD_TYPE=.*$/ BUILD_TYPE=$BUILD_TARGETS/" config_host.mk
+
cp config_host.mk ../config_build.mk
cp config_host_lang.mk ../config_build_lang.mk
mv config.log ../config.Build.log
@@ -8823,13 +8876,6 @@ else
AC_MSG_RESULT([internal])
SYSTEM_LIBXSLT=
BUILD_TYPE="$BUILD_TYPE LIBXSLT"
-
- if test "$cross_compiling" = "yes"; then
- AC_PATH_PROG(XSLTPROC, xsltproc, no)
- if test "$XSLTPROC" = "no"; then
- AC_MSG_ERROR([xsltproc is required])
- fi
- fi
fi
AC_SUBST(SYSTEM_LIBXSLT)
if test -z "$SYSTEM_LIBXSLT_FOR_BUILD"; then
@@ -11153,7 +11199,7 @@ dnl =================================================
dnl Check whether to build with OpenCL support.
dnl =================================================
-if test $_os != iOS -a $_os != Android -a "$ENABLE_FUZZERS" != "TRUE"; then
+if test $_os != iOS -a $_os != Android -a "$ENABLE_FUZZERS" != "TRUE" -a "$enable_opencl" = "yes"; then
# OPENCL in BUILD_TYPE and HAVE_FEATURE_OPENCL tell that OpenCL is potentially available on the
# platform (optional at run-time, used through clew).
BUILD_TYPE="$BUILD_TYPE OPENCL"
diff --git a/external/liblangtag/ExternalProject_liblangtag.mk b/external/liblangtag/ExternalProject_liblangtag.mk
index 060c6f3601a8..51dc4f4b0c68 100644
--- a/external/liblangtag/ExternalProject_liblangtag.mk
+++ b/external/liblangtag/ExternalProject_liblangtag.mk
@@ -33,7 +33,8 @@ $(call gb_ExternalProject_get_state_target,liblangtag,build):
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(call gb_Module__symbols_enabled,liblangtag),$(gb_DEBUGINFO_FLAGS))' \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) "ac_cv_va_copy=no") \
+ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
+ $(if $(filter WNT,$(OS)),"lt_cv_c99_vsnprintf=yes" "ac_cv_va_copy=yes","ac_cv_va_copy=no")) \
LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" \
LIBXML2_LIBS="$(if $(filter WNT,$(OS)),-L$(call gb_UnpackedTarball_get_dir,libxml2)/win32/bin.msvc -llibxml2,$(LIBXML_LIBS))" \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________URELIB) \
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index c95794e1f508..97db3e6fbdce 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -312,15 +312,18 @@ postprocess_FILES_main += \
# VCL-unixdesktop.xcu must come after VCL.xcu
else ifeq (WNT,$(OS))
postprocess_FILES_main += \
- $(call gb_XcuModuleTarget_get_target,connectivity/registry/ado)/org/openoffice/Office/DataAccess/Drivers-ado.xcu \
$(postprocess_MOD)/org/openoffice/Inet-wnt.xcu \
$(postprocess_MOD)/org/openoffice/Office/Accelerators-unxwnt.xcu \
$(postprocess_MOD)/org/openoffice/Office/Common-wnt.xcu \
$(postprocess_MOD)/org/openoffice/Office/Paths-unxwnt.xcu \
$(postprocess_MOD)/org/openoffice/ucb/Configuration-win.xcu
# Inet-wnt.xcu must come after Inet.xcu
+ifeq ($(gb_Side),host)
+postprocess_FILES_main += \
+ $(call gb_XcuModuleTarget_get_target,connectivity/registry/ado)/org/openoffice/Office/DataAccess/Drivers-ado.xcu
postprocess_DRIVERS += ado
endif
+endif
ifneq ($(WITH_WEBDAV),)
postprocess_FILES_main += $(postprocess_MOD)/org/openoffice/ucb/Configuration-webdav.xcu
endif
diff --git a/postprocess/Module_postprocess.mk b/postprocess/Module_postprocess.mk
index 4671cbc84508..c1aa1dbc7e87 100644
--- a/postprocess/Module_postprocess.mk
+++ b/postprocess/Module_postprocess.mk
@@ -13,11 +13,16 @@ $(eval $(call gb_Module_Module,postprocess))
# is reused in Package_registry!
$(eval $(call gb_Module_add_targets,postprocess,\
- CustomTarget_images \
CustomTarget_registry \
- Package_images \
Rdb_services \
))
+ifeq ($(gb_Side),host)
+$(eval $(call gb_Module_add_targets,postprocess,\
+ CustomTarget_images \
+ Package_images \
+))
+endif
+
$(eval $(call gb_Module_add_l10n_targets,postprocess,\
Package_registry \
))
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 71f9421f6a90..7cda2c71e986 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -9,30 +9,76 @@
$(eval $(call gb_Rdb_Rdb_install,services))
+#
+# "minimal" list of services for cross-compiling build tools
+#
$(eval $(call gb_Rdb_add_components,services,\
- animations/source/animcore/animcore \
$(call gb_Helper_optional,AVMEDIA,avmedia/util/avmedia) \
- chart2/source/controller/chartcontroller \
- chart2/source/chartcore \
+ $(call gb_Helper_optional,SCRIPTING,basic/util/sb) \
canvas/source/factory/canvasfactory \
canvas/source/simplecanvas/simplecanvas \
canvas/source/vcl/vclcanvas \
+ $(if $(ENABLE_CAIRO_CANVAS),canvas/source/cairo/cairocanvas) \
+ $(if $(ENABLE_OPENGL_CANVAS),canvas/source/opengl/oglcanvas) \
+ $(if $(filter WNT,$(OS)), \
+ canvas/source/directx/directx9canvas \
+ canvas/source/directx/gdipluscanvas \
+ ) \
comphelper/util/comphelp \
configmgr/source/configmgr \
+ $(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)), \
+ connectivity/source/dbtools/dbtools \
+ connectivity/source/drivers/dbase/dbase \
+ ) \
cppcanvas/source/uno/mtfrenderer \
+ drawinglayer/drawinglayer \
+ emfio/emfio \
+ filter/source/config/cache/filterconfig1 \
+ filter/source/graphic/graphicfilter \
+ filter/source/svg/svgfilter \
+ framework/util/fwk \
+ i18npool/source/search/i18nsearch \
+ i18npool/util/i18npool \
+ package/source/xstor/xstor \
+ package/util/package2 \
+ sax/source/expatwrap/expwrap \
+ sfx2/util/sfx \
+ sot/util/sot \
+ svgio/svgio \
+ svl/source/fsstor/fsstorage \
+ svl/source/passwordcontainer/passwordcontainer \
+ svl/util/svl \
+ svtools/util/svt \
+ svx/util/svxcore \
+ toolkit/util/tk \
+ ucb/source/core/ucb1 \
+ ucb/source/ucp/file/ucpfile1 \
+ unotools/util/utl \
+ unoxml/source/service/unoxml \
+ uui/util/uui \
+ vcl/vcl.common \
+ $(if $(filter ANDROID,$(OS)),vcl/vcl.android) \
+ $(if $(DISABLE_GUI),vcl/vcl.headless) \
+ $(if $(filter iOS,$(OS)),vcl/vcl.ios) \
+ $(if $(filter MACOSX,$(OS)),vcl/vcl.macosx) \
+ $(if $(filter WNT,$(OS)),vcl/vcl.windows) \
+))
+
+ifeq ($(gb_Side),host)
+
+$(eval $(call gb_Rdb_add_components,services,\
+ animations/source/animcore/animcore \
+ chart2/source/controller/chartcontroller \
+ chart2/source/chartcore \
cui/util/cui \
desktop/source/deployment/deployment \
- drawinglayer/drawinglayer \
dtrans/util/mcnttype \
embeddedobj/util/embobj \
eventattacher/source/evtatt \
- filter/source/config/cache/filterconfig1 \
- filter/source/graphic/graphicfilter \
filter/source/msfilter/msfilter \
filter/source/odfflatxml/odfflatxml \
filter/source/pdf/pdffilter \
filter/source/storagefilterdetect/storagefd \
- filter/source/svg/svgfilter \
filter/source/t602/t602filter \
filter/source/textfilterdetect/textfd \
filter/source/xmlfilteradaptor/xmlfa \
@@ -41,10 +87,7 @@ $(eval $(call gb_Rdb_add_components,services,\
filter/source/xsltfilter/xsltfilter \
formula/util/for \
$(call gb_Helper_optional,DESKTOP,fpicker/source/office/fps_office) \
- framework/util/fwk \
hwpfilter/source/hwp \
- i18npool/source/search/i18nsearch \
- i18npool/util/i18npool \
lingucomponent/source/hyphenator/hyphen/hyphen \
lingucomponent/source/languageguessing/guesslang \
$(if $(filter-out iOS,$(OS)), \
@@ -57,9 +100,6 @@ $(eval $(call gb_Rdb_add_components,services,\
lotuswordpro/util/lwpfilter \
) \
oox/util/oox \
- package/source/xstor/xstor \
- package/util/package2 \
- sax/source/expatwrap/expwrap \
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
@@ -71,42 +111,26 @@ $(eval $(call gb_Rdb_add_components,services,\
sd/util/sdfilt \
sdext/source/presenter/presenter \
sdext/source/minimizer/minimizer \
- sfx2/util/sfx \
slideshow/util/slideshow \
- sot/util/sot \
starmath/util/sm \
starmath/util/smd \
- svl/source/fsstor/fsstorage \
- svl/source/passwordcontainer/passwordcontainer \
- svl/util/svl \
- svtools/util/svt \
- svgio/svgio \
- emfio/emfio \
svx/util/svx \
- svx/util/svxcore \
svx/util/textconversiondlgs \
sw/util/msword \
sw/util/sw \
sw/util/swd \
- toolkit/util/tk \
ucb/source/sorter/srtrs1 \
- ucb/source/core/ucb1 \
ucb/source/cacher/cached1 \
$(if $(ENABLE_LIBCMIS),ucb/source/ucp/cmis/ucpcmis1) \
ucb/source/ucp/expand/ucpexpand1 \
ucb/source/ucp/ext/ucpext \
- ucb/source/ucp/file/ucpfile1 \
$(if $(ENABLE_CURL),ucb/source/ucp/ftp/ucpftp1) \
ucb/source/ucp/hierarchy/ucphier1 \
ucb/source/ucp/image/ucpimage \
ucb/source/ucp/package/ucppkg1 \
ucb/source/ucp/tdoc/ucptdoc1 \
UnoControls/util/ctl \
- unotools/util/utl \
unoxml/source/rdf/unordf \
- unoxml/source/service/unoxml \
- uui/util/uui \
- vcl/vcl.common \
xmloff/source/transform/xof \
xmloff/util/xo \
xmlscript/util/xmlscript \
@@ -127,16 +151,11 @@ $(eval $(call gb_Rdb_add_components,services,\
writerperfect/source/calc/wpftcalc \
$(if $(filter MACOSX,$(OS)), \
$(call gb_Helper_optional,AVMEDIA,avmedia/source/macavf/avmediaMacAVF) \
- fpicker/source/aqua/fps_aqua \
shell/source/backends/macbe/macbe1 \
- vcl/vcl.macosx \
) \
$(if $(filter iOS MACOSX,$(OS)), \
lingucomponent/source/spellcheck/macosxspell/MacOSXSpell \
) \
- $(if $(filter iOS,$(OS)), \
- vcl/vcl.ios \
- ) \
$(if $(filter WNT,$(OS)), \
avmedia/source/win/avmediawin \
dtrans/source/generic/dtrans \
@@ -147,13 +166,6 @@ $(eval $(call gb_Rdb_add_components,services,\
shell/source/backends/wininetbe/wininetbe1 \
shell/source/win32/simplemail/smplmail \
shell/source/win32/syssh \
- vcl/vcl.windows \
- ) \
- $(if $(DISABLE_GUI), \
- vcl/vcl.headless \
- ) \
- $(if $(filter ANDROID,$(OS)), \
- vcl/vcl.android \
) \
$(if $(filter-out WNT,$(OS)), \
embeddedobj/source/msole/emboleobj \
@@ -169,7 +181,6 @@ $(eval $(call gb_Rdb_add_components,services,\
) \
$(call gb_Helper_optional,SCRIPTING, \
basctl/util/basctl \
- basic/util/sb \
sc/util/vbaobj \
scripting/source/basprov/basprov \
scripting/source/dlgprov/dlgprov \
@@ -186,16 +197,6 @@ $(eval $(call gb_Rdb_add_components,services,\
wizards/com/sun/star/wizards/letter/letter \
) \
) \
- $(if $(ENABLE_CAIRO_CANVAS), \
- canvas/source/cairo/cairocanvas \
- ) \
- $(if $(filter WNT,$(OS)), \
- canvas/source/directx/directx9canvas \
- canvas/source/directx/gdipluscanvas \
- ) \
- $(if $(ENABLE_OPENGL_CANVAS), \
- canvas/source/opengl/oglcanvas \
- ) \
$(if $(ENABLE_GIO), \
shell/source/sessioninstall/losessioninstall \
ucb/source/ucp/gio/ucpgio \
@@ -233,18 +234,16 @@ $(eval $(call gb_Rdb_add_components,services,\
dbaccess/util/dba \
))
-ifeq (DBCONNECTIVITY,$(filter DBCONNECTIVITY,$(BUILD_TYPE)))
+ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE)))
$(eval $(call gb_Rdb_add_components,services,\
extensions/source/dbpilots/dbp \
extensions/source/propctrlr/pcr \
connectivity/source/cpool/dbpool2 \
- connectivity/source/dbtools/dbtools \
$(if $(filter WNT,$(OS)), \
connectivity/source/drivers/ado/ado \
) \
connectivity/source/drivers/calc/calc \
- connectivity/source/drivers/dbase/dbase \
$(if $(ENABLE_EVOAB2), \
connectivity/source/drivers/evoab2/evoab \
) \
@@ -340,4 +339,6 @@ $(eval $(call gb_Rdb_add_components,services,\
))
endif
+endif # $(gb_Side),host
+
# vim: set noet sw=4 ts=4:
diff --git a/shell/Module_shell.mk b/shell/Module_shell.mk
index a223aae617e0..e6d66355c27e 100644
--- a/shell/Module_shell.mk
+++ b/shell/Module_shell.mk
@@ -9,6 +9,14 @@
$(eval $(call gb_Module_Module,shell))
+ifeq ($(filter DESKTOP,$(BUILD_TYPE)),DESKTOP)
+$(eval $(call gb_Module_add_targets,shell,\
+ Executable_lngconvex \
+))
+endif
+
+ifeq ($(gb_Side),host)
+
$(eval $(call gb_Module_add_targets,shell,\
$(if $(filter-out MACOSX WNT,$(OS)),Library_desktopbe) \
Library_localebe \
@@ -99,7 +107,6 @@ endif
ifeq ($(filter DESKTOP,$(BUILD_TYPE)),DESKTOP)
$(eval $(call gb_Module_add_targets,shell,\
- Executable_lngconvex \
Library_syssh \
))
@@ -120,4 +127,6 @@ $(eval $(call gb_Module_add_l10n_targets,shell,\
AllLangMoTarget_shell \
))
+endif # $(gb_Side) == host
+
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/solenv/gbuild/extensions/pre_BuildTools.mk b/solenv/gbuild/extensions/pre_BuildTools.mk
index 9e5b8df11814..c45be554a128 100644
--- a/solenv/gbuild/extensions/pre_BuildTools.mk
+++ b/solenv/gbuild/extensions/pre_BuildTools.mk
@@ -13,6 +13,7 @@ gb_BUILD_TOOLS = \
$(foreach executable, \
bestreversemap \
cfgex \
+ climaker \
cpp \
cppumaker \
gencoll_rule \
@@ -35,6 +36,7 @@ gb_BUILD_TOOLS = \
gengal \
HelpIndexer \
HelpLinker \
+ lngconvex \
) \
,$(call gb_Executable_get_runtime_dependencies,$(executable))) \
$(foreach executable, \
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index e184a656f0b4..996c5a4b06c5 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -543,13 +543,13 @@ $(eval $(call gb_Helper_make_dep_targets,\
ifeq ($(gb_FULLDEPS),$(true))
# FIXME this is used before TargetLocations is read?
-gb_WinResTarget__command_target = $(WORKDIR)/LinkTarget/Executable/makedepend.exe
+gb_WinResTarget__command_target = $(WORKDIR_FOR_BUILD)/LinkTarget/Executable/makedepend.exe
define gb_WinResTarget__command_dep
$(call gb_Output_announce,RC:$(2),$(true),DEP,1)
$(call gb_Trace_StartRange,RC:$(2),DEP)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
- $(call gb_Executable_get_target,makedepend) \
+ $(call gb_Executable_get_target_for_build,makedepend) \
$(INCLUDE) \
$(DEFS) \
$(RCFILE) \
@@ -598,10 +598,10 @@ endef
gb_AUTOCONF_WRAPPERS = \
REAL_CC="$(shell cygpath -w $(filter-out -%,$(CC)))" \
REAL_CC_FLAGS="$(filter -%,$(CC))" \
- CC="$(call gb_Executable_get_target,gcc-wrapper)" \
+ CC="$(call gb_Executable_get_target_for_build,gcc-wrapper)" \
REAL_CXX="$(shell cygpath -w $(filter-out -%,$(CXX)))" \
REAL_CXX_FLAGS="$(filter -%,$(CXX))" \
- CXX="$(call gb_Executable_get_target,g++-wrapper)" \
+ CXX="$(call gb_Executable_get_target_for_build,g++-wrapper)" \
LD="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo"
gb_ExternalProject_INCLUDE := \
@@ -677,8 +677,9 @@ endef
gb_UIMenubarTarget_UIMenubarTarget_platform :=
# Python
-gb_Python_PRECOMMAND := PATH="$(shell cygpath -w $(INSTDIR)/program)" PYTHONHOME="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)" PYTHONPATH="$${PYPATH:+$$PYPATH:}$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib;$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib/lib-dynload:$(INSTDIR)/program"
-gb_Python_INSTALLED_EXECUTABLE := $(INSTROOT)/$(LIBO_BIN_FOLDER)/python.exe
+gb_Python_HOME := $(INSTDIR_FOR_BUILD)/program/python-core-$(PYTHON_VERSION)
+gb_Python_PRECOMMAND := PATH="$(shell cygpath -w $(INSTDIR_FOR_BUILD)/program)" PYTHONHOME="$(gb_Python_HOME)" PYTHONPATH="$${PYPATH:+$$PYPATH:}$(gb_Python_HOME)/lib;$(gb_Python_HOME)/lib/lib-dynload:$(INSTDIR_FOR_BUILD)/program"
+gb_Python_INSTALLED_EXECUTABLE := $(INSTROOT_FOR_BUILD)/$(LIBO_BIN_FOLDER)/python.exe
gb_ICU_PRECOMMAND := PATH="$(shell cygpath -w $(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/lib)"
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 2040a906891f..599f842d480e 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -22,9 +22,14 @@ $(eval $(call gb_Module_Module,svx))
$(eval $(call gb_Module_add_targets,svx,\
Library_svx \
Library_svxcore \
+))
+
+ifeq ($(gb_Side),host)
+$(eval $(call gb_Module_add_targets,svx,\
Library_textconversiondlgs \
UIConfig_svx \
))
+endif
$(eval $(call gb_Module_add_l10n_targets,svx,\
AllLangMoTarget_svx \
diff --git a/unotest/Module_unotest.mk b/unotest/Module_unotest.mk
index a47ca5d4b694..bdffe8e8ac14 100644
--- a/unotest/Module_unotest.mk
+++ b/unotest/Module_unotest.mk
@@ -10,6 +10,7 @@
$(eval $(call gb_Module_Module,unotest))
+ifeq ($(gb_Side),host)
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,unotest,\
Library_unobootstrapprotector \
@@ -29,5 +30,6 @@ $(eval $(call gb_Module_add_targets,unotest,\
))
endif
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/unoxml/Module_unoxml.mk b/unoxml/Module_unoxml.mk
index 5008d828c13b..8c55b830e42a 100644
--- a/unoxml/Module_unoxml.mk
+++ b/unoxml/Module_unoxml.mk
@@ -21,8 +21,13 @@ $(eval $(call gb_Module_Module,unoxml))
$(eval $(call gb_Module_add_targets,unoxml,\
Library_unoxml \
+))
+
+ifeq ($(gb_Side),host)
+$(eval $(call gb_Module_add_targets,unoxml,\
Library_unordf \
))
+endif
$(eval $(call gb_Module_add_slowcheck_targets,unoxml,\
CppunitTest_unoxml_domtest \
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 214c66b14197..3570b4091d7d 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -725,8 +725,11 @@ $(eval $(call gb_Library_add_nativeres,vcl,vcl/salsrc))
# HACK: dependency on icon themes so running unit tests don't
# prevent delivering these by having open file handles on WNT
+ifeq ($(gb_Side),host)
$(eval $(call gb_Library_use_package,vcl,postprocess_images))
endif
+endif # $(OS) == WNT
+
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
ifeq ($(USING_X11),TRUE)
diff --git a/vcl/Library_vclplug_win.mk b/vcl/Library_vclplug_win.mk
index 2e169ded83e7..057c6506c17a 100644
--- a/vcl/Library_vclplug_win.mk
+++ b/vcl/Library_vclplug_win.mk
@@ -104,6 +104,8 @@ $(eval $(call gb_Library_add_nativeres,vclplug_win,vcl/salsrc))
# HACK: dependency on icon themes so running unit tests don't
# prevent delivering these by having open file handles on WNT
+ifeq ($(gb_Side),host)
$(eval $(call gb_Library_use_package,vclplug_win,postprocess_images))
+endif
# vim: set noet sw=4 ts=4:
diff --git a/xmloff/Module_xmloff.mk b/xmloff/Module_xmloff.mk
index 8f5853c9da41..9aa54fa42a5c 100644
--- a/xmloff/Module_xmloff.mk
+++ b/xmloff/Module_xmloff.mk
@@ -22,9 +22,14 @@ $(eval $(call gb_Module_Module,xmloff))
$(eval $(call gb_Module_add_targets,xmloff,\
CustomTarget_generated \
Library_xo \
+))
+
+ifeq ($(gb_Side),host)
+$(eval $(call gb_Module_add_targets,xmloff,\
Library_xof \
Package_dtd \
))
+endif
$(eval $(call gb_Module_add_check_targets,xmloff,\
$(if $(MERGELIBS),, \
commit dddcd98a5a5b544332ae4af8396303023c079132
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Wed Sep 2 11:13:31 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Sep 10 21:43:11 2020 +0200
Add a MariadDB configure option
The code is already disabled on iOS and Android, so this just
allows changing this setting on all platforms via configure.
Also needed for the "minimal" build-tools setup.
Change-Id: I590fda4cdc63b58fc17dcfb9da49c75c858b8fc0
diff --git a/configure.ac b/configure.ac
index da005ab20c35..e5b6ab7ca78a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -757,6 +757,7 @@ ios*) # iOS
enable_lotuswordpro=no
enable_coinmp=no
enable_lpsolve=no
+ enable_mariadb_sdbc=no
enable_postgresql_sdbc=no
enable_extension_integration=no
enable_report_builder=no
@@ -851,6 +852,7 @@ linux-android*)
enable_mpl_subset=yes
enable_coinmp=yes
enable_lpsolve=no
+ enable_mariadb_sdbc=no
enable_report_builder=no
enable_odk=no
enable_postgresql_sdbc=no
@@ -1554,6 +1556,11 @@ libo_FUZZ_ARG_ENABLE(readonly-installset,
progress, probably not fully implemented. Always enabled for macOS.]),
,)
+libo_FUZZ_ARG_ENABLE(mariadb-sdbc,
+ AS_HELP_STRING([--disable-mariadb-sdbc],
+ [Disable the build of the MariaDB/MySQL-SDBC driver.])
+)
+
libo_FUZZ_ARG_ENABLE(postgresql-sdbc,
AS_HELP_STRING([--disable-postgresql-sdbc],
[Disable the build of the PostgreSQL-SDBC driver.])
@@ -4928,6 +4935,7 @@ if test "$cross_compiling" = "yes"; then
--disable-gpgmepp \
--disable-gstreamer-1-0 \
--disable-gtk3 \
+ --disable-mariadb-sdbc \
--disable-pdfimport \
--disable-postgresql-sdbc \
--enable-icecream="$enable_icecream" \
@@ -9132,17 +9140,18 @@ AC_SUBST(PYTHON_VERSION)
AC_SUBST(PYTHON_VERSION_MAJOR)
AC_SUBST(PYTHON_VERSION_MINOR)
-ENABLE_MARIADBC=TRUE
-if test "$_os" = "Android" -o "$_os" = "iOS" -o "$enable_mpl_subset" = "yes"; then
- ENABLE_MARIADBC=
-fi
+ENABLE_MARIADBC=
MARIADBC_MAJOR=1
MARIADBC_MINOR=0
MARIADBC_MICRO=2
-if test "$ENABLE_MARIADBC" = "TRUE"; then
+AC_MSG_CHECKING([whether to build the MariaDB/MySQL SDBC driver])
+if test "x$enable_mariadb_sdbc" != "xno" -a "$enable_mpl_subset" != "yes"; then
+ ENABLE_MARIADBC=TRUE
+ AC_MSG_RESULT([yes])
BUILD_TYPE="$BUILD_TYPE MARIADBC"
+else
+ AC_MSG_RESULT([no])
fi
-
AC_SUBST(ENABLE_MARIADBC)
AC_SUBST(MARIADBC_MAJOR)
AC_SUBST(MARIADBC_MINOR)
commit 5771d8032017ae00b1749d3f515d3215da23b2c2
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jul 17 23:03:59 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Sep 10 21:43:11 2020 +0200
WIN drop --enable-64bit to select Windows target
This changes the Windows build to use the default configure switch
to select the target / host of the compiled binaries to get the
possibility to cross compile on Windows the "default" way.
Note that selecting i686-pc-cygwin on x86_64 doesn't do a cross-
compilation, as no special build tools are needed, because x86_64
can run x86 binaries just fine.
A consequence of the change is the default target host, which is
now the same then the build system, instead of the previous x86
default.
Change-Id: I5584f34f665573ebac40d5d7753d96addeb84dbb
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index fd653e2e89c5..2aa145698410 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4007,7 +4007,7 @@ $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_
else
-$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
+$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT_FOR_BUILD)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
diff --git a/configure.ac b/configure.ac
index 42329199cf80..da005ab20c35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1475,11 +1475,6 @@ AC_ARG_ENABLE(ccache,
]),
,)
-AC_ARG_ENABLE(64-bit,
- AS_HELP_STRING([--enable-64-bit],
- [Build a 64-bit LibreOffice on platforms where the normal build is 32-bit.
- At the moment meaningful only for Windows.]), ,)
-
libo_FUZZ_ARG_ENABLE(online-update,
AS_HELP_STRING([--enable-online-update],
[Enable the online update service that will check for new versions of
@@ -3353,19 +3348,65 @@ reg_get_value_64()
reg_get_value "64" "$1"
}
-if test "$_os" = "WINNT"; then
- AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
- if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
- AC_MSG_RESULT([no])
- WINDOWS_SDK_ARCH="x86"
+case "$host_os" in
+cygwin*)
+ COM=MSC
+ USING_X11=
+ OS=WNT
+ RTL_OS=Windows
+ if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+ P_SEP=";"
else
- AC_MSG_RESULT([yes])
- WINDOWS_SDK_ARCH="x64"
- BITNESS_OVERRIDE=64
+ P_SEP=:
fi
+ case "$host_cpu" in
+ x86_64)
+ CPUNAME=X86_64
+ RTL_ARCH=X86_64
+ PLATFORMID=windows_x86_64
+ WINDOWS_X64=1
+ SCPDEFS="$SCPDEFS -DWINDOWS_X64"
+ WIN_HOST_ARCH="x64"
+ WIN_MULTI_ARCH="x86"
+ WIN_HOST_BITS=64
+ ;;
+ i*86)
+ CPUNAME=INTEL
+ RTL_ARCH=x86
+ PLATFORMID=windows_x86
+ WIN_HOST_ARCH="x86"
+ WIN_HOST_BITS=32
+ WIN_OTHER_ARCH="x64"
+ ;;
+ *)
+ AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+ ;;
+ esac
+
+ case "$build_cpu" in
+ x86_64) WIN_BUILD_ARCH="x64" ;;
+ i*86) WIN_BUILD_ARCH="x86" ;;
+ *)
+ AC_MSG_ERROR([Unsupported build_cpu $build_cpu for host_os $host_os])
+ ;;
+ esac
+
+ SCPDEFS="$SCPDEFS -D_MSC_VER"
+ ;;
+esac
+
+# multi-arch is an arch, which can execute on the host (x86 on x64), while
+# other-arch won't, but wouldn't break the build (x64 on x86).
+if test -n "$WIN_MULTI_ARCH" -a -n "$WIN_OTHER_ARCH"; then
+ AC_MSG_ERROR([Broken configure.ac file: can't have set \$WIN_MULTI_ARCH and $WIN_OTHER_ARCH])
fi
+
+
if test "$_os" = "iOS" -o "$build_cpu" != "$host_cpu"; then
- cross_compiling="yes"
+ # To allow building Windows multi-arch releases without cross-tooling
+ if test -z "$WIN_MULTI_ARCH" -a -z "$WIN_OTHER_ARCH"; then
+ cross_compiling="yes"
+ fi
fi
if test "$cross_compiling" = "yes"; then
export CROSS_COMPILING=TRUE
@@ -3517,6 +3558,46 @@ find_msvc()
fi
}
+test_cl_exe()
+{
+ AC_MSG_CHECKING([$1 compiler])
+
+ CL_EXE_PATH="$2/cl.exe"
+
+ if test ! -f "$CL_EXE_PATH"; then
+ if test "$1" = "multi-arch"; then
+ AC_MSG_WARN([no compiler (cl.exe) in $2])
+ return 1
+ else
+ AC_MSG_ERROR([no compiler (cl.exe) in $2])
+ fi
+ fi
+
+ dnl ===========================================================
+ dnl Check for the corresponding mspdb*.dll
+ dnl ===========================================================
+
+ # MSVC 15.0 has libraries from 14.0?
+ mspdbnum="140"
+
+ if test ! -e "$2/mspdb${mspdbnum}.dll"; then
+ AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $2, Visual Studio installation broken?])
+ fi
+
+ # The compiles has to find its shared libraries
+ OLD_PATH="$PATH"
+ TEMP_PATH=`cygpath -d "$2"`
+ PATH="`cygpath -u "$TEMP_PATH"`:$PATH"
+
+ if ! "$CL_EXE_PATH" -? </dev/null >/dev/null 2>&1; then
+ AC_MSG_ERROR([no compiler (cl.exe) in $2])
+ fi
+
+ PATH="$OLD_PATH"
+
+ AC_MSG_RESULT([$CL_EXE_PATH])
+}
+
SOLARINC=
MSBUILD_PATH=
DEVENV=
@@ -3530,21 +3611,30 @@ if test "$_os" = "WINNT"; then
AC_MSG_ERROR([no Visual Studio 2019 installation found])
fi
fi
+ AC_MSG_RESULT([])
- if test "$BITNESS_OVERRIDE" = ""; then
- if test -f "$vctest/VC/Tools/MSVC/$vcbuildnumber/bin/HostX86/x86/cl.exe"; then
- VC_PRODUCT_DIR=$vctest/VC
- else
- AC_MSG_ERROR([no compiler (cl.exe) in $vctest/VC/Tools/MSVC/$vcbuildnumber/bin/HostX86/x86])
+ VC_PRODUCT_DIR="$vctest/VC"
+ COMPATH="$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber"
+
+ # $WIN_OTHER_ARCH is a hack to test the x64 compiler on x86, even if it's not multi-arch
+ if test -n "$WIN_MULTI_ARCH" -o -n "$WIN_OTHER_ARCH"; then
+ MSVC_MULTI_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/${WIN_MULTI_ARCH}${WIN_OTHER_ARCH}"
+ test_cl_exe "multi-arch" "$MSVC_MULTI_PATH"
+ if test $? -ne 0; then
+ WIN_MULTI_ARCH=""
+ WIN_OTHER_ARCH=""
fi
else
- if test -f "$vctest/VC/Tools/MSVC/$vcbuildnumber/bin/HostX64/x64/cl.exe"; then
- VC_PRODUCT_DIR=$vctest/VC
- else
- AC_MSG_ERROR([no compiler (cl.exe) in $vctest/VC/Tools/MSVC/$vcbuildnumber/bin/HostX64/x64])
- fi
+ MSVC_BUILD_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/$WIN_BUILD_ARCH"
+ test_cl_exe "build" "$MSVC_BUILD_PATH"
+ fi
+
+ if test "$WIN_BUILD_ARCH" != "$WIN_HOST_ARCH"; then
+ MSVC_HOST_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/$WIN_HOST_ARCH"
+ test_cl_exe "host" "$MSVC_HOST_PATH"
+ else
+ MSVC_HOST_PATH="$MSVC_BUILD_PATH"
fi
- AC_MSG_RESULT([$VC_PRODUCT_DIR])
AC_MSG_CHECKING([for short pathname of VC product directory])
VC_PRODUCT_DIR=`win_short_path_for_make "$VC_PRODUCT_DIR"`
@@ -3556,7 +3646,7 @@ if test "$_os" = "WINNT"; then
AC_MSG_CHECKING([for UCRT location])
find_ucrt
# find_ucrt errors out if it doesn't find it
- AC_MSG_RESULT([found])
+ AC_MSG_RESULT([$UCRTSDKDIR ($UCRTVERSION)])
PathFormat "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"
ucrtincpath_formatted=$formatted_path
# SOLARINC is used for external modules and must be set too.
@@ -3578,13 +3668,13 @@ if test "$_os" = "WINNT"; then
MSBUILD_PATH=`win_short_path_for_make "$regvalue"`
else
if test "$vcnumwithdot" = "16.0"; then
- if test "$BITNESS_OVERRIDE" = ""; then
+ if test "$WIN_BUILD_ARCH" != "x64"; then
regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin"
else
regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin/amd64"
fi
else
- if test "$BITNESS_OVERRIDE" = ""; then
+ if test "$WIN_BUILD_ARCH" != "x64"; then
regvalue="$VC_PRODUCT_DIR/../MSBuild/$vcnumwithdot/Bin"
else
regvalue="$VC_PRODUCT_DIR/../MSBuild/$vcnumwithdot/Bin/amd64"
@@ -3601,55 +3691,11 @@ if test "$_os" = "WINNT"; then
AC_MSG_WARN([No devenv.exe found - this is expected for VC++ Build Tools])
fi
- dnl ===========================================================
- dnl Check for the corresponding mspdb*.dll
- dnl ===========================================================
-
- VC_HOST_DIR=
- MSPDB_PATH=
- CL_PATH=
-
- if "$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/HostX64/x64/cl.exe" -? </dev/null >/dev/null 2>&1; then
- VC_HOST_DIR="HostX64"
- MSPDB_PATH="$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/$VC_HOST_DIR/x64"
- else
- VC_HOST_DIR="HostX86"
- MSPDB_PATH="$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/$VC_HOST_DIR/x86"
- fi
-
- if test "$BITNESS_OVERRIDE" = ""; then
- CL_PATH="$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/$VC_HOST_DIR/x86"
- else
- CL_PATH="$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/$VC_HOST_DIR/x64"
- fi
-
- # MSVC 15.0 has libraries from 14.0?
- mspdbnum="140"
-
- if test ! -e "$MSPDB_PATH/mspdb${mspdbnum}.dll"; then
- AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $MSPDB_PATH, Visual Studio installation broken?])
- fi
-
- dnl The path needs to be added before cl is called
- TEMP_PATH=`cygpath -d "$MSPDB_PATH"`
- PATH="`cygpath -u "$TEMP_PATH"`:$PATH"
-
- AC_MSG_CHECKING([cl.exe])
-
- # Is there really ever a need to pass CC explicitly? Surely we can hope to get all the
- # automagical niceness to work OK? If somebody has some unsupported compiler in some weird
- # location, isn't it likely that lots of other things needs changes, too, and just setting CC
- # is not enough?
-
dnl Save the true MSVC cl.exe for use when CC/CXX is actually clang-cl,
dnl needed when building CLR code:
if test -z "$MSVC_CXX"; then
- if test -f "$CL_PATH/cl.exe"; then
- MSVC_CXX="$CL_PATH/cl.exe"
- fi
-
# This gives us a posix path with 8.3 filename restrictions
- MSVC_CXX=`win_short_path_for_make "$MSVC_CXX"`
+ MSVC_CXX=`win_short_path_for_make "$MSVC_HOST_PATH/cl.exe"`
fi
if test -z "$CC"; then
@@ -3663,16 +3709,7 @@ if test "$_os" = "WINNT"; then
if test -n "$CC"; then
# Remove /cl.exe from CC case insensitive
- AC_MSG_RESULT([found Visual C++ $vcyear ($CC)])
- if test "$BITNESS_OVERRIDE" = ""; then
- COMPATH="$VC_PRODUCT_DIR"
- else
- if test -n "$VC_PRODUCT_DIR"; then
- COMPATH=$VC_PRODUCT_DIR
- fi
- fi
-
- COMPATH="$COMPATH/Tools/MSVC/$vcbuildnumber"
+ AC_MSG_NOTICE([found Visual C++ $vcyear])
export INCLUDE=`cygpath -d "$COMPATH\Include"`
@@ -3729,16 +3766,13 @@ if test "$_os" = "WINNT"; then
BUILD_X64=
CXX_X64_BINARY=
- if test "$BITNESS_OVERRIDE" = ""; then
- AC_MSG_CHECKING([for a x64 compiler and libraries for 64-bit Explorer extensions])
- if test -f "$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/atlmfc/lib/x64/atls.lib" || \
- test -f "$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/atlmfc/lib/spectre/x64/atls.lib"; then
- if "$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/$VC_HOST_DIR/x64/cl.exe" -? </dev/null >/dev/null 2>&1; then
- BUILD_X64=TRUE
- CXX_X64_BINARY=`win_short_path_for_make "$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/$VC_HOST_DIR/x64/cl.exe"`
- fi
- fi
- if test "$BUILD_X64" = TRUE; then
+ if test "$WIN_HOST_ARCH" = "x86" -a -n "$WIN_OTHER_ARCH"; then
+ AC_MSG_CHECKING([for the libraries to build the 64-bit Explorer extensions])
+ if test -f "$COMPATH/atlmfc/lib/x64/atls.lib" -o \
+ -f "$COMPATH/atlmfc/lib/spectre/x64/atls.lib"
+ then
+ BUILD_X64=TRUE
+ CXX_X64_BINARY=`win_short_path_for_make "$MSVC_MULTI_PATH/cl.exe"`
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
@@ -3755,20 +3789,14 @@ if test "$_os" = "WINNT"; then
# Check for 32-bit compiler to use to build the 32-bit TWAIN shim
# needed to support TWAIN scan on both 32- and 64-bit systems
- BUILD_X86=
-
- if test "$BITNESS_OVERRIDE" = "64"; then
+ if test "$WIN_HOST_ARCH" = "x64"; then
AC_MSG_CHECKING([for a x86 compiler and libraries for 32-bit binaries required for TWAIN support])
- if test -n "$CXX_X86_BINARY"; then
- BUILD_X86=TRUE
- AC_MSG_RESULT([preset])
- elif "$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/$VC_HOST_DIR/x86/cl.exe" -? </dev/null >/dev/null 2>&1; then
+ if test -n "$WIN_MULTI_ARCH"; then
BUILD_X86=TRUE
- CXX_X86_BINARY=`win_short_path_for_make "$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber/bin/$VC_HOST_DIR/x86/cl.exe"`
+ CXX_X86_BINARY=`win_short_path_for_make "$MSVC_MULTI_PATH/cl.exe"`
CXX_X86_BINARY+=" /arch:SSE"
AC_MSG_RESULT([found])
else
- CXX_X86_BINARY=
AC_MSG_RESULT([not found])
AC_MSG_WARN([Installation set will not contain 32-bit binaries required for TWAIN support])
fi
@@ -4347,34 +4375,7 @@ aix*)
;;
cygwin*)
- COM=MSC
- USING_X11=
- OS=WNT
- RTL_OS=Windows
- if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
- P_SEP=";"
- else
- P_SEP=:
- fi
- case "$host_cpu" in
- i*86|x86_64)
- if test "$BITNESS_OVERRIDE" = 64; then
- CPUNAME=X86_64
- RTL_ARCH=X86_64
- PLATFORMID=windows_x86_64
- WINDOWS_X64=1
- SCPDEFS="$SCPDEFS -DWINDOWS_X64"
- else
- CPUNAME=INTEL
- RTL_ARCH=x86
- PLATFORMID=windows_x86
- fi
- ;;
- *)
- AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
- ;;
- esac
- SCPDEFS="$SCPDEFS -D_MSC_VER"
+ # Already handled
;;
darwin*|macos*)
@@ -5939,7 +5940,7 @@ if test "$_os" = "WINNT"; then
if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
have_windows_sdk_libs=yes
- elif test -f "$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WINDOWS_SDK_ARCH/user32.lib"; then
+ elif test -f "$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/user32.lib"; then
have_windows_sdk_libs=yes
else
have_windows_sdk_libs=no
@@ -5986,13 +5987,13 @@ the Windows SDK are installed.])
if test -z "$WINDOWS_SDK_WILANGID" -a -n "$WINDOWS_SDK_HOME"; then
WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/Samples/sysmgmt/msi/scripts/WiLangId.vbs
if ! test -e "$WINDOWS_SDK_WILANGID" ; then
- WINDOWS_SDK_WILANGID="${WINDOWS_SDK_HOME}/bin/${WINDOWS_SDK_LIB_SUBDIR}/${WINDOWS_SDK_ARCH}/WiLangId.vbs"
+ WINDOWS_SDK_WILANGID="${WINDOWS_SDK_HOME}/bin/${WINDOWS_SDK_LIB_SUBDIR}/${WIN_BUILD_ARCH}/WiLangId.vbs"
fi
if ! test -e "$WINDOWS_SDK_WILANGID" ; then
- WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs
+ WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WIN_BUILD_ARCH/WiLangId.vbs
fi
if ! test -e "$WINDOWS_SDK_WILANGID" ; then
- WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.1/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs")
+ WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.1/bin/$WIN_BUILD_ARCH/WiLangId.vbs")
fi
fi
if test -n "$with_lang" -a "$with_lang" != "en-US"; then
@@ -6020,19 +6021,19 @@ if test "$build_os" = "cygwin"; then
find_winsdk
if test -n "$winsdkbinsubdir" \
- -a -f "$winsdktest/Bin/$winsdkbinsubdir/$WINDOWS_SDK_ARCH/midl.exe"
+ -a -f "$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH/midl.exe"
then
- MIDL_PATH=$winsdktest/Bin/$winsdkbinsubdir/$WINDOWS_SDK_ARCH
+ MIDL_PATH=$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH
WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME/Bin/$winsdkbinsubdir
- elif test -f "$winsdktest/Bin/$WINDOWS_SDK_ARCH/midl.exe"; then
- MIDL_PATH=$winsdktest/Bin/$WINDOWS_SDK_ARCH
+ elif test -f "$winsdktest/Bin/$WIN_BUILD_ARCH/midl.exe"; then
+ MIDL_PATH=$winsdktest/Bin/$WIN_BUILD_ARCH
WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME/Bin
elif test -f "$winsdktest/Bin/midl.exe"; then
MIDL_PATH=$winsdktest/Bin
WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME/Bin
fi
if test ! -f "$MIDL_PATH/midl.exe"; then
- AC_MSG_ERROR([midl.exe not found in $winsdktest/Bin/$WINDOWS_SDK_ARCH, Windows SDK installation broken?])
+ AC_MSG_ERROR([midl.exe not found in $winsdktest/Bin/$WIN_BUILD_ARCH, Windows SDK installation broken?])
else
AC_MSG_RESULT([$MIDL_PATH/midl.exe])
fi
@@ -6074,11 +6075,11 @@ if test "$build_os" = "cygwin"; then
AC_MSG_CHECKING([for al.exe])
find_winsdk
if test -n "$winsdkbinsubdir" \
- -a -f "$winsdktest/Bin/$winsdkbinsubdir/$WINDOWS_SDK_ARCH/al.exe"
+ -a -f "$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH/al.exe"
then
- AL_PATH="$winsdktest/Bin/$winsdkbinsubdir/$WINDOWS_SDK_ARCH"
- elif test -f "$winsdktest/Bin/$WINDOWS_SDK_ARCH/al.exe"; then
- AL_PATH="$winsdktest/Bin/$WINDOWS_SDK_ARCH"
+ AL_PATH="$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH"
+ elif test -f "$winsdktest/Bin/$WIN_BUILD_ARCH/al.exe"; then
+ AL_PATH="$winsdktest/Bin/$WIN_BUILD_ARCH"
elif test -f "$winsdktest/Bin/al.exe"; then
AL_PATH="$winsdktest/Bin"
fi
@@ -6104,15 +6105,15 @@ if test "$build_os" = "cygwin"; then
find_dotnetsdk46
PathFormat "$frametest"
frametest="$formatted_path"
- if test -f "$frametest/Lib/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
+ if test -f "$frametest/Lib/um/$WIN_BUILD_ARCH/mscoree.lib"; then
DOTNET_FRAMEWORK_HOME="$frametest"
else
find_winsdk
- if test -f "$winsdktest/lib/mscoree.lib" -o -f "$winsdktest/lib/$winsdklibsubdir/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
+ if test -f "$winsdktest/lib/mscoree.lib" -o -f "$winsdktest/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/mscoree.lib"; then
DOTNET_FRAMEWORK_HOME="$winsdktest"
fi
fi
- if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib" -a ! -f "$DOTNET_FRAMEWORK_HOME/lib/$winsdklibsubdir/um/$WINDOWS_SDK_ARCH/mscoree.lib" -a ! -f "$DOTNET_FRAMEWORK_HOME/Lib/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
+ if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib" -a ! -f "$DOTNET_FRAMEWORK_HOME/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/mscoree.lib" -a ! -f "$DOTNET_FRAMEWORK_HOME/Lib/um/$WIN_BUILD_ARCH/mscoree.lib"; then
AC_MSG_ERROR([mscoree.lib not found])
fi
AC_MSG_RESULT([found: $DOTNET_FRAMEWORK_HOME])
@@ -6306,7 +6307,7 @@ else
SAL_TYPES_SIZEOFINT=4
SAL_TYPES_SIZEOFLONG=4
SAL_TYPES_SIZEOFLONGLONG=8
- if test "$BITNESS_OVERRIDE" = ""; then
+ if test $WIN_HOST_BITS -eq 32; then
SAL_TYPES_SIZEOFPOINTER=4
else
SAL_TYPES_SIZEOFPOINTER=8
@@ -7526,6 +7527,7 @@ AC_ARG_WITH(ucrt-dir,
A zip archive including those files is available from Microsoft site:
https://www.microsoft.com/en-us/download/details.aspx?id=48234]),
,)
+
UCRT_REDISTDIR="$with_ucrt_dir"
if test $_os = "WINNT"; then
find_msvc_x64_dlls
@@ -7537,7 +7539,7 @@ if test $_os = "WINNT"; then
done
MSVC_DLL_PATH=`win_short_path_for_make "$msvcdllpath"`
MSVC_DLLS="$msvcdlls"
- MSM_PATH=`win_short_path_for_make "$msmdir"`
+ test -n "$msmdir" && MSM_PATH=`win_short_path_for_make "$msmdir"`
# MSVC 15.3 changed it to VC141
if echo "$msvcdllpath" | grep -q "VC142.CRT$"; then
SCPDEFS="$SCPDEFS -DWITH_VC142_REDIST"
@@ -7584,19 +7586,13 @@ if test "$ENABLE_JAVA" != ""; then
# Windows-specific tests
if test "$build_os" = "cygwin"; then
- if test "$BITNESS_OVERRIDE" = 64; then
- bitness=64
- else
- bitness=32
- fi
-
if test -z "$with_jdk_home"; then
dnl See <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-EEED398E-AE37-4D12-
dnl AB10-49F82F720027> section "Windows Registry Key Changes":
- reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/CurrentVersion"
+ reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/CurrentVersion"
if test -n "$regvalue"; then
ver=$regvalue
- reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome"
+ reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome"
reg_jdk_home=$regvalue
fi
@@ -7604,7 +7600,7 @@ if test "$ENABLE_JAVA" != ""; then
with_jdk_home="$reg_jdk_home"
howfound="found automatically"
else
- AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $bitness-bit JDK >= 9])
+ AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $WIN_HOST_BITS-bit JDK >= 9])
fi
else
test "$build_os" = "cygwin" && with_jdk_home=`win_short_path_for_make "$with_jdk_home"`
@@ -7634,12 +7630,12 @@ if test "$ENABLE_JAVA" != ""; then
dnl Check that the JDK found is correct architecture (at least 2 reasons to
dnl check: officebean needs to link -ljawt, and libjpipe.so needs to be
dnl loaded by java to run JunitTests:
- if test "$build_os" = "cygwin"; then
+ if test "$build_os" = "cygwin" -a "$cross_compiling" != "yes"; then
shortjdkhome=`cygpath -d "$with_jdk_home"`
- if test "$BITNESS_OVERRIDE" = 64 -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
+ if test $WIN_HOST_BITS -eq 64 -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
- elif test "$BITNESS_OVERRIDE" = "" -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" != "" >/dev/null; then
+ elif test $WIN_HOST_BITS -eq 32 -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" != "" >/dev/null; then
AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
fi
@@ -7695,7 +7691,7 @@ if test "$ENABLE_JAVA" != ""; then
_jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
if test "$_jdk_ver" -lt 10900; then
- AC_MSG_ERROR([JDK is too old, you need at least 9])
+ AC_MSG_ERROR([JDK is too old, you need at least 9 ($_jdk_ver < 10900)])
fi
if test "$_jdk_ver" -gt 10900; then
JAVA_CLASSPATH_NOT_SET=TRUE
@@ -10620,8 +10616,9 @@ fi
dnl =========================================
dnl Check for uuidgen
dnl =========================================
-if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
- # presence is already tested above in the WINDOWS_SDK_HOME check
+if test "$_os" = "WINNT"; then
+ # we must use the uuidgen from the Windows SDK, which will be in the LO_PATH, but isn't in
+ # the PATH for AC_PATH_PROG. It is already tested above in the WINDOWS_SDK_HOME check.
UUIDGEN=uuidgen.exe
AC_SUBST(UUIDGEN)
else
@@ -10760,18 +10757,17 @@ dnl testing assembler path
dnl ***************************************
ML_EXE=""
if test "$_os" = "WINNT"; then
- if test "$BITNESS_OVERRIDE" = ""; then
- assembler=ml.exe
- else
- assembler=ml64.exe
- fi
+ case "$WIN_HOST_ARCH" in
+ x86) assembler=ml.exe ;;
+ x64) assembler=ml64.exe ;;
+ esac
AC_MSG_CHECKING([for the MSVC assembler ($assembler)])
- if test -f "$CL_PATH/$assembler"; then
- ML_EXE=`win_short_path_for_make "$CL_PATH/$assembler"`
+ if test -f "$MSVC_HOST_PATH/$assembler"; then
+ ML_EXE=`win_short_path_for_make "$MSVC_HOST_PATH/$assembler"`
AC_MSG_RESULT([$ML_EXE])
else
- AC_MSG_ERROR([not found])
+ AC_MSG_ERROR([not found in $MSVC_HOST_PATH])
fi
fi
@@ -11305,11 +11301,7 @@ if test "$ENABLE_SKIA" = TRUE -a "$COM_IS_CLANG" != TRUE; then
if test -x "$VC_PRODUCT_DIR/Tools/Llvm/bin/clang-cl.exe"; then
CLANG_CC=`win_short_path_for_make "$VC_PRODUCT_DIR/Tools/Llvm/bin/clang-cl.exe"`
dnl explicitly set -m32/-m64
- if test "$BITNESS_OVERRIDE" = ""; then
- CLANG_CC="$CLANG_CC -m32"
- else
- CLANG_CC="$CLANG_CC -m64"
- fi
+ CLANG_CC="$CLANG_CC -m$WIN_HOST_BITS"
CLANG_CXX="$CLANG_CC"
AC_MSG_RESULT([$CLANG_CC])
else
@@ -11639,8 +11631,6 @@ elif test "$_os" = "Linux" -o "$_os" = "Darwin" -o "$_os" = "WINNT" ; then
if test "$_os" != "WINNT"; then
GPG_ERROR_LIBS="-L${WORKDIR}/UnpackedTarball/libgpg-error/src/.libs -lgpg-error"
LIBASSUAN_LIBS="-L${WORKDIR}/UnpackedTarball/libassuan/src/.libs -lassuan"
- elif test "$host_cpu" = "i686" -a "$WINDOWS_SDK_ARCH" = "x64"; then
- AC_MSG_ERROR(gpgme cannot be built on cygwin32 for Win64.)
fi
fi
ENABLE_GPGMEPP=TRUE
@@ -13298,37 +13288,22 @@ if test "$build_os" = "cygwin"; then
ILIB="$ILIB;$JAVA_HOME/lib"
fi
ILIB1=-link
- if test "$BITNESS_OVERRIDE" = 64; then
- ILIB="$ILIB;$COMPATH/lib/x64"
- ILIB1="$ILIB1 -LIBPATH:$COMPATH/lib/x64"
- ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/x64"
- ILIB1="$ILIB1 -LIBPATH:$WINDOWS_SDK_HOME/lib/x64"
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list