diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-12-11 17:26:59 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-12-11 17:47:26 +0100 |
commit | 71d7532f59b6e87729617d6c91bf65f7364ac78a (patch) | |
tree | 57811bfd3a422e7821d2a0de30e787c78efb14e6 /odk | |
parent | 3331aecdf89c0b275fb8234414c6a8281114ae33 (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
Diffstat (limited to 'odk')
-rw-r--r-- | odk/settings/settings.mk | 14 |
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" |