-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter O'Gorman wrote:
| Martin Costabel wrote:
|
|> Peter O'Gorman wrote:
|> []
|>
|>> The only thing I can think to do is to link with
|>> - -L/usr/lib/gcc/%m-apple-darwin8/4.0.0
|>> -L/usr/lib/gcc/%m-apple-darwin8/4.0.1
|>> - -L/usr/lib/gcc/%m-apple-darwin8/4.0.2 -lgcc
|>>
|>> The thing is broken on x86 too.
|>
|>
|>
|> I am not sure if this will work: Earlier on g77's command line, there
|> is  -L/sw/lib/gcc/powerpc-apple-darwin8.0.0/3.4.3 and -lgcc, which
|> evaluates to libgcc.a in that directory. If you have another -lgcc on
|> the command line, it's anybody's guess which one will be chosen.
|>
|
| You're right. Looks like you can invoke functions from the gcc spec file
| and one of the included functions is called "if-exists". Trying that now.
|

This seems to work for me. Note that if 4.0.0/libgcc.a and 4.0.1/libgcc.a
both exist, it will add both, but I don't think that is a big problem.

Peter

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iQCVAwUBQ3ZpJriDAg3OZTLPAQLyvgP9GxqX//H/FHn+BWZ6SJMx5PlMI9/R+ByO
InpT/hJ5pVw+x4W0pKTjbL6Z/awZaK8kyiVrNKsA2Sfp0mmSFgl76Qg8LtKtE3oQ
Joator5OCoQHAF8d1vEDl0urLuQ4LhCgio3ijKsiK/LGixnNxA77EiqTtgE/MWXe
3gT81G+2npI=
=oAyq
-----END PGP SIGNATURE-----
Index: g77.info
===================================================================
RCS file: 
/cvsroot/fink/dists/10.4-transitional/unstable/main/finkinfo/languages/g77.info,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 g77.info
--- g77.info    27 Apr 2005 03:25:58 -0000      1.1
+++ g77.info    12 Nov 2005 22:11:20 -0000
@@ -1,6 +1,6 @@
 Package: g77
 Version: 3.4.3
-Revision: 11
+Revision: 12
 BuildDependsOnly: true
 Source: mirror:gnu:gcc/gcc-%v/gcc-%v.tar.bz2
 Source-MD5: e744b30c834360fccac41eb7269a3011
@@ -15,7 +15,7 @@ PatchScript: <<
  mv Makefile.in Makefile.in.orig
  sed 's|$(ALL_CPPFLAGS) $(INCLUDES)|$(INCLUDES) $(ALL_CPPFLAGS)|g' < 
Makefile.in.orig > Makefile.in
  if test -f /usr/lib/libSystemStubs.a ; then
-   perl -pi.bak -e 
's|-lSystem|%%{!mlong-double-64:%%{pg:-lSystemStubs_profile;:-lSystemStubs}} 
-lSystem -lmx /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc.a|' 
config/darwin.h
+   perl -pi.bak -e 
's|-lSystem|%%{!mlong-double-64:%%{pg:-lSystemStubs_profile;:-lSystemStubs}} 
-lSystem -lmx %%:if-exists(/usr/lib/gcc/%m-apple-darwin8/4.0.0/libgcc.a) 
%%:if-exists(/usr/lib/gcc/%m-apple-darwin8/4.0.1/libgcc.a)|' config/darwin.h
  else
    perl -pi.bak -e 's|-lSystem|-lSystem /usr/lib/gcc/darwin/3.3/libgcc.a|' 
config/darwin.h
  fi
@@ -38,7 +38,7 @@ InstallScript: <<
  ln -s %p/bin/g77 f77
  darwinvers=`/usr/bin/uname -v | cut -f1 -d":" | awk '{print $4}'`
  gccvers=`%i/bin/g77 -dumpversion | head -n 1 | cut -f4 -d" "`
- ln -s %p/lib/gcc/powerpc-apple-darwin${darwinvers}/${gccvers}/include/g2c.h 
%i/include/g2c.h
+ ln -s %p/lib/gcc/%m-apple-darwin${darwinvers}/${gccvers}/include/g2c.h 
%i/include/g2c.h
  /bin/rm -rf %i/share/locale %i/man
  /bin/rm -f %i/lib/charset.alias
  /bin/rm -f %i/share/info/gcc* %i/share/info/cpp*

Reply via email to