Commit cef26c7b authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: compile code explictly for the required architecture.

First step of fixing linking errors against libx264
parent 766e1564
...@@ -282,6 +282,20 @@ case "${host_os}" in ...@@ -282,6 +282,20 @@ case "${host_os}" in
OBJC="${OBJC} -isysroot ${with_macosx_sdk}" OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
LD="${LD} -syslibroot ${with_macosx_sdk}" LD="${LD} -syslibroot ${with_macosx_sdk}"
fi fi
if test "${host_cpu}" = "powerpc"; then
CPP="${CPP} -arch ppc"
CC="${CC} -arch ppc"
CXX="${CXX} -arch ppc"
OBJC="${OBJC} -arch ppc"
LD="${LD} -arch ppc"
fi
if test "${host_cpu}" = "i386"; then
CPP="${CPP} -arch i386"
CC="${CC} -arch i386"
CXX="${CXX} -arch i386"
OBJC="${OBJC} -arch i386"
LD="${LD} -arch i386"
fi
AC_ARG_WITH(macosx-version-min, AC_ARG_WITH(macosx-version-min,
[ --with-macosx-version-min=VERSION compile for MacOSX VERSION and above]) [ --with-macosx-version-min=VERSION compile for MacOSX VERSION and above])
if test "${with_macosx_version_min}" != "" ; then if test "${with_macosx_version_min}" != "" ; then
......
...@@ -129,7 +129,7 @@ case $HOST in ...@@ -129,7 +129,7 @@ case $HOST in
HAVE_DARWIN_9=1 HAVE_DARWIN_9=1
CFLAGS_TUNING=" -arch ppc -mtune=G4" CFLAGS_TUNING=" -arch ppc -mtune=G4"
EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}" EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}" EXTRA_LDFLAGS=" -arch ppc -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
CC="/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2" CC="/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2"
CXX="/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2" CXX="/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2"
LD="ld -arch ppc -syslibroot \${MACOSX_SDK}" LD="ld -arch ppc -syslibroot \${MACOSX_SDK}"
...@@ -155,11 +155,11 @@ case $HOST in ...@@ -155,11 +155,11 @@ case $HOST in
fi fi
echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak
echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk" >> config.mak echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk" >> config.mak
CFLAGS_TUNING=" -march=pentium-m -mtune=prescott" CFLAGS_TUNING=" -march=pentium-m -mtune=prescott -arch i386"
EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}" EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}" EXTRA_LDFLAGS=" -arch i386 -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
CC="/Developer/usr/llvm-gcc-4.2/bin/i686-apple-darwin9-llvm-gcc-4.2" CC="/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2"
CXX="/Developer/usr/llvm-gcc-4.2/bin/i686-apple-darwin9-llvm-g++-4.2" CXX="/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2"
echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
cat src/Distributions/darwin.mak >> distro.mak cat src/Distributions/darwin.mak >> distro.mak
if test -e /Developer/SDKs; then if test -e /Developer/SDKs; then
......
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