Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Androidports master #17

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
85376f4
Enable to build tools for AndroidPorts.
androidports Oct 27, 2017
0613dba
Sal: Enable to build for AndroidPorts.
androidports Oct 27, 2017
c6959b3
CrossCompile: Fix for building tools in DESKTOP mode.
androidports Nov 2, 2017
9a072b2
Makefile: Fix for external build with system libraries.
androidports Nov 2, 2017
ae3dbe5
Liblangtag: Fix for suffix of library name for Android.
androidports Nov 2, 2017
09ddeef
Liborcus: Fix for AndroidPorts build.
androidports Nov 2, 2017
b0b2753
Curl: Fix for suffix of library name for Android.
androidports Nov 2, 2017
604ff7d
Clucene: Fix for AndroidPorts build.
androidports Nov 2, 2017
68f44df
Gpgme: Add patch for Android.
androidports Nov 2, 2017
bddb08d
Libetonyek: Fix for AndroidPorts build.
androidports Nov 2, 2017
3e9d520
Fix for AndroidPorts build.
androidports Nov 2, 2017
6fcec3f
Libabw: Override CXXFLAGS if CXXFLAGS is defined.
androidports Nov 2, 2017
ee59a85
Libcdr: Override CXXFLAGS if CXXFLAGS is defined.
androidports Nov 2, 2017
7e8fc4a
Libebook: Override CXXFLAGS if CXXFLAGS is defined.
androidports Nov 2, 2017
084e6cf
Libmspub: Override CXXFLAGS if CXXFLAGS is defined.
androidports Nov 2, 2017
a6c3717
Vcl: Fix for build without OpenGL.
androidports Nov 2, 2017
2bc337f
i18nutil: Fix for Andoird.
androidports Nov 2, 2017
a43d158
Libcdr: Add CXXFLAGS_CXX11 to CXXFLAGS to build as c++11.
androidports Nov 2, 2017
17a90cf
Libebook: Add CXXFLAGS_CXX11 to CXXFLAGS to build as c++11.
androidports Nov 2, 2017
4f57327
Libetonyek: Override CXXFLAGS if CXXFLAGS is defined. Consider LDFLAG…
androidports Nov 2, 2017
a3be36a
Libfreehand: Add CXXFLAGS_CXX11 to CXXFLAGS to build as c++11.
androidports Nov 2, 2017
82ce88a
Libmspub: Fix for CXXFLAGS.
androidports Nov 2, 2017
fb31c2a
Curl: Consider predefined LDFLAGS.
androidports Nov 2, 2017
de4efce
Libmwaw: Fix for AndroidPorts build.
androidports Nov 2, 2017
be9c1f7
Libodfgen: Fix for AndroidPorts build.
androidports Nov 2, 2017
c4f8553
Libpagemaker: Override CXXFLAGS if CXXFLAGS is defined.
androidports Nov 2, 2017
99edac2
Libstaroffice: Fix for AndroidPorts build.
androidports Nov 2, 2017
e98c2ed
Libvisio: Fix for CXXFLAGS.
androidports Nov 2, 2017
266a92a
Libwpd: Fix for AndroidPorts build.
androidports Nov 2, 2017
f65d4ff
Libwpg: Fix for AndroidPorts build.
androidports Nov 2, 2017
d3056f2
Libwps: Fix for AndroidPorts build.
androidports Nov 2, 2017
4f126e7
Libzmf: Override CXXFLAGS if CXXFLAGS is defined.
androidports Nov 2, 2017
337f1d4
Raptor: Consider predefined LDFLAGS.
androidports Nov 10, 2017
6ec95b1
Poppler: Fix for CXXFLAGS.
androidports Nov 10, 2017
73aec46
CrossCompile: Do not configure for target build if XXX_FOR_BUILD is d…
androidports Nov 10, 2017
373755c
ICU: Fix for icu_headers in SYSTEM_ICU=TRUE.
androidports Nov 10, 2017
bb5885b
Bridge: Fix for return value of double and float.
androidports Nov 10, 2017
99cf537
Bridge: Fix for crashing in Android.
androidports Mar 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,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 build-tools
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) CFLAGS="" CXXFLAGS="" LDFLAGS="" LIBS="" -f $(SRCDIR)/Makefile.gbuild build-tools

install-gdb-printers:
ifneq ($(filter-out WNT MACOSX IOS,$(OS)),)
Expand Down
27 changes: 23 additions & 4 deletions RepositoryExternal.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1354,19 +1354,38 @@ endif # SYSTEM_GRAPHITE

ifneq ($(SYSTEM_ICU),)

gb_LinkTarget__use_icu_headers:=
define gb_LinkTarget__use_icu_headers
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(ICU_CFLAGS) \
)

