For the deb cross building scripts to build for arm-wince I'm starting
from the regular building script and just extending it to do cross building.
Applying this (slightly dodgy, in-progress) diff:
Index: create_fpc_deb.sh
===================================================================
--- create_fpc_deb.sh (revision 13066)
+++ create_fpc_deb.sh (working copy)
@@ -105,25 +105,20 @@
# architecture dependent stuff
Arch=`dpkg --print-architecture`
-if [ "$Arch" = i386 ]; then
- ppcbin=ppc386
-else
- if [ "$Arch" = amd64 ]; then
- ppcbin=ppcx64
- else
- if [ "$Arch" = powerpc ]; then
- ppcbin=ppcppc
- else
- if [ "$Arch" = sparc ]; then
- ppcbin=ppcsparc
- else
- echo "$Arch is not supported."
- exit -1
- fi
- fi
- fi
+CPU_TARGET="${CPU_TARGET:-$Arch}"
+case "$CPU_TARGET" in
+ i386) ppcbin=ppc386;;
+ amd64) ppcbin=ppcx64;;
+ powerpc) ppcbin=ppcppc;;
+ sparc) ppcbin=ppcsparc;;
+ arm) ppcbin=ppcarm;;
+ *) echo "$CPU_TARGET is not supported."
+ exit -1;;
+esac
+
+if [ "$CPU_TARGET" != "$Arch" ]
+then TARGET_SUFFIX="$CPU_TARGET-"
fi
-
#------------------------------------------------------------------------------
# setup variables
@@ -204,7 +199,7 @@
# build fpc
mkdir -p $FPCBuildDir/etc
cd $FPCSrcDir
- make clean all
+ make clean all ${CPU_TARGET:+CPU_TARGET=$CPU_TARGET} OS_TARGET=wince
mkdir -p $DebianInstallDir
make install INSTALL_PREFIX=$DebianInstallDir
cd -
I also install:
dpkg -i binutils-multiarch pocketpc-binutils pocketpc-gas pocketpc-sdk
and then do:
sudo ln -s /usr/bin/arm-wince-pe-as /usr/bin/arm-wince-as
I then build with:
CPU_TARGET=arm ./create_fpc_deb.sh fpc /home/sam/lazarus/fpc/
but it fails on the postgres modules:
dbf_pgfile.pas(795,23) Error: Identifier not found "LockFile"
dbf_pgfile.pas(809,23) Error: Identifier not found "UnlockFile"
Any hints, or hints on making it not build postgres?
...
...
make[5]: Entering directory
`/tmp/fpc_patchdir/fpc/packages/fcl-db/src/sqldb/postgres'
/tmp/fpc_patchdir/fpc/compiler/ppcrossarm -Twince -Parm -XParm-wince-
-Xr -Ur -Xs -O2 -n -S2 -Fu/tmp/fpc_patchdir/fpc/rtl/units/arm-wince
-Fu/tmp/fpc_patchdir/fpc/packages/base/postgres/units/arm-wince -FE.
-FU/tmp/fpc_patchdir/fpc/packages/fcl-db/units/arm-wince
-Fl/usr/lib/gcc/arm-wince-pe/3.4.2 -Flinclude
-Fl/etc/ld.so.conf.d/*.conf -Fl/usr/lib/atlas -darm -dRELEASE
pqconnection.pp
make[5]: Leaving directory
`/tmp/fpc_patchdir/fpc/packages/fcl-db/src/sqldb/postgres'
make -C sqlite all
make[5]: Entering directory
`/tmp/fpc_patchdir/fpc/packages/fcl-db/src/sqldb/sqlite'
/tmp/fpc_patchdir/fpc/compiler/ppcrossarm -Twince -Parm -XParm-wince-
-Xr -Ur -Xs -O2 -n -S2 -Fu/tmp/fpc_patchdir/fpc/rtl/units/arm-wince
-Fu/tmp/fpc_patchdir/fpc/packages/base/sqlite/units/arm-wince -FE.
-FU/tmp/fpc_patchdir/fpc/packages/fcl-db/units/arm-wince -darm -dRELEASE
sqlite3conn.pp
make[5]: Leaving directory
`/tmp/fpc_patchdir/fpc/packages/fcl-db/src/sqldb/sqlite'
make[4]: Leaving directory `/tmp/fpc_patchdir/fpc/packages/fcl-db/src/sqldb'
make -C src/dbase all
make[4]: Entering directory
`/tmp/fpc_patchdir/fpc/packages/fcl-db/src/dbase'
/tmp/fpc_patchdir/fpc/compiler/ppcrossarm -Twince -Parm -XParm-wince-
-Xr -Ur -Xs -O2 -n -S2 -Sh -Fu/tmp/fpc_patchdir/fpc/rtl/units/arm-wince
-FE. -FU/tmp/fpc_patchdir/fpc/packages/fcl-db/units/arm-wince -darm
-dRELEASE dbf.pas
dbf_pgfile.pas(795,23) Error: Identifier not found "LockFile"
dbf_pgfile.pas(809,23) Error: Identifier not found "UnlockFile"
dbf_pgfile.pas(918) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
make[4]: *** [dbf.ppu] Error 1
make[4]: Leaving directory `/tmp/fpc_patchdir/fpc/packages/fcl-db/src/dbase'
make[3]: *** [src/dbase_all] Error 2
make[3]: Leaving directory `/tmp/fpc_patchdir/fpc/packages/fcl-db'
make[2]: *** [fcl-db_all] Error 2
make[2]: Leaving directory `/tmp/fpc_patchdir/fpc/packages'
make[1]: *** [packages_fcl_all] Error 2
make[1]: Leaving directory `/tmp/fpc_patchdir/fpc'
make: *** [build-stamp.arm-wince] Error 2
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives