summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-12-11 17:26:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-12-12 14:26:39 +0100
commit31950120038198908895525cfed35897694b7b8e (patch)
tree7fd31bdb8812d04cfa408e5d523cc8f218c4df2f /odk
parent3d4d6623a3545a33b0ba416cea9005b2c01e3e17 (diff)
odk: fix 32-bit Linux build on 64-bit OS
In this situation gcc/g++ will default to x86_64, so pass the "-m32" flag to produce x86 binaries. Change-Id: Ie31cd4240e353db606621cb03107ce03a74cfbef (cherry picked from commit 71d7532f59b6e87729617d6c91bf65f7364ac78a) Reviewed-on: https://gerrit.libreoffice.org/46260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'odk')
-rw-r--r--odk/settings/settings.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
index e21d33829ba9..25b31cd68fac 100644
--- a/odk/settings/settings.mk
+++ b/odk/settings/settings.mk
@@ -358,6 +358,10 @@ ifeq "$(PROCTYPE)" "powerpc"
CC_FLAGS+=-fPIC
endif
+ifeq "$(PROCTYPE)" "x86"
+CC_FLAGS+=-m32
+endif
+
SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV)
@@ -372,9 +376,19 @@ LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
ifeq "$(PROCTYPE)" "powerpc"
LIBRARY_LINK_FLAGS+=-fPIC
endif
+
+ifeq "$(PROCTYPE)" "x86"
+LIBRARY_LINK_FLAGS+=-m32
+endif
+
COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive
+
+ifeq "$(PROCTYPE)" "x86"
+EXE_LINK_FLAGS+=-m32
+endif
+
LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" -L"$(OO_SDK_JAVA_HOME)/lib"