endef

gb_ExternalProject__use_icu:=

define gb_LinkTarget__use_icudata
$(call gb_LinkTarget_add_libs,$(1),-licudata)
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(ICU_CFLAGS) \
)
$(call gb_LinkTarget_add_libs,$(1),$(ICU_LIBS))

endef
define gb_LinkTarget__use_icui18n
$(call gb_LinkTarget_add_libs,$(1),-licui18n)
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(ICU_CFLAGS) \
)
$(call gb_LinkTarget_add_libs,$(1),$(ICU_LIBS))

endef
define gb_LinkTarget__use_icuuc
$(call gb_LinkTarget_add_libs,$(1),-licuuc)
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(ICU_CFLAGS) \
)
$(call gb_LinkTarget_add_libs,$(1),$(ICU_LIBS))

endef

Expand Down
2 changes: 2 additions & 0 deletions bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ namespace
pCppI->releaseProxy(); // non virtual call!
eRet = typelib_TypeClass_VOID;
break;
#if 0
case 0: // queryInterface() opt
{
typelib_TypeDescription * pTD = 0;
Expand Down Expand Up @@ -393,6 +394,7 @@ namespace
}
} // else perform queryInterface()
SAL_FALLTHROUGH;
#endif
default:
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
Expand Down
18 changes: 7 additions & 11 deletions bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace arm
}
}

void MapReturn(sal_uInt64 x0, sal_uInt64 x1, typelib_TypeDescriptionReference *pReturnType, sal_uInt64 *pRegisterReturn)
void MapReturn(sal_uInt64 x0, sal_uInt64 x1, float fret, double dret, typelib_TypeDescriptionReference *pReturnType, sal_uInt64 *pRegisterReturn)
{
switch( pReturnType->eTypeClass )
{
Expand All @@ -88,18 +88,10 @@ void MapReturn(sal_uInt64 x0, sal_uInt64 x1, typelib_TypeDescriptionReference *p
pRegisterReturn[0] = x0;
break;
case typelib_TypeClass_FLOAT:
register float fret asm("s0");
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
*(float*)pRegisterReturn = fret;
#pragma GCC diagnostic pop
break;
case typelib_TypeClass_DOUBLE:
register double dret asm("d0");
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
*(double*)pRegisterReturn = dret;
#pragma GCC diagnostic pop
break;
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION:
Expand Down Expand Up @@ -145,6 +137,8 @@ void callVirtualMethod(
// For value returned in registers
sal_uInt64 x0;
sal_uInt64 x1;
float s0;
double d0;

__asm__ __volatile__
(
Expand All @@ -160,7 +154,9 @@ void callVirtualMethod(
" blr %[pmethod]\n"
" str x0, %[x0]\n"
" str x1, %[x1]\n"
: [x0]"=m" (x0), [x1]"=m" (x1)
" str s0, %[s0]\n"
" str d0, %[d0]\n"
: [x0]"=m" (x0), [x1]"=m" (x1), [s0]"=m" (s0), [d0]"=m" (d0)
: [pgpr_0]"m" (pGPR[0]),
[pgpr_2]"m" (pGPR[2]),
[pgpr_4]"m" (pGPR[4]),
Expand All @@ -174,7 +170,7 @@ void callVirtualMethod(
: "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7"
);

MapReturn(x0, x1, pReturnType, (sal_uInt64 *) pRegisterReturn);
MapReturn(x0, x1, s0, d0, pReturnType, (sal_uInt64 *) pRegisterReturn);
}
}

Expand Down
59 changes: 56 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,22 @@ dragonfly*)
;;

linux-android*)
if test "$ANDROID_PORTS"; then
test_gtk=yes
build_gstreamer_1_0=no
build_gstreamer_0_10=no
test_tde=yes
test_kde4=yes
if test "$enable_fuzzers" != yes; then
test_freetype=yes
test_fontconfig=yes
else
test_freetype=no
test_fontconfig=no
BUILD_TYPE="$BUILD_TYPE FONTCONFIG FREETYPE"
fi
_os=Linux
else
build_gstreamer_1_0=no
build_gstreamer_0_10=no
enable_lotuswordpro=no
Expand All @@ -748,6 +764,7 @@ linux-android*)
test_randr=no
test_xrender=no
_os=Android
fi

AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX)
BUILD_TYPE="$BUILD_TYPE CAIRO FONTCONFIG FREETYPE"
Expand All @@ -759,6 +776,7 @@ linux-android*)
esac

