Update of /cvsroot/fink/experimental/jfmertens/main/finkinfo/sci
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv3889

Modified Files:
        atlas.info 
Log Message:
A shot in the dark for G4's..

Index: atlas.info
===================================================================
RCS file: /cvsroot/fink/experimental/jfmertens/main/finkinfo/sci/atlas.info,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- atlas.info  22 Nov 2007 23:56:14 -0000      1.8
+++ atlas.info  26 Nov 2007 02:24:52 -0000      1.9
@@ -37,7 +37,7 @@
 License: BSD
 # since we're experimenting with building a dylib :
 BuildDependsOnly: true
-BuildDepends: gcc42, fink (>= 0.27.9)
+BuildDepends: gcc42, fink (>= 0.27.99)
 ## validator would like "fink (>= 0.27.99)", but then users complain.. Just 
trying to get past the validator..
 Depends: gcc42-shlibs 
 PatchScript: <<
@@ -46,6 +46,23 @@
 # -fgcse-after-reload -fsched-interblock -freorder-blocks also _ though 
they're implied by -O3 !
 ## Try this : (no: archinfo_linux doesn't seem to be used)
 #perl -pi -e 's,7455,7450,' ATLAS/CONFIG/src/backend/archinfo_linux.c
+## Try this (doesn't come out well with /usr/bin/sed, which doesn't respect 
initial spacing, but OK anyway):
+## Update according to http://www.cocoadev.com/index.pl?MacintoshModels (or 
any better source...)
+## might be more reliable, once one knows one is in a Apple-ppc type machine, 
to call `machine` ..
+## or else at least to solve the remaining unknown cases with that ...
+sed -i.bak -e '/PPCG4/,/PPCG5/c\
+            if (strstr(res, "7") || strstr(res, "8") || strstr(res, "9") || 
strstr(res, "11") || strstr(res, "12")) mach = PPCG5;\
+            else if (strstr(res, "1,2") || strstr(res, "c3") || strstr(res, 
"c5")) mach = PPCG4;\
+         }\
+         else if (strstr(res, "PowerBook"))\
+         {\
+            if (strstr(res, "5") || strstr(res, "6") || strstr(res, "3,2") || 
strstr(res, "3,3") || strstr(res, "3,4")) mach = PPCG4;\
+         }\
+         else if (strstr(res, "RackMac"))\
+         {\
+            if (strstr(res, "3")) mach = PPCG5;\
+            else mach = PPCG4;' \
+       CONFIG/src/backend/archinfo_freebsd.c
 cd ..; ln -s lapack-3.1.1 LAPACK
 cd LAPACK
 sed -e 's|g77|gfortran|g' < INSTALL/make.inc.LINUX > make.inc
@@ -69,8 +86,8 @@
  export PATH=`pwd`:$PATH
  cd bld
  ../ATLAS/configure -v 2 --prefix=%p 
--with-netlib-lapack=%b/../LAPACK/lapack_LINUX.a -b 32 -F ic "$iflags" -F if 
"$iflags"
- m=`machine`; if test $m = ppc7400 -o $m = ppc7450 ; then \
-       sed -i.bak -e 's,^\( *ARCH =\).*,\1 PPCG432AltiVec,' -e 's,ARCHDEFS =,& 
-DATL_AVgcc' Make.inc ; fi
+ # m=`machine`; if test $m = ppc7400 -o $m = ppc7450 ; then \
+ #     sed -i.bak -e 's,^\( *ARCH =\).*,\1 PPCG432AltiVec,' -e 's,ARCHDEFS =,& 
-DATL_AVgcc' Make.inc ; fi
  make
 <<
 InfoTest: <<
@@ -109,26 +126,33 @@
  fi
  # we now make shared libs (experimental); easier to just write the command 
here than to fix lib/Makefile ...
  # put this here to make sure it is after the testscript, else dylib might 
affect timings.
- # The '-m' flag at the end is dirty trick to get around an "undefined symbol" 
for _MAIN__, from -lgfortranbegin;
+ # When linking with gfortran, he '-m' flag at the end is dirty trick to get 
around an "undefined symbol" for _MAIN__, from -lgfortranbegin;
  # _ it swallows the immediately following -lgfortranbegin in the command 
transmitted to /usr/bin/libtool ...
  # There are no undefined symbols w/o "from ..." in the resulting dylib.
  # Is it the -all_load flag that causes the symbol "_main" from 
libgfortranbegin.a to be loaded ?
+ # In fact we link even lf77blas and llapack with gcc, adding explicitly 
-lgfortran,
+ # because this removes from the load commands the unnecessary 
%p/lib/gcc4.2/lib/libgcc_s.1.dylib,
+ # and also removes "-macosx_version_min 10.3" from the link line.
+ ## In fact, this doesn't ! (maybe because we changed gcc to cc in the 
commands below ?
+ ## only change I remember ..)  _ At worst we'll have to link with ld .. (as 
in the Makefile :) )
+ ## let us first try once more with gcc instead of cc (though I'd prefer to 
use cc here, since it is the interface with other pkgs)
  flags="-dynamiclib -single_module -Wl,-x -dead_strip -all_load -install_name"
  if test `uname -r|sed -e 's,\..*,,'` -ge 9; then flags="-dead_strip_dylibs 
$flags"; fi
  gcc $flags %p/lib/libatlas.dylib -o libatlas.dylib libatlas.a
  gcc $flags %p/lib/libcblas.dylib -o libcblas.dylib libcblas.a libatlas.dylib
- gfortran $flags %p/lib/libf77blas.dylib -o libf77blas.dylib libf77blas.a 
libatlas.dylib -m
- gfortran $flags %p/lib/liblapack.dylib -o liblapack.dylib liblapack.a 
libcblas.dylib libf77blas.dylib libatlas.dylib -m
+ gcc $flags %p/lib/libf77blas.dylib -o libf77blas.dylib libf77blas.a 
libatlas.dylib -L%p/lib/gcc4.2/lib -lgfortran
+ gcc $flags %p/lib/liblapack.dylib -o liblapack.dylib liblapack.a 
libcblas.dylib libf77blas.dylib libatlas.dylib -L%p/lib/gcc4.2/lib -lgfortran
  #### the rest is optional _ no idea of a correct exported symbols list for 
libatlas...
+ #### probably to be removed for a commit _ it gains an enormous decrease in 
the # of symbols exported by the lib,
+ #### but size goes down only from ~ 2.8M to 2.3M
  nm -mfgu liblapack.dylib libcblas.dylib libf77blas.dylib|fgrep ' (from 
libatlas'|sed -e 's, (from .*,,' -e 's,.* ,,'|sort -u > lst
  install_name_tool -id %p/lib/libatlas_full.dylib libatlas.dylib
  mv libatlas.dylib libatlas_full.dylib
- gcc $flags %p/lib/libatlas.dylib -o libatlas.dylib libatlas.a 
-exported_symbols_list lst
- # fortran libs still have %p/lib/gcc4.2/lib/libgcc_s.1.dylib unnecessarily 
among their load commands (not on 10.5)
- # _ don't know yet how to remove that cleanly (except by issuing the ld 
command myself ..)
+ cc $flags %p/lib/libatlas.dylib -o libatlas.dylib libatlas.a 
-exported_symbols_list lst
  cd ..
  make install DESTDIR=%i
  cp -pPR lib/*.{a,dylib} %i/lib
+ rm %i/lib/libtstatlas.a
  find %i/lib -type f -name '*.a' -exec ranlib \{\} \;
  chmod -R a-x %i/lib
  chmod -R a+rX %i/share


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to