From: liangzhen Date: Wed, 11 Jan 2006 06:22:54 +0000 (+0000) Subject: 1. Eliminate -m64 option while building kextensions in OS X (Kernel X-Git-Tag: v1_7_100~548 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=242f41be74ea3a113b766027776497295ba083ae 1. Eliminate -m64 option while building kextensions in OS X (Kernel of OS X, both Panther and Tiger, are 32bits. Although Tiger supports 64bits applications). 2. A little change to Darwin building cflags. --- diff --git a/build/autoconf/lustre-build-darwin.m4 b/build/autoconf/lustre-build-darwin.m4 index 101e60c..f5e9443 100644 --- a/build/autoconf/lustre-build-darwin.m4 +++ b/build/autoconf/lustre-build-darwin.m4 @@ -49,6 +49,11 @@ case $target_cpu in EXTRA_KLDFLAGS="-arch i386" ;; esac + +# Kernel of OS X is not 64bits(even in Tiger), but -m64 can be taken by gcc in Tiger +# (Tiger can support 64bits applications), so we have to eliminate -m64 while +# building kextensions for and OS X. +CC=`echo $CC | sed -e "s/\-m64//g"` EXTRA_KCFLAGS="$EXTRA_KCFLAGS -x c -pipe -Wno-trigraphs -fasm-blocks -g -O0" EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-four-char-constants -Wmost -O0" EXTRA_KCFLAGS="$EXTRA_KCFLAGS -fmessage-length=0 -ffix-and-continue" @@ -61,7 +66,7 @@ EXTRA_KCFLAGS="$EXTRA_KCFLAGS -force_cpusubtype_ALL -fno-exceptions" EXTRA_KCFLAGS="$EXTRA_KCFLAGS -msoft-float -static" EXTRA_KCFLAGS="$EXTRA_KCFLAGS -DKERNEL -DKERNEL_PRIVATE" EXTRA_KCFLAGS="$EXTRA_KCFLAGS -DDRIVER_PRIVATE -DAPPLE -DNeXT" -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__KERNEL__ -D__DARWIN__" +EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__KERNEL__" # # C flags for Panther/Tiger # @@ -70,7 +75,7 @@ case $target_os in EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__DARWIN8__" ;; darwin7*) - EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__DARWIN7__" + EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__DARWIN__" ;; esac