if test "$_os" = "Android" ; then
if test -z "$ANDROID_PORTS"; then
# Verify that the NDK and SDK options are proper
if test -z "$with_android_ndk"; then
AC_MSG_ERROR([the --with-android-ndk option is mandatory, unless it is available at external/android-ndk/.])
Expand Down Expand Up @@ -789,6 +807,7 @@ if test "$_os" = "Android" ; then
add_warning " $ANDROID_SDK_HOME/tools/android update sdk -u --filter extra-android-m2repository"
add_warning "to allow the build to download the specified version of the android support libraries"
fi
fi
fi

if test "$_os" = "AIX"; then
Expand Down Expand Up @@ -2256,6 +2275,12 @@ dnl ===================================================================
AC_ARG_WITH(system-icu-for-build,
AS_HELP_STRING([--with-system-icu-for-build=yes/no/force],
[Use icu already on system for build tools (cross-compilation only).]))
AC_ARG_WITH(system-nss-for-build,
AS_HELP_STRING([--with-system-nss-for-build=yes/no],
[Use nss already on system for build tools (cross-compilation only).]))
AC_ARG_WITH(system-liblangtag-for-build,
AS_HELP_STRING([--with-system-liblangtag-for-build=yes/no],
[Use liblangtag already on system for build tools (cross-compilation only).]))


dnl ===================================================================
Expand Down Expand Up @@ -4129,11 +4154,19 @@ linux-gnu*)
;;

linux-android*)
if test "$ANDROID_PORTS"; then
COM=GCC
USING_X11=TRUE
OS=LINUX
RTL_OS=Linux
P_SEP=:
else
COM=GCC
USING_X11=
OS=ANDROID
RTL_OS=Android
P_SEP=:
fi

case "$host_cpu" in

Expand Down Expand Up @@ -4334,8 +4367,19 @@ dnl machine when doing cross-compilation
dnl ===================================================================

