[SM-Commit] GIT changes to test grimoire by Jaka Kranjc : 08cf896b03f622f0795d39c0ec4cd99e27a270ca

seth at swoolley.homeip.net seth at swoolley.homeip.net
Tue May 30 10:06:28 EDT 2006


This fixes the problem but introduces another problem -- there's more 
than one 32-bit architecture, many of which aren't x86 clones.

Here's a guess:

What you want to do is add a check for x86_64 in addition to all the 
others and make sure the arch is 32-bit.  Leave the FAMILY line in 
there, but if the arch is 32-bit cut off the first character (which on 
an opteron would make "1586" creating "586") or set it to 586.

Seth

On Tue, May 30, 2006 at 08:35:39AM -0500, Jaka Kranjc wrote:
> GIT changes to test grimoire by Jaka Kranjc : 08cf896b03f622f0795d39c0ec4cd99e27a270ca <lynxlynxlynx at sourcemage.org>:
> 
>  libs/libconnect/HISTORY         |    4 ++++
>  libs/libconnect/PRE_BUILD       |    4 ++++
>  libs/libconnect/configure.patch |   27 +++++++++++++++++++++++++++
>  3 files changed, 35 insertions(+)
> 
> New commits:
> commit 08cf896b03f622f0795d39c0ec4cd99e27a270ca
> Merge: fac6ae9... 970939d...
> Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
> Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
> 
>     Merge branch 'master' of http://scm.sourcemage.org/smgl/grimoire
> 
> commit fac6ae9e03ac8883fe876c9810a117ca0f2f9431
> Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
> Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
> 
>     libconnect: fix broken cpu detection #12034
> 
> diff --git a/libs/libconnect/HISTORY b/libs/libconnect/HISTORY
> index 2fc8fd1..26815a1 100644
> --- a/libs/libconnect/HISTORY
> +++ b/libs/libconnect/HISTORY
> @@ -1,3 +1,7 @@
> +2006-05-29 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
> +	* PRE_BUILD: added to apply
> +	* configure.patch: added to fix broken cpu detection
> +
>  2006-03-12 Karsten Behrmann <BearPerson at sourcemage.org>
>  	* DETAILS: (automated) Add KEYWORDS
>  
> diff --git a/libs/libconnect/PRE_BUILD b/libs/libconnect/PRE_BUILD
> new file mode 100755
> index 0000000..6e9e0af
> --- /dev/null
> +++ b/libs/libconnect/PRE_BUILD
> @@ -0,0 +1,4 @@
> +default_pre_build     &&
> +cd $SOURCE_DIRECTORY  &&
> +sed -i "s,MYARCH,${SMGL_COMPAT_ARCHS[0]}," $SCRIPT_DIRECTORY/configure.patch &&
> +patch -p0 < $SCRIPT_DIRECTORY/configure.patch
> diff --git a/libs/libconnect/configure.patch b/libs/libconnect/configure.patch
> new file mode 100644
> index 0000000..b34f077
> --- /dev/null
> +++ b/libs/libconnect/configure.patch
> @@ -0,0 +1,27 @@
> +--- configure	2006-05-30 15:04:45.000000000 +0200
> ++++ configure	2006-05-30 15:05:35.000000000 +0200
> +@@ -30,22 +30,12 @@
> + done
> + 
> + echo -n "Checking for CPU type...  "
> +-if test -r "/proc/cpuinfo" ; then
> +-VENDO="`cat /proc/cpuinfo | grep 'vendor_id' | cut -d : -f2 | sed 's/ //g'`"
> +-if test "$VENDO" == "GenuineIntel" -o "$VENDO" == "AuthenticAMD" -o "$VENDO" == "CyrixInstead" \
> +- -o "$VENDO" == "UMC UMC UMC " -o "$VENDO" == "CentaurHauls" -o "$VENDO" == "NexGenDriven" \
> +- -o "$VENDO" == "RiseRiseRise" -o "$VENDO" == "GenuineTMx86" -o "$VENDO" == "TransmetaCPU"; then
> +-	FAMILY="`cat /proc/cpuinfo | grep 'cpu family' | cut -d : -f 2 | sed 's/ //g'`86"
> +-	echo "$FAMILY or clone."
> ++if [[ MYARCH == 32 ]]; then
> ++  echo "32 bit"
> + else
> + 	echo "Sorry. This library works only on Intel x86 and clone CPUs."
> + 	exit 1
> + fi
> +-else
> +-	echo "error."
> +-	echo "Sorry, can't determine current your CPU type. Assuming CPU type to 386"
> +-fi
> +-
> + 
> + echo -n "Checking for nasm...  "
> + if test -z "`which nasm`"; then
> _______________________________________________
> SM-Commit mailing list
> SM-Commit at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-commit



More information about the SM-Commit mailing list