components/ruby/ruby-19/patches/05-config.patch
changeset 1756 3579365335ef
equal deleted inserted replaced
1755:ad1cb0530c69 1756:3579365335ef
       
     1 Ensure we correctly identify a 64-bit build and
       
     2 use "amd64" and "sparcv9" for the 64-bit cpu string.
       
     3 Changes were developed in-house, are Solaris specific, 
       
     4 and are not suitable for upstream.
       
     5 
       
     6 diff -ru ruby-1.9.3-p484-orig//tool/config.guess ruby-1.9.3-p484/tool/config.guess
       
     7 --- ruby-1.9.3-p484-orig//tool/config.guess	Sat Sep 25 18:25:34 2010
       
     8 +++ ruby-1.9.3-p484/tool/config.guess	Tue Feb 25 15:36:05 2014
       
     9 @@ -331,25 +331,18 @@
       
    10  	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
       
    11  	exit ;;
       
    12      sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
       
    13 -	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
       
    14 +	# Check CFLAGS for the 64-bit compile option to set the arch
       
    15 +	SUN_ARCH="sparc"
       
    16 +	echo $CFLAGS | /usr/gnu/bin/grep -q -w '\-m64' && SUN_ARCH="sparcv9"
       
    17 +	echo ${SUN_ARCH}-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
       
    18  	exit ;;
       
    19      i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
       
    20  	echo i386-pc-auroraux${UNAME_RELEASE}
       
    21  	exit ;;
       
    22      i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
       
    23 -	eval $set_cc_for_build
       
    24  	SUN_ARCH="i386"
       
    25 -	# If there is a compiler, see if it is configured for 64-bit objects.
       
    26 -	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
       
    27 -	# This test works for both compilers.
       
    28 -	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
       
    29 -	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
       
    30 -		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
       
    31 -		grep IS_64BIT_ARCH >/dev/null
       
    32 -	    then
       
    33 -		SUN_ARCH="x86_64"
       
    34 -	    fi
       
    35 -	fi
       
    36 +	# Check CFLAGS for the 64-bit compile option to set the arch
       
    37 +	echo $CFLAGS | /usr/gnu/bin/grep -q -w '\-m64' && SUN_ARCH="amd64"
       
    38  	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
       
    39  	exit ;;
       
    40      sun4*:SunOS:6*:*)
       
    41 diff -ru ruby-1.9.3-p484-orig//tool/config.sub ruby-1.9.3-p484/tool/config.sub
       
    42 --- ruby-1.9.3-p484-orig//tool/config.sub	Sun Oct  3 08:06:23 2010
       
    43 +++ ruby-1.9.3-p484/tool/config.sub	Tue Feb 25 15:54:21 2014
       
    44 @@ -431,7 +431,7 @@
       
    45  		basic_machine=x86_64-pc
       
    46  		;;
       
    47  	amd64-*)
       
    48 -		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
       
    49 +		# don't change basic_machine
       
    50  		;;
       
    51  	amdahl)
       
    52  		basic_machine=580-amdahl