m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
m4_pattern_allow([PKG_CONFIG_PATH_FOR_BUILD])
m4_pattern_allow([PKG_CONFIG_LIBDIR])
if test "$cross_compiling" = "yes"; then
if test "$OS_FOR_BUILD" -a "$CC_FOR_BUILD" -a "$CXX_FOR_BUILD" -a "$INSTDIR_FOR_BUILD" -a "$INSTROOT_FOR_BUILD" -a "$INSTROOT_FOR_BUILD" -a $LIBO_BIN_FOLDER_FOR_BUILD -a "$LIBO_LIB_FOLDER_FOR_BUILD" -a "$LIBO_URE_LIB_FOLDER_FOR_BUILD" -a "$LIBO_URE_MISC_FOLDER_FOR_BUILD" -a "$SDKDIRNAME_FOR_BUILD" -a "$WORKDIR_FOR_BUILD"; then
(
cd $SRC_ROOT
cp $WORKDIR_FOR_BUILD/../config_host.mk config_build.mk
cp $WORKDIR_FOR_BUILD/../config_host_lang.mk $WORKDIR_FOR_BUILD/../config_build_lang.mk
cp $WORKDIR_FOR_BUILD/../config.log config.Build.log
mkdir -p config_build
cp $WORKDIR_FOR_BUILD/../config_host/*.h config_build
)
AC_MSG_RESULT([force BUILD platform configuration... done])
elif test "$cross_compiling" = "yes"; then
AC_MSG_CHECKING([for BUILD platform configuration])
echo
rm -rf CONF-FOR-BUILD config_build.mk
Expand Down Expand Up @@ -4363,21 +4407,25 @@ if test "$cross_compiling" = "yes"; then
cp configure CONF-FOR-BUILD
test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host 2>/dev/null
(
unset PKG_CONFIG_PATH ACLOCAL_PATH
unset COM USING_X11 OS CPUNAME
unset CC CXX SYSBASE CFLAGS
unset CC CXX SYSBASE CFLAGS CXXFLAGS LDFLAGS LIBS
unset AR NM OBJDUMP PKG_CONFIG RANLIB READELF STRIP
unset CPPUNIT_CFLAGS CPPUNIT_LIBS
unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC PKG_CONFIG_LIBDIR
test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
test -n "$PKG_CONFIG_PATH_FOR_BUILD" && export PKG_CONFIG_PATH="$PKG_CONFIG_PATH_FOR_BUILD"
cd CONF-FOR-BUILD
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 -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"
test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu" && unset ICU_CFLAGS ICU_LIBS
test "$with_system_nss_for_build" = "yes" && sub_conf_opts="$sub_conf_opts --with-system-nss" && unset NSS_CFLAGS NSS_LIBS
test "$with_system_liblangtag_for_build" = "yes" && sub_conf_opts="$sub_conf_opts --with-system-liblangtag" && unset LIBLANGTAG_CFLAGS LIBLANGTAG_LIBS
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 \
Expand Down Expand Up @@ -8893,6 +8941,7 @@ You can use --with-system-icu-for-build=force to use it anyway.])
ICU_MINOR=""
fi
fi
PKG_CHECK_MODULES(ICU,icu-uc icu-i18n)
else
AC_MSG_RESULT([internal])
SYSTEM_ICU=
Expand Down Expand Up @@ -10020,11 +10069,13 @@ elif test $_os = WINNT; then
ENABLE_OPENGL_CANVAS=TRUE
else
if test "$USING_X11" = TRUE; then
if test -z "$ANDROID_PORTS"; then
AC_CHECK_LIB(GL, glBegin, [:], AC_MSG_ERROR([libGL required.]))
ENABLE_OPENGL_TRANSITIONS=TRUE
AC_DEFINE(HAVE_FEATURE_OPENGL,1)
ENABLE_OPENGL_CANVAS=TRUE
fi
fi
fi

AC_SUBST(ENABLE_OPENGL_TRANSITIONS)
Expand Down Expand Up @@ -11921,6 +11972,7 @@ fi
AC_SUBST(OOO_VENDOR)

if test "$_os" = "Android" ; then
if test -z "$ANDROID_PORTS"; then
ANDROID_PACKAGE_NAME=
AC_MSG_CHECKING([for Android package name])
if test -z "$with_android_package_name" -o "$with_android_package_name" = "no"; then
Expand All @@ -11937,6 +11989,7 @@ if test "$_os" = "Android" ; then
AC_MSG_RESULT([$ANDROID_PACKAGE_NAME])
fi
AC_SUBST(ANDROID_PACKAGE_NAME)
fi
fi

AC_MSG_CHECKING([whether to install the compat oo* wrappers])
Expand Down
4 changes: 2 additions & 2 deletions external/Module_external.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,BREAKPAD,breakpad) \
$(call gb_Helper_optional,BSH,beanshell) \
$(call gb_Helper_optional,BZIP2,bzip2) \
$(call gb_Helper_optional,CAIRO,cairo) \
$(if $(filter-out $(SYSTEM_CAIRO),TRUE),$(call gb_Helper_optional,CAIRO,cairo)) \
$(call gb_Helper_optional,CDR,libcdr) \
$(call gb_Helper_optional,OPENCL,clew) \
$(call gb_Helper_optional,CLUCENE,clucene) \
Expand All @@ -40,7 +40,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,FIREBIRD,firebird) \
$(call gb_Helper_optional,FONTCONFIG,fontconfig) \
$(call gb_Helper_optional,FREEHAND,libfreehand) \
$(call gb_Helper_optional,FREETYPE,freetype) \
$(if $(filter-out $(SYSTEM_FREETYPE),TRUE),$(call gb_Helper_optional,FREETYPE,freetype)) \
$(call gb_Helper_optional,GLM,glm) \
$(call gb_Helper_optional,GPGMEPP,gpgme) \
$(call gb_Helper_optional,GRAPHITE,graphite) \
Expand Down
1 change: 1 addition & 0 deletions external/clucene/Library_clucene.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $(eval $(call gb_Library_add_libs,clucene,\
-lm \
-ldl \
-lpthread \
$(LIBS) \
))
endif

Expand Down
4 changes: 4 additions & 0 deletions external/clucene/UnpackedTarball_clucene.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ ifeq ($(OS),WNT)
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/_clucene-config.h,external/clucene/configs/_clucene-config-MSVC.h))
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/clucene-config.h,external/clucene/configs/clucene-config-MSVC.h))
else # ! $(OS),WNT
ifeq ($(ANDROID_PORTS),1)
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/clucene-config.h,external/clucene/configs/clucene-config-android.h))
else
ifeq ($(HAVE_GCC_BUILTIN_ATOMIC),TRUE)
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/clucene-config.h,external/clucene/configs/clucene-config-GCC-atomic.h))
else
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/clucene-config.h,external/clucene/configs/clucene-config-generic.h))
endif
endif
ifeq ($(OS),LINUX)
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/_clucene-config.h,external/clucene/configs/_clucene-config-LINUX.h))
else
Expand Down
8 changes: 8 additions & 0 deletions external/clucene/configs/_clucene-config-LINUX.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,16 @@

#define _O_RANDOM 0
#define _O_BINARY 0
#ifndef S_IREAD
#define _S_IREAD S_IRUSR
#else
#define _S_IREAD S_IREAD
#endif
#ifndef S_IWRITE
#define _S_IWRITE S_IWUSR
#else
#define _S_IWRITE S_IWRITE
#endif
#define _timeb timeb

#define _ILONG(x) x ## L
Expand Down
Loading