Bill Allombert on Sun, 25 Apr 2004 23:56:02 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: PATCH for compiling on AMD64


On Sun, Apr 25, 2004 at 09:41:33AM -0400, Don Parsons wrote:
> Link step requires this patch on x86_64:
> 
> --- config/get_cc.~1.22.~       2003-10-25 10:26:29.000000000 -0400
> +++ config/get_cc       2004-04-16 01:32:39.000000000 -0400
> @@ -119,7 +119,7 @@
>    DBGFLAGS=${DBGFLAGS:-"-g $warn"}
>    # Some architectures need -fPIC for building dynamic lib
>    case "$osname-$arch" in
> -    hpux-*|*-ia64) DLCFLAGS=-fPIC ;;
> +    hpux-*|*-ia64|*-x86_64) DLCFLAGS=-fPIC ;;
>      darwin-*) DLCFLAGS=-fno-common;;
>    esac
>    # Specific optimisations for some architectures
> 
> 
> Please apply to CVS.

Unfortunately, as far as I understand, this patch is not completly correct.
$arch refer to the architecture as see by the kernel (more or less
the hardware architecture). What is really important here is the 
build environnement. We should use -fPIC in 64bit mode but it is not
needed in 32bit mode. Unfortunately $arch will be x86_64 in both case.
Well at least it is my understanding.
 
You might be interested to try out the patch I sent to this list:
(http://pari.math.u-bordeaux.fr/archives/pari-dev-0404/msg00004.html)
which add optimized assembly support for x86_64 in 64bit mode.

Cheers,
Bill