[vlc-commits] commit: contribs: correctly setup cmake toolchain when cross-compiling on Mac OS X ( =?UTF-8?Q?Felix=20Paul=20K=C3=BChne=20?=)

git at videolan.org git at videolan.org
Fri Dec 31 14:09:11 CET 2010


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Dec 31 14:08:28 2010 +0100| [10cca3218348f5ee13c7316b35c15cfba5178d6b] | committer: Felix Paul Kühne 

contribs: correctly setup cmake toolchain when cross-compiling on Mac OS X

and a few other fixes

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10cca3218348f5ee13c7316b35c15cfba5178d6b
---

 extras/contrib/bootstrap |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/extras/contrib/bootstrap b/extras/contrib/bootstrap
index c93ef31..078b9a4 100755
--- a/extras/contrib/bootstrap
+++ b/extras/contrib/bootstrap
@@ -207,9 +207,6 @@ case $TARGET in
 
         CFLAGS_TUNING=" -arch ppc -mtune=G4"
         EXTRA_LDFLAGS=" -arch ppc"
-
-        # FIXME - this one seems to be redundant?
-        LD="ld -arch ppc -syslibroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
     ;;
     i686-apple-darwin*)
         hint_distro macosx32
@@ -328,6 +325,10 @@ case "$DISTRO" in
     EXTRA_CFLAGS="${EXTRA_CFLAGS} -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
     CC="/usr/bin/gcc-4.2"
     CXX="/usr/bin/g++-4.2"
+    LD="ld"
+    RANLIB="ranlib"
+    AR=
+    STRIP="strip"
     add_makefile_cfg "PATH = /bin:/usr/bin:/usr/local/bin"
     add_makefile_cfg "SDK_TARGET = ${SDK_TARGET}"
     add_makefile_cfg "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}"
@@ -404,6 +405,12 @@ if test "$TARGET" != "$BUILD"; then
     if test ${DISTRO} = "win32"; then
         echo "SET(CMAKE_SYSTEM_NAME Windows)" >> "${toolchain_cmake}"
     fi
+    if test ${DISTRO} = "macosx64"||"macosx32"; then
+        echo "SET(CMAKE_SYSTEM_NAME Darwin)" >> "${toolchain_cmake}"
+        echo "set(CMAKE_C_FLAGS ${CFLAGS_TUNING} ${EXTRA_CFLAGS})" >> "${toolchain_cmake}"
+        echo "set(CMAKE_CXX_FLAGS ${CFLAGS_TUNING} ${EXTRA_CFLAGS})" >> "${toolchain_cmake}"
+        echo "set(CMAKE_LD_FLAGS ${EXTRA_LDFLAGS})" >> "${toolchain_cmake}"
+    fi
     echo "SET(CMAKE_C_COMPILER ${CC})" >> "${toolchain_cmake}"
     echo "SET(CMAKE_CXX_COMPILER ${CXX})" >> "${toolchain_cmake}"
     echo "SET(CMAKE_FIND_ROOT_PATH  `pwd` )" >> "${toolchain_cmake}"
@@ -451,19 +458,19 @@ fi
 
 if test "$DISTRO" = "macosx32"; then
     info "*****************************************************************"
-    info "* VLC will be compiled in 32bit mode.                           *"
+    info "* VLC will be compiled in 32bit mode using the 10.5 & later SDK.*"
     info "*                                                               *"
     info "* Re-run with the x86_64-apple-darwin* argument to turn on      *"
     info "* 64bit compilation for Intel-based Macs, whereas * is either   *"
     info "* 9 or 10 depending on your Darwin version.                     *"
-    info "* There is NO PPC64 support right now.                          *"
+    info "* There is no PPC64 support.                                    *"
     info "*****************************************************************"
 fi
 
 if test "$DISTRO" = "macosx64"; then
     info
     info "*****************************************************************"
-    info "* VLC will be compiled in 64bit mode using the 10.5 SDK.        *"
+    info "* VLC will be compiled in 64bit mode using the 10.5 & later SDK.*"
     info "*****************************************************************"
 fi
 
@@ -471,9 +478,9 @@ case `uname` in
     Linux)
         CPUS=`grep -c ^processor /proc/cpuinfo`
      ;;
-    Darwin)
-        CPUS=`sysctl hw.ncpu|cut -d: -f2`
-    ;;
+#    Darwin)
+#        CPUS=`sysctl hw.ncpu|cut -d: -f2`
+#    ;;
     *)
         CPUS=1  # default
      ;;



More information about the vlc-commits mailing list