diff -r d3c0d501a931 SPKG.txt
--- a/SPKG.txt	Sat Sep 11 15:08:31 2010 +0200
+++ b/SPKG.txt	Sat Sep 18 23:44:34 2010 +0200
@@ -83,6 +83,11 @@
 
 == Changelog ==
 
+=== pari-2.4.3.svn-12577.p7 (Jeroen Demeyer, September 17th, 2010) ===
+ * Add -fno-common to DLCFLAGS on all Darwin systems instead of
+   PPC/PPC64 only.
+ * Add upstream fix for rnfequation(,,1) over Q
+
 === pari-2.4.3.svn-12577.p6 (Jeroen Demeyer, September 11th, 2010) ===
  * Add upstream fix for config/get_dlcflags and remove the patch
  * Add upstream fix for bnfinit() and the rnfkummer test
diff -r d3c0d501a931 patches/1079_part1.patch
--- a/patches/1079_part1.patch	Sat Sep 11 15:08:31 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
---- src/basemath/base2.c
-+++ src/basemath/base2.c
-@@ -3344,10 +3344,7 @@ polcompositum0(GEN A, GEN B, long flall)
-     for (i=1; i<l; i++)
-     { /* invmod possibly very costly */
-       GEN D = gel(C,i), invH1 = QXQ_inv(H1, D);
--      if (typ(H0) == t_POL)
--        a = RgXQ_mul(RgX_neg(H0), invH1, D);
--      else /* scalar */
--        a = RgX_Rg_mul(invH1, gneg(H0));
-+      a = RgXQ_mul(RgX_neg(H0), invH1, D);
-       b = gadd(pol_x(v), gmulsg(k,a));
-       gel(C,i) = mkvec4(D, mkpolmod(a,D), mkpolmod(b,D), stoi(-k));
-     }
diff -r d3c0d501a931 patches/1079_part2.patch
--- a/patches/1079_part2.patch	Sat Sep 11 15:08:31 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- src/basemath/polarit3.c
-+++ src/basemath/polarit3.c
-@@ -2536,6 +2536,8 @@ END:
-   if (plambda) *plambda = lambda;
-   if (LERS)
-   {
-+    if (typ(H0)==t_INT) H0 = scalarpol(H0,vY);
-+    if (typ(H1)==t_INT) H1 = scalarpol(H1,vY);
-     *LERS = mkvec2(H0,H1);
-     gerepileall(av, 2, &H, LERS);
-     return H;
diff -r d3c0d501a931 patches/README.txt
--- a/patches/README.txt	Sat Sep 11 15:08:31 2010 +0200
+++ b/patches/README.txt	Sat Sep 18 23:44:34 2010 +0200
@@ -3,7 +3,7 @@
 longer, or are still but now for a different reason. (Do not delete that!)
 
 ======================================================================
-Files patched as of pari-2.4.3.svn-12577.p6:
+Files patched as of pari-2.4.3.svn-12577.p7:
 ======================================================================
 
 Configuration files:
@@ -14,6 +14,8 @@
 * config/get_config_options: Catch invalid arguments to "--graphic".
 * config/get_fltk; Add libstdc++; check presence of FLTK headers, too.
 * config/get_X11: Search X11 library in */lib64/*, too (not just */lib/*).
+* config/get_dlcflags: Add -fno-common to DLCFLAGS on Darwin.  Fixed
+  upstream, but probably in a bad way.
 
 Documentation:
 * doc/gphelp.in: cwitty: Disable TeX; allow bz2 compression.
@@ -26,7 +28,6 @@
 * src/kernel/gmp/mp.c: Needed so that Sage can catch PARI's error signals.
                        Also allow disabling use of "GMP internals".
 * src/language/init.c: Needed so that Sage can catch PARI's error signals.
-* src/basemath/base2.c and src/basemath/polarit3.c: Fix PARI bug 1079.
 
 ======================================================================
 Files previously patched:
@@ -62,8 +63,8 @@
   in place!
 * config/Makefile.SH: Change "test -e" to "test -f" for Solaris.  Fixed
   upstream
-* config/get_dlcflags: Add -fno-common to DLCFLAGS on Darwin.  Fixed
-  upstream
 * Configure: First line was changed from "#! /bin/sh" to
   "#!/usr/bin/env bash".  Now we directly call `bash Configure` instead
   in spkg-install.
+* src/basemath/base2.c and src/basemath/polarit3.c: Fix PARI bug 1079.
+  Now fixed upstream.
diff -r d3c0d501a931 patches/get_dlcflags.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/get_dlcflags.patch	Sat Sep 18 23:44:34 2010 +0200
@@ -0,0 +1,16 @@
+Index: config/get_dlcflags
+===================================================================
+--- config/get_dlcflags	(revision 12594)
++++ config/get_dlcflags	(working copy)
+@@ -2,10 +2,7 @@
+ if test -n "$__gnuc__"; then
+   case $osname in
+     cygwin|mingw) DLCFLAGS=;;
+-    darwin) DLCFLAGS=-fPIC
+-      case $arch in
+-        ppc|ppc64) DLCFLAGS="$DLCFLAGS -fno-common"
+-      esac;;
++    darwin) DLCFLAGS="-fPIC -fno-common";;
+     *) DLCFLAGS=-fPIC;;
+   esac
+ else #assume native compiler
diff -r d3c0d501a931 spkg-install
--- a/spkg-install	Sat Sep 11 15:08:31 2010 +0200
+++ b/spkg-install	Sat Sep 18 23:44:34 2010 +0200
@@ -28,9 +28,6 @@
 cp "$PATCHED/init.c"  src/language/init.c
 cp "$PATCHED/mp.c"    src/kernel/gmp/mp.c
 
-# Fix for PARI bug 1079 (jdemeyer: temporary until this is fixed upstream):
-cp "$PATCHED/base2.c" "$PATCHED/polarit3.c" src/basemath/
-
 # cwitty: Disable -rpath:
 cp "$PATCHED/get_ld" config/
 
@@ -55,6 +52,10 @@
 # the target of a symbolic link */lib/*; cf. #9722, too):
 cp "$PATCHED/get_X11" config/
 
+# Add -fno-common to DLCFLAGS on all Darwin systems instead of
+# PPC/PPC64 only.
+cp "$PATCHED/get_dlcflags" config/
+
 
 # This is needed or there are weird locale problems involving rpath
 # with building Sage:
diff -r d3c0d501a931 spkg-make
--- a/spkg-make	Sat Sep 11 15:08:31 2010 +0200
+++ b/spkg-make	Sat Sep 18 23:44:34 2010 +0200
@@ -77,6 +77,10 @@
 # <http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1099>
 svn update -r 12596 src/test/*/rnfkummer src/basemath/buch2.c
 
+# Fix segmentation fault in rnfequation(,,1) over Q
+# <http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1079>
+svn update -r 12605 src/basemath/polarit3.c src/basemath/base2.c
+
 
 # make pari (must run bison, etc...) but disable optimization to speed
 # up compilation (the output of the compiling is not used anyway).
