Kaydet (Commit) eaf8e093 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Some initial baby steps towards cross-compilation

And some baby steps for cross-compiling for iOS in particular.
üst 3a44b0d2
......@@ -17,6 +17,14 @@ if test "$BUILD_DMAKE" != "NO"; then
if test ! -x "$SRC_ROOT/dmake/dmake$EXEEXT"; then
cd "$SRC_ROOT/dmake" || exit
# If cross-compiling then don't use the cross compilers to build dmake.
if test "$CROSS_COMPILING" = "yes"; then
CC=""
CXX=""
export CC
export CXX
fi
# Special case! The w32/tcsh build needs CC pointing to the MSVC++ compiler
# but we need a cygwin/gcc build dmake to understand the posix paths
if test "$GUI" = "WNT"; then
......
AC_INIT([LibreOffice], [3.3],,, [http://documentfoundation.org/])
AC_PREREQ(2.50)
AC_CANONICAL_SYSTEM
AC_PROG_CC
AC_PROG_CXX
echo CC_FOR_BUILD='${CC_FOR_BUILD:-'$CC'}' >&3
echo CXX_FOR_BUILD='${CXX_FOR_BUILD:-'$CXX'}' >&3
This diff is collapsed.
......@@ -272,5 +272,5 @@ done
[ -x "post_download" ] || { echo "'post_download' script not found, run ./autogen.sh." ; exit 1 ; }
./post_download || exit 1
./post_download --build=$BUILD_ALIAS --host=$HOST_ALIAS || exit 1
# vim:set shiftwidth=4 softtabstop=4 expandtab:
......@@ -24,7 +24,7 @@ case "$build_os" in
cygwin*) # Windows
_os=WINNT
;;
darwin*) # Mac OS X
darwin*) # Mac OS X or iOS
_os=Darwin
;;
freebsd*)
......
......@@ -8,7 +8,7 @@
# Description:
# set_soenv generates a file that contains all necessary
# environment variables for the build proces of OpenOffice
# on Linux, NetBSD, Solaris, Windows NT and Mac OS X/Darwin.
# on Linux, NetBSD, Solaris, Windows, Mac OS X and iOS.
#
# Program steps.
#
......@@ -102,8 +102,7 @@ my ( $dmake, $build, $build_client, $nmake, $mkout, $deliver, $zipdep );
#
# $platform is needed for PathFormat()
#
$platform = `./config.guess`;
chomp( $platform );
$platform = '@host_alias@';
$UPD = '@UPD@'; # the project's UPD
$newline = "\n"; # Perl newline character
......@@ -706,17 +705,29 @@ elsif ( $platform =~ m/cygwin/ )
}
}
elsif ( $platform =~ m/darwin/ )
{ print "Setting Mac OS X/Darwin specific values... ";
$BIG_SVX = "TRUE";
{ $BIG_SVX = "TRUE";
$COM = "GCC";
$COMPATH = '@COMPATH@';
if ($platform =~ m/^powerpc/)
if ($platform =~ m/^arm/)
{
print "Setting values for iOS... ";
$outfile = "iOSEnv.Set.sh";
$CPU = "R";
$CPUNAME = "ARM";
$OUTPATH = "unxiosr";
$GUI = "UNX";
$OS = "IOS";
$GUIBASE = "cocoatouch";
}
elsif ($platform =~ m/^powerpc/)
{
print "Setting values for Mac OS X/Darwin on PowerPC... ";
$outfile = "MacOSXPPCEnv.Set.sh";
$CPU = "P";
$CPUNAME = "POWERPC";
$OUTPATH = "unxmacxp";
$OS = "MACOSX";
$GUI = "UNX";
}
else
{
......@@ -725,13 +736,13 @@ elsif ( $platform =~ m/darwin/ )
$CPU = "I";
$CPUNAME = "INTEL";
$OUTPATH = "unxmacxi";
$OS = "MACOSX";
$GUI = "UNX";
}
$GUI = "UNX";
$GVER = "VCL";
$INPATH = $OUTPATH.$PROEXT;
$OS = "MACOSX";
$PATH_SEPERATOR = $ps;
# GUIBASE is set below; may be "aqua" or "unx".
# GUIBASE is set below for Mac OS X; may be "aqua" or "unx".
}
elsif ( $platform =~ m/dragonfly/ )
{
......@@ -933,7 +944,7 @@ $XINC = PathFormat('@XINC@'); # X11 includes
# Mac OS X/Darwin only variables.
if ( $platform =~ m/darwin/ )
if ( $platform =~ m/darwin/ && $platform !~ m/^arm/)
{ $FRAMEWORKSHOME = $ds."Developer".$ds."SDKs".$ds."MacOSX10.4u.sdk".$ds."System".$ds."Library".$ds."Frameworks";
if ( $XLIB eq "no_x_libraries" ) {
$GUIBASE = "aqua";
......@@ -1032,11 +1043,11 @@ elsif ($platform =~ m/linux|netbsd|freebsd|aix|openbsd|dragonfly/)
{
$SOLAREXTRALIB = $L.$par_dir.$LIB64;
}
elsif ($platform =~ m/darwin/)
elsif ($platform =~ m/darwin/ && $platform !~ m/^arm/)
{ $SOLAREXTRALIB = $L.$LIB.
$L.$USR.$LIB;
}
elsif ($platform !~ m/cygwin/ )
elsif ($platform !~ m/cygwin/ && $platform !~ m/^arm-apple/)
{ AddWarning( "set_soenv", "$platform not configured for linkage create libraries" );
}
......@@ -1424,7 +1435,7 @@ elsif ($platform =~ m/cygwin/)
$SOLARINC .= $I.PathFormat('@DIRECTXSDK_HOME@').$INCLUDE;
}
}
elsif ($platform =~ m/darwin/)
elsif ($platform =~ m/darwin/ && $platform !~ m/^arm/)
{ $SOLARINC .= $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Versions".$ds."Current".$ds."Headers".
$I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
# [ed] 6/15/02 Add in X11 headers as appropriate for the build
......@@ -1433,6 +1444,9 @@ elsif ($platform =~ m/darwin/)
$I.$XINC.$ds."freetype2";
}
}
elsif ($platform =~ m/^arm-apple/)
{
}
else
{ AddWarning( "set_soenv", "$platform not configured for system dependant include dir" );
}
......@@ -1631,7 +1645,7 @@ ToFile( "DYNAMIC_CRT", $DYNAMIC_CRT, "e" );
ToFile( "SET_EXCEPTIONS", $SET_EXCEPTIONS, "e" );
ToFile( "use_shl_versions", $use_shl_versions, "e" );
ToFile( "FLIPCMD", $FLIPCMD, "e" );
if ( $platform =~ m/darwin/ )
if ( $platform =~ m/darwin/ && $platform !~ m/^arm/)
{
# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build,
# build can assume functions/libraries of that version to be available
......@@ -1741,6 +1755,11 @@ ToFile( "SOLARINC", $SOLARINC, "e" );
ToFile( "COMP_ENV", $COMP_ENV, "e" );
ToFile( "JAVAHOME", $JAVAHOME, "e" );
ToFile( "CC", $CC, "e" );
ToFile( "CROSS_COMPILING", "@CROSS_COMPILING@","e" );
ToFile( "BUILD_ALIAS", "@build_alias@", "e" );
ToFile( "HOST_ALIAS", "@host_alias@", "e" );
ToFile( "CC_FOR_BUILD", "@CC_FOR_BUILD@", "e" );
ToFile( "CXX_FOR_BUILD", "@CXX_FOR_BUILD@", "e" );
ToFile( "HAVE_GCC_VISIBILITY_FEATURE",
"@HAVE_GCC_VISIBILITY_FEATURE@", "e" );
ToFile( "HAVE_GCC_VISIBILITY_BROKEN",
......
......@@ -163,6 +163,8 @@ else ifeq ($(OS),DRAGONFLY)
include $(GBUILDDIR)/platform/dragonfly.mk
else ifeq ($(OS),SOLARIS)
include $(GBUILDDIR)/platform/solaris.mk
else ifeq ($(OS),IOS)
include $(GBUILDDIR)/platform/ios.mk
else
$(eval $(call gb_Output_error,Unsupported OS: $(OS)))
endif
......
This diff is collapsed.
......@@ -527,6 +527,10 @@ RSC_LANG_ISO+:=$(completelangiso)
TARGETTYPE=CUI
.ENDIF
.IF "$(TARGETPLAFORM)"==""
TARGETPLATFORM=HOST
.ENDIF
# --- Pfade setzen -------------------------------------------------
# Output-Pfad
......@@ -884,7 +888,11 @@ CDEFS+=-DTIMELOG
CDEFSCXX=
CDEFSOBJ=
.IF "$(OS)"=="IOS"
CDEFSSLO=
.ELSE
CDEFSSLO=-DSHAREDLIB -D_DLL_
.ENDIF
CDEFSGUI=-DGUI
CDEFSCUI=-DCUI
#CDEFSMT=-DMULTITHREAD
......
......@@ -151,6 +151,10 @@
.INCLUDE : unxmacxi.mk
.ENDIF
.IF "$(COM)$(OS)$(CPU)" == "GCCIOSR"
.INCLUDE : unxiosr.mk
.ENDIF
.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXM"
.INCLUDE : unxlngmips.mk
.ENDIF
......
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
# --- Unix Environment for iOS cross-compilation -------------
.IF "$(TARGETPLATFORM)"=="BUILD"
CC:=$(CC_FOR_BUILD)
CXX:=$(CXX_FOR_BUILD)
.ENDIF
CFLAGS=-c $(EXTRA_CFLAGS)
LINKC*=$(CC)
LINK*=$(CXX)
LIBMGR*=ar
LIBFLAGS=-r
PROCESSOR_DEFINES=-DARM32
DLLPOST=
DLLPOSTFIX=
# flags to enable build with symbols
CFLAGSENABLESYMBOLS=-g
# Flag for including debugging information in object files
CFLAGSDEBUG=-g
CFLAGSDBGUTIL=
# Flag to specify output file to compiler/linker
CFLAGSOUTOBJ=-o
# # Include generic Mac OS X makefile
# .INCLUDE : unxmacx.mk
# --- general *ix settings ---
HC=hc
HCFLAGS=
PATH_SEPERATOR*=:
CDEFS+=-D__DMAKE
CDEFS+=-DUNIX
YACC*=yacc
YACCFLAGS*=-d -t
EXECPOST=
SCPPOST=.ins
DLLDEST=$(LB)
SOLARSHAREDBIN=$(SOLARLIBDIR)
......@@ -198,39 +198,4 @@ void
}
/* memmove is defined here because some vendors don't provide it at
all and others do a terrible job (like calling malloc) */
#if !defined(__IBMC__) && !defined(_WIN32) && !defined(__GLIBC__)
void *
memmove(void *dp, const void *sp, size_t n)
{
unsigned char *cdp, *csp;
if (n <= 0)
return 0;
cdp = dp;
csp = (unsigned char *) sp;
if (cdp < csp)
{
do
{
*cdp++ = *csp++;
} while (--n);
}
else
{
cdp += n;
csp += n;
do
{
*--cdp = *--csp;
} while (--n);
}
return 0;
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment