# HG changeset patch
# User David Kirkby <david.kirkby@onetel.net>
# Date 1283087094 3600
# Node ID 212f0d972a4f025b701499685f4c27dd532161d7
# Parent 14a128bc2fbbe6e65f5ab5a21227b20c87abe3a3
#9808 Remove fake gcc file, and ensure 64bit builds work in a neater way.
diff r 14a128bc2fbb r 212f0d972a4f SPKG.txt
a

b


59  59  
60  60  == Changelog == 
61  61  
 62  === numpy$whatever (David Kirkby, $whoever) $whenever === 
 63  * Remove the file gcc_fake from the Numpy package, and instead 
 64  set the variable CC to consist of both the compiler and the flag 
 65  needed for 64bit builds on platforms where 64bits is not the default. 
 66  So typically, CC will be set to "gcc m64", though the solution is more 
 67  portable 
 68  
62  69  === numpy1.3.0.p4 (David Kirkby, 30th July, 2010) === 
63  70  * Apply what I believe is a correct fix to solve the issues 
64  71  with Numpy and 64bit builds. I believe the solution used 
diff r 14a128bc2fbb r 212f0d972a4f spkginstall
a

b


2  2  
3  3  CUR=`pwd` 
4  4  
5   if [ "$SAGE_LOCAL" = "" ]; then 
6   echo "SAGE_LOCAL undefined ... exiting"; 
 5  if [ z "$SAGE_LOCAL" ]; then 
 6  echo "SAGE_LOCAL undefined ... exiting" 
7  7  echo "Maybe run 'sage sh'?" 
8  8  exit 1 
9  9  fi 
10  10  
11   # numpy's distutils is buggy and runs a conftest without 
12   # taking CFLAGS into account. With 64 bit OSX this results 
13   # in *boom* 
14   if [ `uname` = "Darwin" a "$SAGE64" = "yes" ]; then 
15   echo "64 bit MacIntel: copying fake gcc" 
16   rm $SAGE_LOCAL/bin/gcc 
17   cp gcc_fake $SAGE_LOCAL/bin/gcc 
18   chmod 755 $SAGE_LOCAL/bin/gcc 
19   fi 
20   
21   # Personally (David Kirkby) I think the above method of using a fake gcc 
22   # is not the way to solve this problem, but I don't have 
23   # access to a 64bit OS X machine which defaults to 32bit. 
24   # Therfore I'm unwilling to remove that code for OS X, but will 
25   # implement a different solution for other platforms (mainly for 
26   # Solaris and OpenSolaris, but should work on any platform. 
 11  # Setting CFLAGS to have the option m64 does not work for Numpy when 
 12  # making 64bit builds on at least OS X and Solaris. Instead set CC 
 13  # to include the the m64 
27  14  
28  15  if [ z "$CFLAG64" ] ; then 
29  16  CFLAG64=m64 
30  17  fi 
31  18  
32   if [ "x$SAGE64" = xyes ] && [ "x`uname`" != xDarwin ] ; then 
 19  if [ "x$SAGE64" = xyes ] ; then 
33  20  CC="$CC $CFLAG64" 
34  21  export CC 
35  22  fi 
36   ####### End of nonOS X method to handle numpy ###### 
37  23  
38  24  if [ $UNAME = "CYGWIN" ]; then 
39  25  echo "CYGWIN: Patching src/numpy/linalg/setup.py" 
… 
… 

74  60  exit 1 
75  61  fi 
76  62  
77   if [ `uname` = "Darwin" a "$SAGE64" = "yes" ]; then 
78   echo "64 bit MacIntel: deleting fake gcc" 
79   rm $SAGE_LOCAL/bin/gcc 
80   fi 
81   
82  63  #echo "Checking the numpy.pxi file in the Sage source tree..." 
83  64  #$CUR/bin/updatepxi.py $CUR/src/numpy/doc/cython/numpy.pxi $SAGE_ROOT/devel/sage/sage/ext/numpy.pxi 
84  65  