# Check for GMP and MPFR
-gmplibs="-lmpfr"
+gmplibs="-static -lmpfr"
gmpinc=
have_gmp=yes
# Specify a location for mpfr
diff --git a/configure.in b/configure.in
index ebd5d5b..98ea220 100644
--- a/configure.in
+++ b/configure.in
@@ -1049,7 +1049,7 @@ ACX_PROG_GNAT
ACX_PROG_CMP_IGNORE_INITIAL
# Check for GMP and MPFR
-gmplibs="-lmpfr"
+gmplibs="-static -lmpfr"
gmpinc=
have_gmp=yes
# Specify a location for mpfr
diff --git a/gcc/tlink.c b/gcc/tlink.c
index 081bc3f..bbcd64a 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -33,6 +33,16 @@ along with GCC; see the file COPYING3. If not see
#define MAX_ITERATIONS 17
+/*
+ * SCO OpenServer 5.0.7/3.2 has no MAXPATHLEN, but it has PATH_MAX (256).
+ * in limits.h. But it is not usable under ordinal condition.
+ */
+#if !defined(MAXPATHLEN)
+#if defined(_SCO_DS)
+#define MAXPATHLEN 256
+#endif
+#endif
+
/* Defined in the automatically-generated underscore.c. */
extern int prepends_underscore;