Bladeren bron

2008-08-28 Geoff Norton <[email protected]>

        * build-iphone.sh: iPhone lies about HAVE_MMAP as well.

2008-08-26  Geoff Norton  <[email protected]>

        * build-iphone.sh: Update build-iphone to not wget old inssel's, and build
        out of the box with teh current SDK.

svn path=/trunk/mono/; revision=111874
Geoff Norton 17 jaren geleden
bovenliggende
commit
1c48dcdfb2
2 gewijzigde bestanden met toevoegingen van 56 en 11 verwijderingen
  1. 9 1
      ChangeLog
  2. 47 10
      build-iphone.sh

+ 9 - 1
ChangeLog

@@ -1,7 +1,15 @@
+2008-08-28  Geoff Norton  <[email protected]>
+
+	* build-iphone.sh: iPhone lies about HAVE_MMAP as well.
+
+2008-08-26  Geoff Norton  <[email protected]>
+
+	* build-iphone.sh: Update build-iphone to not wget old inssel's, and build
+	out of the box with teh current SDK.
+
 2008-08-28  Zoltan Varga  <[email protected]>
 
 	* scripts/Makefile.am (scripts_2_0): Add gacutil2.
-
 	* scripts/gacutil2: New file.
 
 2008-08-22  Jb Evain  <[email protected]>

+ 47 - 10
build-iphone.sh

@@ -2,26 +2,63 @@
 ASPEN_ROOT=/Developer/Platforms/iPhoneOS.platform/Developer
 ASPEN_SDK=$ASPEN_ROOT/SDKs/iPhoneOS2.0.sdk/
 
-export PATH=$ASPEN_ROOT/usr/bin:$PATH
+ORIG_PATH=$PATH
+GLIB_FLAGS=`pkg-config --cflags --libs glib-2.0`
 
-export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
-export CPLUS_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
-export CC=arm-apple-darwin9-gcc-4.0.1
-export CXX=arm-apple-darwin9-g++-4.0.1
-export CPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
-export CXXPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
-export LD=$CC
-export LDFLAGS=-Wl,-syslibroot,$ASPEN_SDK
+if [ -z "$GLIB_FLAGS" ]; then
+	echo "pkg-config could not locate glib-2.0 needed for the monoburg step"
+	exit;
+fi
+
+setenv () {
+	export PATH=$ASPEN_ROOT/usr/bin:$PATH
+
+	export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
+	export CPLUS_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
+	export CC=arm-apple-darwin9-gcc-4.0.1
+	export CXX=arm-apple-darwin9-g++-4.0.1
+	export CPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
+	export CXXPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
+	export LD=$CC
+	export LDFLAGS="-liconv -Wl,-syslibroot,$ASPEN_SDK"
+}
+
+unsetenv () {
+	export PATH=$ORIG_PATH
+
+	unset C_INCLUDE_PATH
+	unset CPLUS_INCLUDE_PATH
+	unset CC
+	unset CXX
+	unset CPP
+	unset CXXPP
+	unset LD
+	unset LDFLAGS
+}
 
 export mono_cv_uscore=yes
 export cv_mono_sizeof_sunpath=104
 export ac_cv_func_posix_getpwuid_r=yes
 export ac_cv_func_backtrace_symbols=no
 
+
+setenv
+
 pushd eglib 
 ./autogen.sh --host=arm-apple-darwin9
 popd
 
-./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded --with-gc=none $@
+./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded $@
+perl -pi -e 's/MONO_SIZEOF_SUNPATH 0/MONO_SIZEOF_SUNPATH 104/' config.h
+perl -pi -e 's/#define HAVE_FINITE 1//' config.h
+perl -pi -e 's/#define HAVE_MMAP 1//' config.h
+make
+
+unsetenv
+pushd mono/monoburg
+/usr/bin/gcc -o monoburg ./monoburg.c parser.c -I../.. -pthread -lm $GLIB_FLAGS
+make
+popd
 
+setenv
 make