This commit is contained in:
commit
3b6c37b896
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
233
gcc-3.3.5.dif
Normal file
233
gcc-3.3.5.dif
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
--- gcc/config/rs6000/darwin-ldouble.c
|
||||||
|
+++ gcc/config/rs6000/darwin-ldouble.c 2006/05/29 14:30:45
|
||||||
|
@@ -1,4 +1,208 @@
|
||||||
|
/* 128-bit long double support routines for Darwin.
|
||||||
|
+ Copyright (C) 1993, 2003, 2004, 2005, 2006
|
||||||
|
+ Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+This file is part of GCC.
|
||||||
|
+
|
||||||
|
+GCC is free software; you can redistribute it and/or modify it under
|
||||||
|
+the terms of the GNU General Public License as published by the Free
|
||||||
|
+Software Foundation; either version 2, or (at your option) any later
|
||||||
|
+version.
|
||||||
|
+
|
||||||
|
+In addition to the permissions in the GNU General Public License, the
|
||||||
|
+Free Software Foundation gives you unlimited permission to link the
|
||||||
|
+compiled version of this file into combinations with other programs,
|
||||||
|
+and to distribute those combinations without any restriction coming
|
||||||
|
+from the use of this file. (The General Public License restrictions
|
||||||
|
+do apply in other respects; for example, they cover modification of
|
||||||
|
+the file, and distribution when not linked into a combine
|
||||||
|
+executable.)
|
||||||
|
+
|
||||||
|
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
+for more details.
|
||||||
|
+
|
||||||
|
+You should have received a copy of the GNU General Public License
|
||||||
|
+along with GCC; see the file COPYING. If not, write to the Free
|
||||||
|
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
+02110-1301, USA. */
|
||||||
|
+
|
||||||
|
+/* Implementations of floating-point long double basic arithmetic
|
||||||
|
+ functions called by the IBM C compiler when generating code for
|
||||||
|
+ PowerPC platforms. In particular, the following functions are
|
||||||
|
+ implemented: __gcc_qadd, __gcc_qsub, __gcc_qmul, and __gcc_qdiv.
|
||||||
|
+ Double-double algorithms are based on the paper "Doubled-Precision
|
||||||
|
+ IEEE Standard 754 Floating-Point Arithmetic" by W. Kahan, February 26,
|
||||||
|
+ 1987. An alternative published reference is "Software for
|
||||||
|
+ Doubled-Precision Floating-Point Computations", by Seppo Linnainmaa,
|
||||||
|
+ ACM TOMS vol 7 no 3, September 1981, pages 272-283. */
|
||||||
|
+
|
||||||
|
+/* Each long double is made up of two IEEE doubles. The value of the
|
||||||
|
+ long double is the sum of the values of the two parts. The most
|
||||||
|
+ significant part is required to be the value of the long double
|
||||||
|
+ rounded to the nearest double, as specified by IEEE. For Inf
|
||||||
|
+ values, the least significant part is required to be one of +0.0 or
|
||||||
|
+ -0.0. No other requirements are made; so, for example, 1.0 may be
|
||||||
|
+ represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a
|
||||||
|
+ NaN is don't-care.
|
||||||
|
+
|
||||||
|
+ This code currently assumes big-endian. */
|
||||||
|
+
|
||||||
|
+#if (!defined (__NO_FPRS__) && !defined (__LITTLE_ENDIAN__) \
|
||||||
|
+ && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)))
|
||||||
|
+
|
||||||
|
+#define fabs(x) __builtin_fabs(x)
|
||||||
|
+#define isless(x, y) __builtin_isless (x, y)
|
||||||
|
+#define inf() __builtin_inf()
|
||||||
|
+
|
||||||
|
+#define unlikely(x) __builtin_expect ((x), 0)
|
||||||
|
+
|
||||||
|
+#define nonfinite(a) unlikely (! isless (fabs (a), inf ()))
|
||||||
|
+
|
||||||
|
+/* All these routines actually take two long doubles as parameters,
|
||||||
|
+ but GCC currently generates poor code when a union is used to turn
|
||||||
|
+ a long double into a pair of doubles. */
|
||||||
|
+
|
||||||
|
+extern long double __gcc_qadd (double, double, double, double);
|
||||||
|
+extern long double __gcc_qsub (double, double, double, double);
|
||||||
|
+extern long double __gcc_qmul (double, double, double, double);
|
||||||
|
+extern long double __gcc_qdiv (double, double, double, double);
|
||||||
|
+
|
||||||
|
+#if defined __ELF__ && defined SHARED \
|
||||||
|
+ && (defined __powerpc64__ || !(defined __linux__ || defined __gnu_hurd__))
|
||||||
|
+/* Provide definitions of the old symbol names to satisfy apps and
|
||||||
|
+ shared libs built against an older libgcc. To access the _xlq
|
||||||
|
+ symbols an explicit version reference is needed, so these won't
|
||||||
|
+ satisfy an unadorned reference like _xlqadd. If dot symbols are
|
||||||
|
+ not needed, the assembler will remove the aliases from the symbol
|
||||||
|
+ table. */
|
||||||
|
+__asm__ (".symver __gcc_qadd,_xlqadd@GCC_3.4\n\t"
|
||||||
|
+ ".symver __gcc_qsub,_xlqsub@GCC_3.4\n\t"
|
||||||
|
+ ".symver __gcc_qmul,_xlqmul@GCC_3.4\n\t"
|
||||||
|
+ ".symver __gcc_qdiv,_xlqdiv@GCC_3.4\n\t"
|
||||||
|
+ ".symver .__gcc_qadd,._xlqadd@GCC_3.4\n\t"
|
||||||
|
+ ".symver .__gcc_qsub,._xlqsub@GCC_3.4\n\t"
|
||||||
|
+ ".symver .__gcc_qmul,._xlqmul@GCC_3.4\n\t"
|
||||||
|
+ ".symver .__gcc_qdiv,._xlqdiv@GCC_3.4");
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+typedef union
|
||||||
|
+{
|
||||||
|
+ long double ldval;
|
||||||
|
+ double dval[2];
|
||||||
|
+} longDblUnion;
|
||||||
|
+
|
||||||
|
+/* Add two 'long double' values and return the result. */
|
||||||
|
+long double
|
||||||
|
+__gcc_qadd (double a, double aa, double c, double cc)
|
||||||
|
+{
|
||||||
|
+ longDblUnion x;
|
||||||
|
+ double z, q, zz, xh;
|
||||||
|
+
|
||||||
|
+ z = a + c;
|
||||||
|
+
|
||||||
|
+ if (nonfinite (z))
|
||||||
|
+ {
|
||||||
|
+ z = cc + aa + c + a;
|
||||||
|
+ if (nonfinite (z))
|
||||||
|
+ return z;
|
||||||
|
+ x.dval[0] = z; /* Will always be DBL_MAX. */
|
||||||
|
+ zz = aa + cc;
|
||||||
|
+ if (fabs(a) > fabs(c))
|
||||||
|
+ x.dval[1] = a - z + c + zz;
|
||||||
|
+ else
|
||||||
|
+ x.dval[1] = c - z + a + zz;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ q = a - z;
|
||||||
|
+ zz = q + c + (a - (q + z)) + aa + cc;
|
||||||
|
+
|
||||||
|
+ /* Keep -0 result. */
|
||||||
|
+ if (zz == 0.0)
|
||||||
|
+ return z;
|
||||||
|
+
|
||||||
|
+ xh = z + zz;
|
||||||
|
+ if (nonfinite (xh))
|
||||||
|
+ return xh;
|
||||||
|
+
|
||||||
|
+ x.dval[0] = xh;
|
||||||
|
+ x.dval[1] = z - xh + zz;
|
||||||
|
+ }
|
||||||
|
+ return x.ldval;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+long double
|
||||||
|
+__gcc_qsub (double a, double b, double c, double d)
|
||||||
|
+{
|
||||||
|
+ return __gcc_qadd (a, b, -c, -d);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+long double
|
||||||
|
+__gcc_qmul (double a, double b, double c, double d)
|
||||||
|
+{
|
||||||
|
+ longDblUnion z;
|
||||||
|
+ double t, tau, u, v, w;
|
||||||
|
+
|
||||||
|
+ t = a * c; /* Highest order double term. */
|
||||||
|
+
|
||||||
|
+ if (unlikely (t == 0) /* Preserve -0. */
|
||||||
|
+ || nonfinite (t))
|
||||||
|
+ return t;
|
||||||
|
+
|
||||||
|
+ /* Sum terms of two highest orders. */
|
||||||
|
+
|
||||||
|
+ /* Use fused multiply-add to get low part of a * c. */
|
||||||
|
+ asm ("fmsub %0,%1,%2,%3" : "=f"(tau) : "f"(a), "f"(c), "f"(t));
|
||||||
|
+ v = a*d;
|
||||||
|
+ w = b*c;
|
||||||
|
+ tau += v + w; /* Add in other second-order terms. */
|
||||||
|
+ u = t + tau;
|
||||||
|
+
|
||||||
|
+ /* Construct long double result. */
|
||||||
|
+ if (nonfinite (u))
|
||||||
|
+ return u;
|
||||||
|
+ z.dval[0] = u;
|
||||||
|
+ z.dval[1] = (t - u) + tau;
|
||||||
|
+ return z.ldval;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+long double
|
||||||
|
+__gcc_qdiv (double a, double b, double c, double d)
|
||||||
|
+{
|
||||||
|
+ longDblUnion z;
|
||||||
|
+ double s, sigma, t, tau, u, v, w;
|
||||||
|
+
|
||||||
|
+ t = a / c; /* highest order double term */
|
||||||
|
+
|
||||||
|
+ if (unlikely (t == 0) /* Preserve -0. */
|
||||||
|
+ || nonfinite (t))
|
||||||
|
+ return t;
|
||||||
|
+
|
||||||
|
+ /* Finite nonzero result requires corrections to the highest order term. */
|
||||||
|
+
|
||||||
|
+ s = c * t; /* (s,sigma) = c*t exactly. */
|
||||||
|
+ w = -(-b + d * t); /* Written to get fnmsub for speed, but not
|
||||||
|
+ numerically necessary. */
|
||||||
|
+
|
||||||
|
+ /* Use fused multiply-add to get low part of c * t. */
|
||||||
|
+ asm ("fmsub %0,%1,%2,%3" : "=f"(sigma) : "f"(c), "f"(t), "f"(s));
|
||||||
|
+ v = a - s;
|
||||||
|
+
|
||||||
|
+ tau = ((v-sigma)+w)/c; /* Correction to t. */
|
||||||
|
+ u = t + tau;
|
||||||
|
+
|
||||||
|
+ /* Construct long double result. */
|
||||||
|
+ if (nonfinite (u))
|
||||||
|
+ return u;
|
||||||
|
+ z.dval[0] = u;
|
||||||
|
+ z.dval[1] = (t - u) + tau;
|
||||||
|
+ return z.ldval;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
+/* 128-bit long double support routines for Darwin.
|
||||||
|
Copyright (C) 1993, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GCC.
|
||||||
|
--- gcc/config/rs6000/t-newas
|
||||||
|
+++ gcc/config/rs6000/t-newas 2006/05/29 14:30:45
|
||||||
|
@@ -42,6 +42,9 @@
|
||||||
|
LIBGCC = stmp-multilib
|
||||||
|
INSTALL_LIBGCC = install-multilib
|
||||||
|
|
||||||
|
+# GCC 128-bit long double support routines.
|
||||||
|
+LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c
|
||||||
|
+
|
||||||
|
# Aix 3.2.x needs milli.exp for -mcpu=common
|
||||||
|
EXTRA_PARTS = milli.exp
|
||||||
|
milli.exp: $(srcdir)/config/rs6000/milli.exp
|
||||||
|
--- gcc/config/rs6000/t-ppccomm
|
||||||
|
+++ gcc/config/rs6000/t-ppccomm 2006/05/29 14:30:45
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
# Common support for PowerPC ELF targets (both EABI and SVR4).
|
||||||
|
|
||||||
|
-LIB2FUNCS_EXTRA = tramp.S
|
||||||
|
+LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/darwin-ldouble.c
|
||||||
|
|
||||||
|
# This one can't end up in shared libgcc
|
||||||
|
LIB2FUNCS_STATIC_EXTRA = eabi.S
|
3
gcc-3.3.5.tar.bz2
Normal file
3
gcc-3.3.5.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4ae90c6948d2654a254116fabb0cc7e474abf51ea841e6ef5cd8e6c161a9fa74
|
||||||
|
size 23833856
|
10
gcc-abuildappease.patch
Normal file
10
gcc-abuildappease.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- gcc-3.3.5/gcc/cppexp.c
|
||||||
|
+++ gcc-3.3.5/gcc/cppexp.c
|
||||||
|
@@ -1448,6 +1448,7 @@
|
||||||
|
result.high += HIGH_PART (middle[0]);
|
||||||
|
result.high += HIGH_PART (middle[1]);
|
||||||
|
result.unsignedp = 1;
|
||||||
|
+ result.overflow = 0;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
42
gcc-aliasing.diff
Normal file
42
gcc-aliasing.diff
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
Index: emit-rtl.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
|
||||||
|
retrieving revision 1.302.2.4
|
||||||
|
diff -u -p -r1.302.2.4 emit-rtl.c
|
||||||
|
--- gcc/emit-rtl.c 1 May 2003 09:55:39 -0000 1.302.2.4
|
||||||
|
+++ gcc/emit-rtl.c 28 Jul 2003 18:30:35 -0000
|
||||||
|
@@ -1684,6 +1684,22 @@ component_ref_for_mem_expr (ref)
|
||||||
|
TREE_OPERAND (ref, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int indirect_ref_nonzero_ofs_p PARAMS ((tree));
|
||||||
|
+static int
|
||||||
|
+indirect_ref_nonzero_ofs_p (t)
|
||||||
|
+ tree t;
|
||||||
|
+{
|
||||||
|
+ tree op0, op1;
|
||||||
|
+ t = TREE_OPERAND (t, 0);
|
||||||
|
+ if (TREE_CODE (t) != PLUS_EXPR)
|
||||||
|
+ return 0;
|
||||||
|
+ op0 = TREE_OPERAND (t, 0);
|
||||||
|
+ op1 = TREE_OPERAND (t, 1);
|
||||||
|
+ if (TREE_CODE (op1) == INTEGER_CST && (1 || !integer_zerop (op1)))
|
||||||
|
+ return 1;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Given REF, a MEM, and T, either the type of X or the expression
|
||||||
|
corresponding to REF, set the memory attributes. OBJECTP is nonzero
|
||||||
|
if we are making a new object of this type. BITPOS is nonzero if
|
||||||
|
@@ -1911,6 +1930,11 @@ set_mem_attributes_minus_bitpos (ref, t,
|
||||||
|
else if (TREE_CODE (t) == COMPONENT_REF || TREE_CODE (t) == ARRAY_REF
|
||||||
|
|| TREE_CODE (t) == ARRAY_RANGE_REF
|
||||||
|
|| TREE_CODE (t) == BIT_FIELD_REF)
|
||||||
|
+ MEM_IN_STRUCT_P (ref) = 1;
|
||||||
|
+ /* An INDIRECT_REF of an PLUS expression of something with a
|
||||||
|
+ non-zero offset also is part of an aggregate. */
|
||||||
|
+ else if (TREE_CODE (t) == INDIRECT_REF
|
||||||
|
+ && indirect_ref_nonzero_ofs_p (t))
|
||||||
|
MEM_IN_STRUCT_P (ref) = 1;
|
||||||
|
}
|
||||||
|
|
91
gcc-aliasing12.diff
Normal file
91
gcc-aliasing12.diff
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
Index: rtl.h
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
|
||||||
|
retrieving revision 1.374.2.10
|
||||||
|
diff -u -p -r1.374.2.10 rtl.h
|
||||||
|
--- gcc/rtl.h 21 Jun 2003 22:47:01 -0000 1.374.2.10
|
||||||
|
+++ gcc/rtl.h 10 Aug 2003 21:20:12 -0000
|
||||||
|
@@ -141,7 +141,8 @@ struct rtx_def GTY((chain_next ("RTX_NEX
|
||||||
|
In a CODE_LABEL, part of the two-bit alternate entry field. */
|
||||||
|
unsigned int jump : 1;
|
||||||
|
/* In a CODE_LABEL, part of the two-bit alternate entry field.
|
||||||
|
- 1 in a MEM if it cannot trap. */
|
||||||
|
+ 1 in a MEM if it cannot trap.
|
||||||
|
+ 1 in a SYMBOL_REF which refers to a read-only object. */
|
||||||
|
unsigned int call : 1;
|
||||||
|
/* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere.
|
||||||
|
1 in a SUBREG if it references an unsigned object whose mode has been
|
||||||
|
@@ -1241,6 +1242,10 @@ do { \
|
||||||
|
/* 1 if RTX is a symbol_ref for a weak symbol. */
|
||||||
|
#define SYMBOL_REF_WEAK(RTX) \
|
||||||
|
(RTL_FLAG_CHECK1("SYMBOL_REF_WEAK", (RTX), SYMBOL_REF)->integrated)
|
||||||
|
+
|
||||||
|
+/* 1 if RTX is a symbol_ref for a readonly object. */
|
||||||
|
+#define SYMBOL_REF_READONLY(RTX) \
|
||||||
|
+ (RTL_FLAG_CHECK1("SYMBOL_REF_READONLY", (RTX), SYMBOL_REF)->call)
|
||||||
|
|
||||||
|
/* Define a macro to look for REG_INC notes,
|
||||||
|
but save time on machines where they never exist. */
|
||||||
|
Index: alias.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
|
||||||
|
retrieving revision 1.180.2.4
|
||||||
|
diff -u -p -r1.180.2.4 alias.c
|
||||||
|
--- gcc/alias.c 21 Jun 2003 22:47:00 -0000 1.180.2.4
|
||||||
|
+++ gcc/alias.c 10 Aug 2003 21:20:12 -0000
|
||||||
|
@@ -2071,7 +2071,7 @@ true_dependence (mem, mem_mode, x, varie
|
||||||
|
int (*varies) PARAMS ((rtx, int));
|
||||||
|
{
|
||||||
|
rtx x_addr, mem_addr;
|
||||||
|
- rtx base;
|
||||||
|
+ rtx base, mem_base;
|
||||||
|
|
||||||
|
if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem))
|
||||||
|
return 1;
|
||||||
|
@@ -2109,9 +2109,12 @@ true_dependence (mem, mem_mode, x, varie
|
||||||
|
mem_addr = get_addr (XEXP (mem, 0));
|
||||||
|
|
||||||
|
base = find_base_term (x_addr);
|
||||||
|
+ mem_base = find_base_term (mem_addr);
|
||||||
|
if (base && (GET_CODE (base) == LABEL_REF
|
||||||
|
|| (GET_CODE (base) == SYMBOL_REF
|
||||||
|
- && CONSTANT_POOL_ADDRESS_P (base))))
|
||||||
|
+ && ((SYMBOL_REF_READONLY (base)
|
||||||
|
+ && !rtx_equal_p (base, mem_base))
|
||||||
|
+ || CONSTANT_POOL_ADDRESS_P (base)))))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (! base_alias_check (x_addr, mem_addr, GET_MODE (x), mem_mode))
|
||||||
|
Index: varasm.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
|
||||||
|
retrieving revision 1.318.2.11
|
||||||
|
diff -u -p -r1.318.2.11 varasm.c
|
||||||
|
--- gcc/varasm.c 19 Jul 2003 14:57:43 -0000 1.318.2.11
|
||||||
|
+++ gcc/varasm.c 10 Aug 2003 21:20:12 -0000
|
||||||
|
@@ -941,6 +941,8 @@ make_decl_rtl (decl, asmspec)
|
||||||
|
SYMBOL_REF_WEAK (XEXP (x, 0)) = DECL_WEAK (decl);
|
||||||
|
if (TREE_CODE (decl) != FUNCTION_DECL)
|
||||||
|
set_mem_attributes (x, decl, 1);
|
||||||
|
+ if (RTX_UNCHANGING_P (x))
|
||||||
|
+ SYMBOL_REF_READONLY (XEXP (x, 0)) = 1;
|
||||||
|
SET_DECL_RTL (decl, x);
|
||||||
|
|
||||||
|
/* Optionally set flags or add text to the name to record information
|
||||||
|
@@ -2731,6 +2733,8 @@ output_constant_def (exp, defer)
|
||||||
|
gen_rtx_SYMBOL_REF (Pmode, desc->label));
|
||||||
|
|
||||||
|
set_mem_attributes (rtl, exp, 1);
|
||||||
|
+ if (RTX_UNCHANGING_P (rtl))
|
||||||
|
+ SYMBOL_REF_READONLY (XEXP (rtl, 0)) = 1;
|
||||||
|
set_mem_alias_set (rtl, 0);
|
||||||
|
set_mem_alias_set (rtl, const_alias_set);
|
||||||
|
|
||||||
|
@@ -3299,6 +3303,7 @@ force_const_mem (mode, x)
|
||||||
|
set_mem_alias_set (def, const_alias_set);
|
||||||
|
set_mem_attributes (def, (*lang_hooks.types.type_for_mode) (mode, 0), 1);
|
||||||
|
RTX_UNCHANGING_P (def) = 1;
|
||||||
|
+ SYMBOL_REF_READONLY (XEXP (def, 0)) = 1;
|
||||||
|
|
||||||
|
/* Add label to symbol hash table. */
|
||||||
|
hash = SYMHASH (XSTR (XEXP (def, 0), 0));
|
269
gcc-aliasing3.diff
Normal file
269
gcc-aliasing3.diff
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
Index: fold-const.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
|
||||||
|
retrieving revision 1.226.2.9
|
||||||
|
diff -u -p -r1.226.2.9 fold-const.c
|
||||||
|
--- gcc/fold-const.c 21 Jul 2003 19:07:12 -0000 1.226.2.9
|
||||||
|
+++ gcc/fold-const.c 30 Jul 2003 21:29:05 -0000
|
||||||
|
@@ -1011,6 +1011,233 @@ associate_trees (t1, t2, code, type)
|
||||||
|
|
||||||
|
return fold (build (code, type, convert (type, t1), convert (type, t2)));
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+static tree tree_get_index PARAMS ((tree));
|
||||||
|
+static int indirect_ref_zero_ofs_p PARAMS ((tree));
|
||||||
|
+static int indirect_ref_nonzero_ofs_p PARAMS ((tree));
|
||||||
|
+static tree associate_trees_refs PARAMS ((tree, tree, enum tree_code, tree));
|
||||||
|
+static void split_tree_indirect_refs PARAMS ((tree, enum tree_code, tree));
|
||||||
|
+static void split_tree_for_reorder PARAMS ((tree, enum tree_code, tree));
|
||||||
|
+static int compare_trees PARAMS ((const PTR, const PTR));
|
||||||
|
+static tree reorder_memrefs PARAMS ((tree, tree, enum tree_code, tree));
|
||||||
|
+static tree reorder_summands PARAMS ((tree, tree, enum tree_code, tree));
|
||||||
|
+
|
||||||
|
+static tree
|
||||||
|
+tree_get_index (t)
|
||||||
|
+ tree t;
|
||||||
|
+{
|
||||||
|
+ if (TREE_CODE (t) == ARRAY_REF)
|
||||||
|
+ return TREE_OPERAND (t, 1);
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ t = TREE_OPERAND (t, 0);
|
||||||
|
+ if (TREE_CODE (t) != PLUS_EXPR)
|
||||||
|
+ return NULL_TREE;
|
||||||
|
+ return TREE_OPERAND (t, 1);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+indirect_ref_nonzero_ofs_p (t)
|
||||||
|
+ tree t;
|
||||||
|
+{
|
||||||
|
+ tree i = tree_get_index (t);
|
||||||
|
+ if (i && TREE_CODE (i) == INTEGER_CST && !integer_zerop (i))
|
||||||
|
+ return 1;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+indirect_ref_zero_ofs_p (t)
|
||||||
|
+ tree t;
|
||||||
|
+{
|
||||||
|
+ tree i = tree_get_index (t);
|
||||||
|
+ if (!i)
|
||||||
|
+ return 1;
|
||||||
|
+ if (TREE_CODE (i) == INTEGER_CST && integer_zerop (i))
|
||||||
|
+ return 1;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static tree
|
||||||
|
+associate_trees_refs (t1, t2, code, type)
|
||||||
|
+ tree t1, t2;
|
||||||
|
+ enum tree_code code;
|
||||||
|
+ tree type;
|
||||||
|
+{
|
||||||
|
+ if (t1 == 0)
|
||||||
|
+ return t2;
|
||||||
|
+ else if (t2 == 0)
|
||||||
|
+ return t1;
|
||||||
|
+ return build (code, type, convert (type, t1), convert (type, t2));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#define MAX_SUMMANDS 100
|
||||||
|
+static tree merged_z, merged_nz, merged_rest;
|
||||||
|
+static tree summands[MAX_SUMMANDS];
|
||||||
|
+static int num_summands;
|
||||||
|
+static void
|
||||||
|
+split_tree_indirect_refs (in, code, type)
|
||||||
|
+ tree in;
|
||||||
|
+ enum tree_code code;
|
||||||
|
+ tree type;
|
||||||
|
+{
|
||||||
|
+ /* Strip any conversions that don't change the machine mode or signedness. */
|
||||||
|
+ STRIP_SIGN_NOPS (in);
|
||||||
|
+
|
||||||
|
+ if (TREE_CODE (in) == INDIRECT_REF || TREE_CODE (in) == ARRAY_REF)
|
||||||
|
+ {
|
||||||
|
+ if (indirect_ref_zero_ofs_p (in))
|
||||||
|
+ merged_z = associate_trees_refs (merged_z, in, code, type);
|
||||||
|
+ else if (indirect_ref_nonzero_ofs_p (in))
|
||||||
|
+ merged_nz = associate_trees_refs (merged_nz, in, code, type);
|
||||||
|
+ else
|
||||||
|
+ merged_rest = associate_trees_refs (merged_rest, in, code, type);
|
||||||
|
+ }
|
||||||
|
+ else if (TREE_CODE (in) == code)
|
||||||
|
+ {
|
||||||
|
+ tree op0 = TREE_OPERAND (in, 0);
|
||||||
|
+ tree op1 = TREE_OPERAND (in, 1);
|
||||||
|
+ split_tree_indirect_refs (op0, code, type);
|
||||||
|
+ split_tree_indirect_refs (op1, code, type);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ merged_rest = associate_trees_refs (merged_rest, in, code, type);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+split_tree_for_reorder (in, code, type)
|
||||||
|
+ tree in;
|
||||||
|
+ enum tree_code code;
|
||||||
|
+ tree type;
|
||||||
|
+{
|
||||||
|
+ /* Strip any conversions that don't change the machine mode or signedness. */
|
||||||
|
+ STRIP_SIGN_NOPS (in);
|
||||||
|
+
|
||||||
|
+ if ((TREE_CODE (in) == INDIRECT_REF
|
||||||
|
+ || TREE_CODE (in) == ARRAY_REF
|
||||||
|
+ || TREE_CODE (in) == VAR_DECL)
|
||||||
|
+ && num_summands < MAX_SUMMANDS)
|
||||||
|
+ summands[num_summands++] = in;
|
||||||
|
+ else if (TREE_CODE (in) == code)
|
||||||
|
+ {
|
||||||
|
+ tree op0 = TREE_OPERAND (in, 0);
|
||||||
|
+ tree op1 = TREE_OPERAND (in, 1);
|
||||||
|
+ split_tree_for_reorder (op0, code, type);
|
||||||
|
+ split_tree_for_reorder (op1, code, type);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ merged_rest = associate_trees_refs (merged_rest, in, code, type);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+compare_trees (v1, v2)
|
||||||
|
+ const PTR v1;
|
||||||
|
+ const PTR v2;
|
||||||
|
+{
|
||||||
|
+ tree t1 = *((const tree *) v1);
|
||||||
|
+ tree t2 = *((const tree *) v2);
|
||||||
|
+
|
||||||
|
+ if (t1 == t2)
|
||||||
|
+ return 0;
|
||||||
|
+ /* Everything besides var_decls and indirect_refs last. */
|
||||||
|
+ if (TREE_CODE (t1) != INDIRECT_REF
|
||||||
|
+ && TREE_CODE (t1) != ARRAY_REF
|
||||||
|
+ && TREE_CODE (t1) != VAR_DECL)
|
||||||
|
+ return 1;
|
||||||
|
+ if (TREE_CODE (t2) != INDIRECT_REF
|
||||||
|
+ && TREE_CODE (t2) != ARRAY_REF
|
||||||
|
+ && TREE_CODE (t2) != VAR_DECL)
|
||||||
|
+ return -1;
|
||||||
|
+ /* All indirect_refs with nonzero index before var_decls.
|
||||||
|
+ All indirect_refs with zero index after var_decls. */
|
||||||
|
+ if (TREE_CODE (t1) != TREE_CODE (t2))
|
||||||
|
+ {
|
||||||
|
+ if (TREE_CODE (t1) == INDIRECT_REF || TREE_CODE (t1) == ARRAY_REF)
|
||||||
|
+ {
|
||||||
|
+ if (indirect_ref_nonzero_ofs_p (t1))
|
||||||
|
+ return -1;
|
||||||
|
+ else
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ /* t2 is a INDIRECT_REF or ARRAY_REF, so we can call that without
|
||||||
|
+ checking. */
|
||||||
|
+ else if (indirect_ref_nonzero_ofs_p (t2))
|
||||||
|
+ return 1;
|
||||||
|
+ else
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ if (TREE_CODE (t1) == VAR_DECL)
|
||||||
|
+ {
|
||||||
|
+ if (IDENTIFIER_HASH_VALUE (DECL_NAME (t1))
|
||||||
|
+ < IDENTIFIER_HASH_VALUE (DECL_NAME (t2)))
|
||||||
|
+ return -1;
|
||||||
|
+ else
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ /* We have two indirect_refs here. */
|
||||||
|
+ if (indirect_ref_nonzero_ofs_p (t1) && indirect_ref_nonzero_ofs_p (t2))
|
||||||
|
+ /* As both had non-zero index, we know that tree_get_index() really
|
||||||
|
+ returns INTEGER_CST. */
|
||||||
|
+ return tree_int_cst_compare (tree_get_index (t1), tree_get_index (t2));
|
||||||
|
+ else if (indirect_ref_zero_ofs_p (t1))
|
||||||
|
+ return 1;
|
||||||
|
+ else
|
||||||
|
+ return -1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static tree
|
||||||
|
+reorder_memrefs (in0, in1, code, type)
|
||||||
|
+ tree in0, in1;
|
||||||
|
+ enum tree_code code;
|
||||||
|
+ tree type;
|
||||||
|
+{
|
||||||
|
+ tree ret = 0;
|
||||||
|
+ merged_z = 0;
|
||||||
|
+ merged_nz = 0;
|
||||||
|
+ merged_rest = 0;
|
||||||
|
+ /* XXX We can't yet handle MINUS_EXPR. */
|
||||||
|
+ if (code == MINUS_EXPR)
|
||||||
|
+ return 0;
|
||||||
|
+ if (in0)
|
||||||
|
+ split_tree_indirect_refs (in0, code, type);
|
||||||
|
+ if (in1)
|
||||||
|
+ split_tree_indirect_refs (in1, code, type);
|
||||||
|
+ if (merged_nz || merged_z)
|
||||||
|
+ {
|
||||||
|
+ ret = associate_trees_refs (merged_nz, merged_z, code, type);
|
||||||
|
+ ret = associate_trees_refs (ret, merged_rest, code, type);
|
||||||
|
+ }
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static tree
|
||||||
|
+reorder_summands (in0, in1, code, type)
|
||||||
|
+ tree in0, in1;
|
||||||
|
+ enum tree_code code;
|
||||||
|
+ tree type;
|
||||||
|
+{
|
||||||
|
+ tree ret = 0;
|
||||||
|
+ merged_rest = 0;
|
||||||
|
+ num_summands = 0;
|
||||||
|
+ /* XXX We can't yet handle MINUS_EXPR. */
|
||||||
|
+ if (code == MINUS_EXPR)
|
||||||
|
+ return 0;
|
||||||
|
+ if (in0)
|
||||||
|
+ split_tree_for_reorder (in0, code, type);
|
||||||
|
+ if (in1)
|
||||||
|
+ split_tree_for_reorder (in1, code, type);
|
||||||
|
+ if (num_summands > 2)
|
||||||
|
+ {
|
||||||
|
+ int i;
|
||||||
|
+ qsort (summands, num_summands, sizeof (tree), compare_trees);
|
||||||
|
+ ret = summands[0];
|
||||||
|
+ for (i = 1; i < num_summands; i++)
|
||||||
|
+ ret = associate_trees_refs (ret, summands[i], code, type);
|
||||||
|
+ ret = associate_trees_refs (ret, merged_rest, code, type);
|
||||||
|
+ }
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
|
||||||
|
/* Combine two integer constants ARG1 and ARG2 under operation CODE
|
||||||
|
to produce a new constant.
|
||||||
|
@@ -5378,11 +5605,16 @@ fold (expr)
|
||||||
|
+ (lit0 != 0) + (lit1 != 0)
|
||||||
|
+ (minus_lit0 != 0) + (minus_lit1 != 0)))
|
||||||
|
{
|
||||||
|
+ tree tmp;
|
||||||
|
+ tmp = reorder_summands (var0, var1, code, type);
|
||||||
|
/* Recombine MINUS_EXPR operands by using PLUS_EXPR. */
|
||||||
|
if (code == MINUS_EXPR)
|
||||||
|
code = PLUS_EXPR;
|
||||||
|
|
||||||
|
- var0 = associate_trees (var0, var1, code, type);
|
||||||
|
+ if (tmp)
|
||||||
|
+ var0 = tmp;
|
||||||
|
+ else
|
||||||
|
+ var0 = associate_trees (var0, var1, code, type);
|
||||||
|
con0 = associate_trees (con0, con1, code, type);
|
||||||
|
lit0 = associate_trees (lit0, lit1, code, type);
|
||||||
|
minus_lit0 = associate_trees (minus_lit0, minus_lit1, code, type);
|
||||||
|
@@ -5424,6 +5656,9 @@ fold (expr)
|
||||||
|
con0 = associate_trees (con0, lit0, code, type);
|
||||||
|
return convert (type, associate_trees (var0, con0, code, type));
|
||||||
|
}
|
||||||
|
+ var0 = reorder_summands (arg0, arg1, code, type);
|
||||||
|
+ if (var0)
|
||||||
|
+ return convert (type, var0);
|
||||||
|
}
|
||||||
|
|
||||||
|
binary:
|
5202
gcc-altivec.diff
Normal file
5202
gcc-altivec.diff
Normal file
File diff suppressed because it is too large
Load Diff
31
gcc-bug-reporting.patch
Normal file
31
gcc-bug-reporting.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
============================================================
|
||||||
|
Index: gcc/gccbug.in
|
||||||
|
--- gcc/gccbug.in 12 Jan 2003 14:24:16 -0000 1.15.28.1
|
||||||
|
+++ gcc/gccbug.in 18 Aug 2003 16:54:46 -0000
|
||||||
|
@@ -28,7 +28,7 @@ VERSION=3.113
|
||||||
|
SUBMITTER=net
|
||||||
|
|
||||||
|
# The default mail address for PR submissions.
|
||||||
|
-GNATS_ADDR=gcc-gnats@gcc.gnu.org
|
||||||
|
+GNATS_ADDR=feedback@suse.de
|
||||||
|
|
||||||
|
# The default release for this host.
|
||||||
|
DEFAULT_RELEASE="@gcc_version_full@"
|
||||||
|
@@ -305,6 +305,7 @@ Subject:
|
||||||
|
From: $FROM
|
||||||
|
Reply-To: $REPLYTO
|
||||||
|
Cc: $CC
|
||||||
|
+X-Feedback-Type: GCC-Bug
|
||||||
|
X-send-pr-version: $VERSION
|
||||||
|
X-GNATS-Notify:
|
||||||
|
|
||||||
|
============================================================
|
||||||
|
Index: gcc/version.c
|
||||||
|
--- gcc/version.c 14 Aug 2003 13:20:18 -0000 1.1778.2.30
|
||||||
|
+++ gcc/version.c 18 Aug 2003 16:54:46 -0000
|
||||||
|
@@ -15,4 +15,4 @@ const char version_string[] = "3.3.1-ham
|
||||||
|
forward us bugs reported to you, if you determine that they are
|
||||||
|
not bugs in your modifications.) */
|
||||||
|
|
||||||
|
-const char bug_report_url[] = "<URL:http://gcc.gnu.org/bugs.html>";
|
||||||
|
+const char bug_report_url[] = "<URL:http://www.suse.de/feedback>";
|
12
gcc-c99-double-inline.diff
Normal file
12
gcc-c99-double-inline.diff
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- gcc/c-decl.c.orig 2003-03-12 18:05:07.000000000 +0100
|
||||||
|
+++ gcc/c-decl.c 2003-03-12 18:07:18.000000000 +0100
|
||||||
|
@@ -3549,7 +3549,8 @@ grokdeclarator (declarator, declspecs, d
|
||||||
|
}
|
||||||
|
else if (specbits & (1 << (int) i))
|
||||||
|
{
|
||||||
|
- if (i == RID_CONST || i == RID_VOLATILE || i == RID_RESTRICT)
|
||||||
|
+ if (i == RID_CONST || i == RID_VOLATILE || i == RID_RESTRICT
|
||||||
|
+ || i == RID_INLINE)
|
||||||
|
{
|
||||||
|
if (!flag_isoc99)
|
||||||
|
pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id));
|
17
gcc-c99numbers.diff
Normal file
17
gcc-c99numbers.diff
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Index: gcc/cppexp.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/cppexp.c,v
|
||||||
|
retrieving revision 1.136
|
||||||
|
diff -u -p -r1.136 cppexp.c
|
||||||
|
--- gcc/cppexp.c 19 Dec 2002 05:18:04 -0000 1.136
|
||||||
|
+++ gcc/cppexp.c 13 Mar 2003 20:41:04 -0000
|
||||||
|
@@ -175,7 +175,8 @@ cpp_classify_number (pfile, token)
|
||||||
|
str++;
|
||||||
|
|
||||||
|
/* Require at least one hex digit to classify it as hex. */
|
||||||
|
- if ((*str == 'x' || *str == 'X') && ISXDIGIT (str[1]))
|
||||||
|
+ if ((*str == 'x' || *str == 'X')
|
||||||
|
+ && (str[1] == '.' || ISXDIGIT (str[1])))
|
||||||
|
{
|
||||||
|
radix = 16;
|
||||||
|
str++;
|
446
gcc-compact-dwarf2.patch
Normal file
446
gcc-compact-dwarf2.patch
Normal file
@ -0,0 +1,446 @@
|
|||||||
|
This is Andi's backport for unused types pruning. I (matz) have only added
|
||||||
|
the option to disable it again.
|
||||||
|
|
||||||
|
|
||||||
|
From: Andi Kleen <ak@suse.de>
|
||||||
|
Subject: More compact dwarf2 information for gcc (with patch)
|
||||||
|
Date: Sun, 2 Mar 2003 07:43:14 +0100
|
||||||
|
|
||||||
|
|
||||||
|
I ported Scott Snyder's dwarf2 compression patch that was recently
|
||||||
|
posted on the gcc mailing list to the SuSE gcc. What it does is to
|
||||||
|
not dump types to the debugging information that are not referenced
|
||||||
|
to dwarf2.
|
||||||
|
|
||||||
|
The main change compared to the patch (which was against 3.4 mainline)
|
||||||
|
was to not use varrays which do not seem to exist in that tree.
|
||||||
|
I just cloned the file_table dynamic array instead.
|
||||||
|
|
||||||
|
I enabled it by default. In theory it makes a difference when you try
|
||||||
|
to reference a type that is not used in the program from gdb,
|
||||||
|
but referencing just types seems to be somewhat pointless
|
||||||
|
to me (especially when such a obscure feature eats >100MB of disk space
|
||||||
|
in the build), so I just enabled it by default.
|
||||||
|
|
||||||
|
gcc also seems to have an -feliminate-dwarf2-dups option which may
|
||||||
|
further help (but is off by default for some reason). Perhaps
|
||||||
|
it can be considered for turning on too? Or is there some problem
|
||||||
|
with it I am missing?
|
||||||
|
|
||||||
|
Just applying the patch makes a nice difference (without
|
||||||
|
-feliminate-dwarf2-dups)
|
||||||
|
|
||||||
|
e.g. this is a simple x86-64 kernel compilation with -g. The tree
|
||||||
|
is stripped down with only minimal drivers enabled.
|
||||||
|
|
||||||
|
before:
|
||||||
|
|
||||||
|
build tree size 528M
|
||||||
|
-rwxr-xr-x 1 ak users 44M 2003-03-02 02:25 vmlinux
|
||||||
|
random object file:
|
||||||
|
1356440 276 -rw-r--r-- 2 ak users 276312 Mar 2 01:45 ./kernel/sys
|
||||||
|
|
||||||
|
after:
|
||||||
|
ld tree size 411M
|
||||||
|
-rwxr-xr-x 1 ak users 30M 2003-03-02 07:26 vmlinux
|
||||||
|
|
||||||
|
-rw-r--r-- 2 ak users 206096 2003-03-02 07:22 kernel/sys.o
|
||||||
|
|
||||||
|
|
||||||
|
Both the final executable and the object files shrink nicely.
|
||||||
|
Also the compilation is faster because gcc has to do much less IO
|
||||||
|
(compilation with -g seems to be mostly IO bound)
|
||||||
|
|
||||||
|
Can we please consider this patch for inclusion into the 3.3 SuSE gcc ?
|
||||||
|
|
||||||
|
-Andi
|
||||||
|
|
||||||
|
Index: gcc/flags.h
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/flags.h,v
|
||||||
|
retrieving revision 1.93.2.13
|
||||||
|
diff -u -p -r1.93.2.13 flags.h
|
||||||
|
--- gcc/flags.h 2 Feb 2004 16:25:40 -0000 1.93.2.13
|
||||||
|
+++ gcc/flags.h 21 May 2004 12:58:25 -0000
|
||||||
|
@@ -677,6 +677,10 @@ extern int flag_speculative_prefetching;
|
||||||
|
|
||||||
|
extern int flag_eliminate_dwarf2_dups;
|
||||||
|
|
||||||
|
+/* Nonzero means we should do unused type elimination. */
|
||||||
|
+
|
||||||
|
+extern int flag_eliminate_unused_debug_types;
|
||||||
|
+
|
||||||
|
/* Nonzero means to collect statistics which might be expensive
|
||||||
|
and to print them when we are done. */
|
||||||
|
extern int flag_detailed_statistics;
|
||||||
|
Index: gcc/toplev.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
|
||||||
|
retrieving revision 1.688.2.50
|
||||||
|
diff -u -p -r1.688.2.50 toplev.c
|
||||||
|
--- gcc/toplev.c 21 Apr 2004 15:17:24 -0000 1.688.2.50
|
||||||
|
+++ gcc/toplev.c 21 May 2004 12:58:26 -0000
|
||||||
|
@@ -383,6 +383,10 @@ tree current_function_func_begin_label;
|
||||||
|
|
||||||
|
int flag_eliminate_dwarf2_dups = 0;
|
||||||
|
|
||||||
|
+/* Nonzero if doing unused type elimination. */
|
||||||
|
+
|
||||||
|
+int flag_eliminate_unused_debug_types = 1;
|
||||||
|
+
|
||||||
|
/* Nonzero if generating code to do profiling. */
|
||||||
|
|
||||||
|
int profile_flag = 0;
|
||||||
|
@@ -1054,6 +1058,8 @@ static const lang_independent_options f_
|
||||||
|
{
|
||||||
|
{"eliminate-dwarf2-dups", &flag_eliminate_dwarf2_dups, 1,
|
||||||
|
N_("Perform DWARF2 duplicate elimination") },
|
||||||
|
+ {"eliminate-unused-debug-types", &flag_eliminate_unused_debug_types, 1,
|
||||||
|
+ N_("Eliminate debug info of unused types") },
|
||||||
|
{"float-store", &flag_float_store, 1,
|
||||||
|
N_("Do not store floats in registers") },
|
||||||
|
{"volatile", &flag_volatile, 1,
|
||||||
|
Index: gcc/dwarf2out.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
|
||||||
|
retrieving revision 1.389.2.20
|
||||||
|
diff -u -p -r1.389.2.20 dwarf2out.c
|
||||||
|
--- gcc/dwarf2out.c 29 Apr 2004 15:20:33 -0000 1.389.2.20
|
||||||
|
+++ gcc/dwarf2out.c 21 May 2004 12:58:26 -0000
|
||||||
|
@@ -3397,6 +3397,7 @@ struct file_table
|
||||||
|
|
||||||
|
/* Filenames referenced by this compilation unit. */
|
||||||
|
static struct file_table file_table;
|
||||||
|
+static struct file_table file_table_emitted;
|
||||||
|
|
||||||
|
/* Local pointer to the name of the main input file. Initialized in
|
||||||
|
dwarf2out_init. */
|
||||||
|
@@ -3796,6 +3797,14 @@ static void output_loc_list PARAMS ((dw
|
||||||
|
static char *gen_internal_sym PARAMS ((const char *));
|
||||||
|
static void mark_limbo_die_list PARAMS ((void *));
|
||||||
|
|
||||||
|
+static void prune_unmark_dies PARAMS ((dw_die_ref));
|
||||||
|
+static void prune_unused_types_mark PARAMS ((dw_die_ref, int));
|
||||||
|
+static void prune_unused_types_walk PARAMS ((dw_die_ref));
|
||||||
|
+static void prune_unused_types_walk_attribs PARAMS ((dw_die_ref));
|
||||||
|
+static void prune_unused_types_prune PARAMS ((dw_die_ref));
|
||||||
|
+static void prune_unused_types PARAMS ((void));
|
||||||
|
+static unsigned long maybe_emit_file PARAMS ((int));
|
||||||
|
+
|
||||||
|
/* Section names used to hold DWARF debugging information. */
|
||||||
|
#ifndef DEBUG_INFO_SECTION
|
||||||
|
#define DEBUG_INFO_SECTION ".debug_info"
|
||||||
|
@@ -5172,6 +5181,7 @@ splice_child_die (parent, child)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ child->die_parent = parent;
|
||||||
|
child->die_sib = parent->die_child;
|
||||||
|
parent->die_child = child;
|
||||||
|
}
|
||||||
|
@@ -12746,13 +12756,21 @@ lookup_filename (file_name)
|
||||||
|
file_table.in_use = i + 1;
|
||||||
|
file_table.last_lookup_index = i;
|
||||||
|
|
||||||
|
- if (DWARF2_ASM_LINE_DEBUG_INFO)
|
||||||
|
+ /* Prepare to add a new table entry by making sure there is enough space in
|
||||||
|
+ the table to do so. If not, expand the current table. */
|
||||||
|
+ if (i >= file_table_emitted.allocated)
|
||||||
|
{
|
||||||
|
- fprintf (asm_out_file, "\t.file %u ", i);
|
||||||
|
- output_quoted_string (asm_out_file, file_name);
|
||||||
|
- fputc ('\n', asm_out_file);
|
||||||
|
+ file_table_emitted.allocated = i + FILE_TABLE_INCREMENT;
|
||||||
|
+ file_table_emitted.table = (char **)
|
||||||
|
+ xrealloc (file_table_emitted.table,
|
||||||
|
+ file_table_emitted.allocated * sizeof (char *));
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* Add the new entry to the end of the filename table. */
|
||||||
|
+ file_table_emitted.table[i] = NULL;
|
||||||
|
+ file_table_emitted.in_use = i + 1;
|
||||||
|
+ file_table_emitted.last_lookup_index = i;
|
||||||
|
+
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -12763,9 +12781,38 @@ init_file_table ()
|
||||||
|
file_table.table = (char **) xcalloc (FILE_TABLE_INCREMENT, sizeof (char *));
|
||||||
|
file_table.allocated = FILE_TABLE_INCREMENT;
|
||||||
|
|
||||||
|
+ file_table_emitted.table = (char **) xcalloc (FILE_TABLE_INCREMENT, sizeof (char *));
|
||||||
|
+ file_table_emitted.allocated = FILE_TABLE_INCREMENT;
|
||||||
|
+
|
||||||
|
/* Skip the first entry - file numbers begin at 1. */
|
||||||
|
file_table.in_use = 1;
|
||||||
|
file_table.last_lookup_index = 0;
|
||||||
|
+
|
||||||
|
+ file_table_emitted.in_use = 1;
|
||||||
|
+ file_table_emitted.last_lookup_index = 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static unsigned long
|
||||||
|
+maybe_emit_file (fileno)
|
||||||
|
+ int fileno;
|
||||||
|
+{
|
||||||
|
+ static int emitcount = 0;
|
||||||
|
+ if (DWARF2_ASM_LINE_DEBUG_INFO && fileno > 0)
|
||||||
|
+ {
|
||||||
|
+ if (!file_table_emitted.table[fileno])
|
||||||
|
+ {
|
||||||
|
+ file_table_emitted.table[fileno] = (char *)++emitcount;
|
||||||
|
+ fprintf (asm_out_file, "\t.file %lu ",
|
||||||
|
+ (unsigned long)
|
||||||
|
+ file_table_emitted.table[fileno]);
|
||||||
|
+ output_quoted_string (asm_out_file,
|
||||||
|
+ file_table.table[fileno]);
|
||||||
|
+ fputc ('\n', asm_out_file);
|
||||||
|
+ }
|
||||||
|
+ return (unsigned long)file_table_emitted.table[fileno];
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ return fileno;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Called by the final INSN scan whenever we see a var location. We
|
||||||
|
@@ -12847,6 +12894,8 @@ dwarf2out_source_line (line, filename)
|
||||||
|
{
|
||||||
|
unsigned file_num = lookup_filename (filename);
|
||||||
|
|
||||||
|
+ file_num = maybe_emit_file (file_num);
|
||||||
|
+
|
||||||
|
/* Emit the .loc directive understood by GNU as. */
|
||||||
|
fprintf (asm_out_file, "\t.loc %d %d 0\n", file_num, line);
|
||||||
|
|
||||||
|
@@ -12932,6 +12981,7 @@ dwarf2out_start_source_file (lineno, fil
|
||||||
|
dw2_asm_output_data (1, DW_MACINFO_start_file, "Start new file");
|
||||||
|
dw2_asm_output_data_uleb128 (lineno, "Included from line number %d",
|
||||||
|
lineno);
|
||||||
|
+ maybe_emit_file (lookup_filename (filename));
|
||||||
|
dw2_asm_output_data_uleb128 (lookup_filename (filename),
|
||||||
|
"Filename we just started");
|
||||||
|
}
|
||||||
|
@@ -13122,6 +13172,213 @@ output_indirect_string (pfile, h, v)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+/* Clear the marks for a die and its children.
|
||||||
|
+ Be cool if the mark isn't set. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+prune_unmark_dies (die)
|
||||||
|
+ dw_die_ref die;
|
||||||
|
+{
|
||||||
|
+ dw_die_ref c;
|
||||||
|
+ die->die_mark = 0;
|
||||||
|
+ for (c = die->die_child; c; c = c->die_sib)
|
||||||
|
+ prune_unmark_dies (c);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* Given DIE that we're marking as used, find any other dies
|
||||||
|
+ it references as attributes and mark them as used. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+prune_unused_types_walk_attribs (die)
|
||||||
|
+ dw_die_ref die;
|
||||||
|
+{
|
||||||
|
+ dw_attr_ref a;
|
||||||
|
+
|
||||||
|
+ for (a = die->die_attr; a != NULL; a = a->dw_attr_next)
|
||||||
|
+ {
|
||||||
|
+ if (a->dw_attr_val.val_class == dw_val_class_die_ref)
|
||||||
|
+ {
|
||||||
|
+ /* A reference to another DIE.
|
||||||
|
+ Make sure that it will get emitted. */
|
||||||
|
+ prune_unused_types_mark (a->dw_attr_val.v.val_die_ref.die, 1);
|
||||||
|
+ }
|
||||||
|
+ else if (a->dw_attr == DW_AT_decl_file)
|
||||||
|
+ {
|
||||||
|
+ /* A reference to a file. Make sure the file name is emitted. */
|
||||||
|
+ a->dw_attr_val.v.val_unsigned =
|
||||||
|
+ maybe_emit_file (a->dw_attr_val.v.val_unsigned);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* Mark DIE as being used. If DOKIDS is true, then walk down
|
||||||
|
+ to DIE's children. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+prune_unused_types_mark (die, dokids)
|
||||||
|
+ dw_die_ref die;
|
||||||
|
+ int dokids;
|
||||||
|
+{
|
||||||
|
+ dw_die_ref c;
|
||||||
|
+
|
||||||
|
+ if (die->die_mark == 0) {
|
||||||
|
+ /* We haven't done this node yet. Mark it as used. */
|
||||||
|
+ die->die_mark = 1;
|
||||||
|
+
|
||||||
|
+ /* We also have to mark its parents as used.
|
||||||
|
+ (But we don't want to mark our parents' kids due to this.) */
|
||||||
|
+ if (die->die_parent)
|
||||||
|
+ prune_unused_types_mark (die->die_parent, 0);
|
||||||
|
+
|
||||||
|
+ /* Mark any referenced nodes. */
|
||||||
|
+ prune_unused_types_walk_attribs (die);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (dokids && die->die_mark != 2)
|
||||||
|
+ {
|
||||||
|
+ /* We need to walk the children, but haven't done so yet.
|
||||||
|
+ Remember that we've walked the kids. */
|
||||||
|
+ die->die_mark = 2;
|
||||||
|
+
|
||||||
|
+ /* Walk them. */
|
||||||
|
+ for (c = die->die_child; c; c = c->die_sib)
|
||||||
|
+ {
|
||||||
|
+ /* If this is an array type, we need to make sure our
|
||||||
|
+ kids get marked, even if they're types. */
|
||||||
|
+ if (die->die_tag == DW_TAG_array_type)
|
||||||
|
+ prune_unused_types_mark (c, 1);
|
||||||
|
+ else
|
||||||
|
+ prune_unused_types_walk (c);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* Walk the tree DIE and mark types that we actually use. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+prune_unused_types_walk (die)
|
||||||
|
+ dw_die_ref die;
|
||||||
|
+{
|
||||||
|
+ dw_die_ref c;
|
||||||
|
+
|
||||||
|
+ /* Don't do anything if this node is already marked. */
|
||||||
|
+ if (die->die_mark)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ switch (die->die_tag) {
|
||||||
|
+ case DW_TAG_const_type:
|
||||||
|
+ case DW_TAG_packed_type:
|
||||||
|
+ case DW_TAG_pointer_type:
|
||||||
|
+ case DW_TAG_reference_type:
|
||||||
|
+ case DW_TAG_volatile_type:
|
||||||
|
+ case DW_TAG_typedef:
|
||||||
|
+ case DW_TAG_array_type:
|
||||||
|
+ case DW_TAG_structure_type:
|
||||||
|
+ case DW_TAG_union_type:
|
||||||
|
+ case DW_TAG_class_type:
|
||||||
|
+ case DW_TAG_friend:
|
||||||
|
+ case DW_TAG_variant_part:
|
||||||
|
+ case DW_TAG_enumeration_type:
|
||||||
|
+ case DW_TAG_subroutine_type:
|
||||||
|
+ case DW_TAG_string_type:
|
||||||
|
+ case DW_TAG_set_type:
|
||||||
|
+ case DW_TAG_subrange_type:
|
||||||
|
+ case DW_TAG_ptr_to_member_type:
|
||||||
|
+ case DW_TAG_file_type:
|
||||||
|
+ /* It's a type node --- don't mark it. */
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ default:
|
||||||
|
+ /* Mark everything else. */
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ die->die_mark = 1;
|
||||||
|
+
|
||||||
|
+ /* Now, mark any dies referenced from here. */
|
||||||
|
+ prune_unused_types_walk_attribs (die);
|
||||||
|
+
|
||||||
|
+ /* Mark children. */
|
||||||
|
+ for (c = die->die_child; c; c = c->die_sib)
|
||||||
|
+ prune_unused_types_walk (c);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* Remove from the tree DIE any dies that aren't marked. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+prune_unused_types_prune (die)
|
||||||
|
+ dw_die_ref die;
|
||||||
|
+{
|
||||||
|
+ dw_die_ref c, p, n;
|
||||||
|
+ if (!die->die_mark)
|
||||||
|
+ abort();
|
||||||
|
+
|
||||||
|
+ p = NULL;
|
||||||
|
+ for (c = die->die_child; c; c = n)
|
||||||
|
+ {
|
||||||
|
+ n = c->die_sib;
|
||||||
|
+ if (c->die_mark)
|
||||||
|
+ {
|
||||||
|
+ prune_unused_types_prune (c);
|
||||||
|
+ p = c;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ if (p)
|
||||||
|
+ p->die_sib = n;
|
||||||
|
+ else
|
||||||
|
+ die->die_child = n;
|
||||||
|
+ free_die (c);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* Remove dies representing declarations that we never use. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+prune_unused_types ()
|
||||||
|
+{
|
||||||
|
+ unsigned int i;
|
||||||
|
+ limbo_die_node *node;
|
||||||
|
+
|
||||||
|
+ /* Clear all the marks. */
|
||||||
|
+ prune_unmark_dies (comp_unit_die);
|
||||||
|
+ for (node = limbo_die_list; node; node = node->next)
|
||||||
|
+ prune_unmark_dies (node->die);
|
||||||
|
+
|
||||||
|
+ /* Set the mark on nodes that are actually used. */
|
||||||
|
+ prune_unused_types_walk (comp_unit_die);
|
||||||
|
+ for (node = limbo_die_list; node; node = node->next)
|
||||||
|
+ prune_unused_types_walk (node->die);
|
||||||
|
+
|
||||||
|
+ /* Also set the mark on nodes referenced from the
|
||||||
|
+ pubname_table or arange_table. */
|
||||||
|
+ for (i=0; i < pubname_table_in_use; i++)
|
||||||
|
+ {
|
||||||
|
+ prune_unused_types_mark (pubname_table[i].die, 1);
|
||||||
|
+ }
|
||||||
|
+ for (i=0; i < arange_table_in_use; i++)
|
||||||
|
+ {
|
||||||
|
+ prune_unused_types_mark (arange_table[i], 1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Get rid of nodes that aren't marked. */
|
||||||
|
+ prune_unused_types_prune (comp_unit_die);
|
||||||
|
+ for (node = limbo_die_list; node; node = node->next)
|
||||||
|
+ prune_unused_types_prune (node->die);
|
||||||
|
+
|
||||||
|
+ /* Leave the marks clear. */
|
||||||
|
+ prune_unmark_dies (comp_unit_die);
|
||||||
|
+ for (node = limbo_die_list; node; node = node->next)
|
||||||
|
+ prune_unmark_dies (node->die);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Output stuff that dwarf requires at the end of every file,
|
||||||
|
and generate the DWARF-2 debugging info. */
|
||||||
|
|
||||||
|
@@ -13196,6 +13453,9 @@ dwarf2out_finish (input_filename)
|
||||||
|
/* We need to reverse all the dies before break_out_includes, or
|
||||||
|
we'll see the end of an include file before the beginning. */
|
||||||
|
reverse_all_dies (comp_unit_die);
|
||||||
|
+
|
||||||
|
+ if (flag_eliminate_unused_debug_types)
|
||||||
|
+ prune_unused_types ();
|
||||||
|
|
||||||
|
/* Generate separate CUs for each of the include files we've seen.
|
||||||
|
They will go into limbo_die_list. */
|
10
gcc-configure.patch
Normal file
10
gcc-configure.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- gcc/config.gcc.~1.259.4.26.~ 2004-06-22 21:47:05.000000000 +0200
|
||||||
|
+++ gcc/config.gcc 2004-08-02 00:46:20.468908063 +0200
|
||||||
|
@@ -175,6 +175,7 @@
|
||||||
|
# system normally uses GNU ld.
|
||||||
|
|
||||||
|
out_file=
|
||||||
|
+md_file=
|
||||||
|
xmake_file=
|
||||||
|
tmake_file=
|
||||||
|
extra_headers=
|
13
gcc-cse-mem-expr.patch
Normal file
13
gcc-cse-mem-expr.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff -up gcc/cse.c.orig gcc/cse.c
|
||||||
|
--- gcc/cse.c.orig 2003-08-11 00:02:24.000000000 +0200
|
||||||
|
+++ gcc/cse.c 2003-07-31 23:49:21.000000000 +0200
|
||||||
|
@@ -6682,7 +6682,8 @@ invalidate_skipped_set (dest, set, data)
|
||||||
|
a BLKmode or nonscalar memory reference or a reference to a
|
||||||
|
variable address. */
|
||||||
|
&& (MEM_IN_STRUCT_P (dest) || GET_MODE (dest) == BLKmode
|
||||||
|
- || cse_rtx_varies_p (XEXP (dest, 0), 0)))
|
||||||
|
+ || cse_rtx_varies_p (XEXP (dest, 0), 0))
|
||||||
|
+ && !MEM_EXPR (dest))
|
||||||
|
{
|
||||||
|
invalidate_memory ();
|
||||||
|
return;
|
27
gcc-emit-note.patch
Normal file
27
gcc-emit-note.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
Index: gcc/expr.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
|
||||||
|
retrieving revision 1.492.2.19
|
||||||
|
diff -c -3 -p -r1.492.2.19 expr.c
|
||||||
|
*** gcc/expr.c 14 Aug 2003 13:20:12 -0000 1.492.2.19
|
||||||
|
--- gcc/expr.c 5 Sep 2003 11:03:33 -0000
|
||||||
|
*************** emit_block_move_via_loop (x, y, size, al
|
||||||
|
*** 2066,2073 ****
|
||||||
|
if (tmp != iter)
|
||||||
|
emit_move_insn (iter, tmp);
|
||||||
|
|
||||||
|
- emit_note (NULL, NOTE_INSN_LOOP_CONT);
|
||||||
|
emit_label (cmp_label);
|
||||||
|
|
||||||
|
emit_cmp_and_jump_insns (iter, size, LT, NULL_RTX, iter_mode,
|
||||||
|
true, top_label);
|
||||||
|
--- 2066,2073 ----
|
||||||
|
if (tmp != iter)
|
||||||
|
emit_move_insn (iter, tmp);
|
||||||
|
|
||||||
|
emit_label (cmp_label);
|
||||||
|
+ emit_note (NULL, NOTE_INSN_LOOP_CONT);
|
||||||
|
|
||||||
|
emit_cmp_and_jump_insns (iter, size, LT, NULL_RTX, iter_mode,
|
||||||
|
true, top_label);
|
10
gcc-ffi.patch
Normal file
10
gcc-ffi.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- libffi/src/ia64/ffi.c 11 Mar 2004 15:27:24 +0100 1.3.18.1
|
||||||
|
+++ libffi/src/ia64/ffi.c 17 Apr 2004 10:09:06 +0200
|
||||||
|
@@ -65,6 +65,7 @@ static size_t float_type_size(unsigned s
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
FFI_ASSERT(0);
|
||||||
|
+ abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
446
gcc-fworking-directory.patch
Normal file
446
gcc-fworking-directory.patch
Normal file
@ -0,0 +1,446 @@
|
|||||||
|
2003-08-05 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
|
* c.opt: Introduce -fworking-directory.
|
||||||
|
* doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it.
|
||||||
|
* c-common.h (flag_working_directory): Declare.
|
||||||
|
* c-common.c (flag_working_directory): Define.
|
||||||
|
* c-opts.c (c_common_handle_options): Set it.
|
||||||
|
(sanitize_cpp_opts): Set...
|
||||||
|
* cpplib.h (struct cpp_options): ... working_directory option.
|
||||||
|
(struct cpp_callbacks): Add dir_change.
|
||||||
|
* cppinit.c (read_original_filename): Call...
|
||||||
|
(read_original_directory): New. Look for # 1 "directory//"
|
||||||
|
and process it.
|
||||||
|
(cpp_read_main_file): Call dir_change callback if working_directory
|
||||||
|
option is set.
|
||||||
|
* gcc.c (cpp_unique_options): Pass -g*.
|
||||||
|
* c-lex.c (cb_dir_change): New.
|
||||||
|
(init_c_lex): Set dir_change callback.
|
||||||
|
* toplev.c (src_pwd): New static variable.
|
||||||
|
(set_src_pwd, get_src_pwd): New functions.
|
||||||
|
* toplev.h (get_src_pwd, set_src_pwd): Declare.
|
||||||
|
* dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd().
|
||||||
|
* dwarf2out.c (gen_compile_unit_die): Likewise.
|
||||||
|
* dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise.
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
--- gcc-3.3.4/gcc/c-common.c
|
||||||
|
+++ gcc-3.3.4/gcc/c-common.c
|
||||||
|
@@ -548,6 +548,13 @@
|
||||||
|
|
||||||
|
int flag_weak = 1;
|
||||||
|
|
||||||
|
+/* 0 means we want the preprocessor to not emit line directives for
|
||||||
|
+ the current working directory. 1 means we want it to do it. -1
|
||||||
|
+ means we should decide depending on whether debugging information
|
||||||
|
+ is being emitted or not. */
|
||||||
|
+
|
||||||
|
+int flag_working_directory = -1;
|
||||||
|
+
|
||||||
|
/* Nonzero to use __cxa_atexit, rather than atexit, to register
|
||||||
|
destructors for local statics and global objects. */
|
||||||
|
|
||||||
|
--- gcc-3.3.4/gcc/c-common.h
|
||||||
|
+++ gcc-3.3.4/gcc/c-common.h
|
||||||
|
@@ -711,6 +711,13 @@
|
||||||
|
|
||||||
|
extern int flag_weak;
|
||||||
|
|
||||||
|
+/* 0 means we want the preprocessor to not emit line directives for
|
||||||
|
+ the current working directory. 1 means we want it to do it. -1
|
||||||
|
+ means we should decide depending on whether debugging information
|
||||||
|
+ is being emitted or not. */
|
||||||
|
+
|
||||||
|
+extern int flag_working_directory;
|
||||||
|
+
|
||||||
|
/* Nonzero to use __cxa_atexit, rather than atexit, to register
|
||||||
|
destructors for local statics and global objects. */
|
||||||
|
|
||||||
|
--- gcc-3.3.4/gcc/c-lex.c
|
||||||
|
+++ gcc-3.3.4/gcc/c-lex.c
|
||||||
|
@@ -82,6 +82,7 @@
|
||||||
|
static void update_header_times PARAMS ((const char *));
|
||||||
|
static int dump_one_header PARAMS ((splay_tree_node, void *));
|
||||||
|
static void cb_line_change PARAMS ((cpp_reader *, const cpp_token *, int));
|
||||||
|
+static void cb_dir_change PARAMS ((cpp_reader *, const char *));
|
||||||
|
static void cb_ident PARAMS ((cpp_reader *, unsigned int,
|
||||||
|
const cpp_string *));
|
||||||
|
static void cb_file_change PARAMS ((cpp_reader *, const struct line_map *));
|
||||||
|
@@ -119,6 +120,7 @@
|
||||||
|
cb = cpp_get_callbacks (parse_in);
|
||||||
|
|
||||||
|
cb->line_change = cb_line_change;
|
||||||
|
+ cb->dir_change = cb_dir_change;
|
||||||
|
cb->ident = cb_ident;
|
||||||
|
cb->file_change = cb_file_change;
|
||||||
|
cb->def_pragma = cb_def_pragma;
|
||||||
|
@@ -206,6 +208,13 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+cb_dir_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const char *dir)
|
||||||
|
+{
|
||||||
|
+ if (! set_src_pwd (dir))
|
||||||
|
+ warning ("too late for # directive to set debug directory");
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void
|
||||||
|
dump_time_statistics ()
|
||||||
|
{
|
||||||
|
--- gcc-3.3.4/gcc/c-opts.c
|
||||||
|
+++ gcc-3.3.4/gcc/c-opts.c
|
||||||
|
@@ -124,6 +124,7 @@
|
||||||
|
OPT("MQ", CL_ALL | CL_ARG, OPT_MQ) \
|
||||||
|
OPT("MT", CL_ALL | CL_ARG, OPT_MT) \
|
||||||
|
OPT("P", CL_ALL, OPT_P) \
|
||||||
|
+ OPT("fworking-directory", CL_ALL, OPT_fworking_directory) \
|
||||||
|
OPT("Wabi", CL_CXX, OPT_Wabi) \
|
||||||
|
OPT("Wall", CL_ALL, OPT_Wall) \
|
||||||
|
OPT("Wbad-function-cast", CL_C, OPT_Wbad_function_cast) \
|
||||||
|
@@ -686,6 +687,10 @@
|
||||||
|
cpp_opts->no_line_commands = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
+ case OPT_fworking_directory:
|
||||||
|
+ flag_working_directory = on;
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
case OPT_Wabi:
|
||||||
|
warn_abi = on;
|
||||||
|
break;
|
||||||
|
@@ -1587,6 +1592,15 @@
|
||||||
|
and/or -Wtraditional, whatever the ordering. */
|
||||||
|
cpp_opts->warn_long_long
|
||||||
|
= warn_long_long && ((!flag_isoc99 && pedantic) || warn_traditional);
|
||||||
|
+
|
||||||
|
+ /* If we're generating preprocessor output, emit current directory
|
||||||
|
+ if explicitly requested or if debugging information is enabled.
|
||||||
|
+ ??? Maybe we should only do it for debugging formats that
|
||||||
|
+ actually output the current directory? */
|
||||||
|
+ if (flag_working_directory == -1)
|
||||||
|
+ flag_working_directory = (debug_info_level != DINFO_LEVEL_NONE);
|
||||||
|
+ cpp_opts->working_directory
|
||||||
|
+ = flag_preprocess_only && flag_working_directory;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the C 89 standard (with 1994 amendments if C94, without GNU
|
||||||
|
@@ -1790,6 +1804,10 @@
|
||||||
|
-dI Include #include directives in the output\n\
|
||||||
|
"), stdout);
|
||||||
|
fputs (_("\
|
||||||
|
+ -fworking-directory Generate a #line directive pointing at the\n\
|
||||||
|
+ current working directory\n\
|
||||||
|
+"), stdout);
|
||||||
|
+ fputs (_("\
|
||||||
|
-f[no-]preprocessed Treat the input file as already preprocessed\n\
|
||||||
|
-ftabstop=<number> Distance between tab stops for column reporting\n\
|
||||||
|
-P Do not generate #line directives\n\
|
||||||
|
--- gcc-3.3.4/gcc/cppinit.c
|
||||||
|
+++ gcc-3.3.4/gcc/cppinit.c
|
||||||
|
@@ -107,6 +107,7 @@
|
||||||
|
static void free_chain PARAMS ((struct pending_option *));
|
||||||
|
static void init_standard_includes PARAMS ((cpp_reader *));
|
||||||
|
static void read_original_filename PARAMS ((cpp_reader *));
|
||||||
|
+static void read_original_directory PARAMS ((cpp_reader *));
|
||||||
|
static void new_pending_directive PARAMS ((struct cpp_pending *,
|
||||||
|
const char *,
|
||||||
|
cl_directive_handler));
|
||||||
|
@@ -1026,6 +1027,24 @@
|
||||||
|
if (CPP_OPTION (pfile, preprocessed))
|
||||||
|
read_original_filename (pfile);
|
||||||
|
|
||||||
|
+ if (CPP_OPTION (pfile, working_directory))
|
||||||
|
+ {
|
||||||
|
+ const char *name = pfile->map->to_file;
|
||||||
|
+ const char *dir = getpwd ();
|
||||||
|
+ char *dir_with_slashes = alloca (strlen (dir) + 3);
|
||||||
|
+
|
||||||
|
+ memcpy (dir_with_slashes, dir, strlen (dir));
|
||||||
|
+ memcpy (dir_with_slashes + strlen (dir), "//", 3);
|
||||||
|
+
|
||||||
|
+ if (pfile->cb.dir_change)
|
||||||
|
+ pfile->cb.dir_change (pfile, dir);
|
||||||
|
+ /* Emit file renames that will be recognized by
|
||||||
|
+ read_directory_filename, since dir_change doesn't output
|
||||||
|
+ anything. */
|
||||||
|
+ _cpp_do_file_change (pfile, LC_RENAME, dir_with_slashes, 1, 0);
|
||||||
|
+ _cpp_do_file_change (pfile, LC_RENAME, name, 1, 0);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return pfile->map->to_file;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1051,6 +1070,7 @@
|
||||||
|
if (token1->type == CPP_NUMBER)
|
||||||
|
{
|
||||||
|
_cpp_handle_directive (pfile, token->flags & PREV_WHITE);
|
||||||
|
+ read_original_directory (pfile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1059,6 +1079,61 @@
|
||||||
|
_cpp_backup_tokens (pfile, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* For preprocessed files, if the tokens following the first filename
|
||||||
|
+ line is of the form # <line> "/path/name//", handle the
|
||||||
|
+ directive so we know the original current directory. */
|
||||||
|
+static void
|
||||||
|
+read_original_directory (pfile)
|
||||||
|
+ cpp_reader *pfile;
|
||||||
|
+{
|
||||||
|
+ const cpp_token *hash, *token;
|
||||||
|
+
|
||||||
|
+ /* Lex ahead; if the first tokens are of the form # NUM, then
|
||||||
|
+ process the directive, otherwise back up. */
|
||||||
|
+ hash = _cpp_lex_direct (pfile);
|
||||||
|
+ if (hash->type != CPP_HASH)
|
||||||
|
+ {
|
||||||
|
+ _cpp_backup_tokens (pfile, 1);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ token = _cpp_lex_direct (pfile);
|
||||||
|
+
|
||||||
|
+ if (token->type != CPP_NUMBER)
|
||||||
|
+ {
|
||||||
|
+ _cpp_backup_tokens (pfile, 2);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ token = _cpp_lex_direct (pfile);
|
||||||
|
+
|
||||||
|
+ if (token->type != CPP_STRING
|
||||||
|
+ || ! (token->val.str.len >= 5
|
||||||
|
+ && token->val.str.text[token->val.str.len-2] == '/'
|
||||||
|
+ && token->val.str.text[token->val.str.len-3] == '/'))
|
||||||
|
+ {
|
||||||
|
+ _cpp_backup_tokens (pfile, 3);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (pfile->cb.dir_change)
|
||||||
|
+ {
|
||||||
|
+ char *debugdir = alloca (token->val.str.len - 3);
|
||||||
|
+
|
||||||
|
+ memcpy (debugdir, (const char *) token->val.str.text + 1,
|
||||||
|
+ token->val.str.len - 4);
|
||||||
|
+ debugdir[token->val.str.len - 4] = '\0';
|
||||||
|
+
|
||||||
|
+ pfile->cb.dir_change (pfile, debugdir);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* We want to process the fake line changes as regular changes, to
|
||||||
|
+ get them output. */
|
||||||
|
+ _cpp_backup_tokens (pfile, 3);
|
||||||
|
+
|
||||||
|
+ CPP_OPTION (pfile, working_directory) = false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Handle pending command line options: -D, -U, -A, -imacros and
|
||||||
|
-include. This should be called after debugging has been properly
|
||||||
|
set up in the front ends. */
|
||||||
|
--- gcc-3.3.4/gcc/cpplib.h
|
||||||
|
+++ gcc-3.3.4/gcc/cpplib.h
|
||||||
|
@@ -407,6 +407,11 @@
|
||||||
|
|
||||||
|
/* Nonzero means __STDC__ should have the value 0 in system headers. */
|
||||||
|
unsigned char stdc_0_in_system_headers;
|
||||||
|
+
|
||||||
|
+ /* Nonzero means output a directory line marker right after the
|
||||||
|
+ initial file name line marker, and before a duplicate initial
|
||||||
|
+ line marker. */
|
||||||
|
+ bool working_directory;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Call backs. */
|
||||||
|
@@ -415,6 +420,7 @@
|
||||||
|
/* Called when a new line of preprocessed output is started. */
|
||||||
|
void (*line_change) PARAMS ((cpp_reader *, const cpp_token *, int));
|
||||||
|
void (*file_change) PARAMS ((cpp_reader *, const struct line_map *));
|
||||||
|
+ void (*dir_change) PARAMS ((cpp_reader *, const char *));
|
||||||
|
void (*include) PARAMS ((cpp_reader *, unsigned int,
|
||||||
|
const unsigned char *, const cpp_token *));
|
||||||
|
void (*define) PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *));
|
||||||
|
--- gcc-3.3.4/gcc/dbxout.c
|
||||||
|
+++ gcc-3.3.4/gcc/dbxout.c
|
||||||
|
@@ -438,7 +438,8 @@
|
||||||
|
if (use_gnu_debug_info_extensions)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
- if (!cwd && (cwd = getpwd ()) && (!*cwd || cwd[strlen (cwd) - 1] != '/'))
|
||||||
|
+ if (!cwd && (cwd = get_src_pwd ())
|
||||||
|
+ && (!*cwd || cwd[strlen (cwd) - 1] != '/'))
|
||||||
|
cwd = concat (cwd, FILE_NAME_JOINER, NULL);
|
||||||
|
if (cwd)
|
||||||
|
{
|
||||||
|
--- gcc-3.3.4/gcc/doc/cpp.texi
|
||||||
|
+++ gcc-3.3.4/gcc/doc/cpp.texi
|
||||||
|
@@ -4066,7 +4066,9 @@
|
||||||
|
cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
|
||||||
|
[@option{-I}@var{dir}@dots{}] [@option{-W}@var{warn}@dots{}]
|
||||||
|
[@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}]
|
||||||
|
- [@option{-MP}] [@option{-MQ} @var{target}@dots{}] [@option{-MT} @var{target}@dots{}]
|
||||||
|
+ [@option{-MP}] [@option{-MQ} @var{target}@dots{}]
|
||||||
|
+ [@option{-MT} @var{target}@dots{}]
|
||||||
|
+ [@option{-P}] [@option{-fno-working-directory}]
|
||||||
|
[@option{-x} @var{language}] [@option{-std=}@var{standard}]
|
||||||
|
@var{infile} @var{outfile}
|
||||||
|
|
||||||
|
--- gcc-3.3.4/gcc/doc/cppopts.texi
|
||||||
|
+++ gcc-3.3.4/gcc/doc/cppopts.texi
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-@c Copyright (c) 1999, 2000, 2001, 2002
|
||||||
|
+@c Copyright (c) 1999, 2000, 2001, 2002, 2003
|
||||||
|
@c Free Software Foundation, Inc.
|
||||||
|
@c This is part of the CPP and GCC manuals.
|
||||||
|
@c For copying conditions, see the file gcc.texi.
|
||||||
|
@@ -470,6 +470,22 @@
|
||||||
|
line. If the value is less than 1 or greater than 100, the option is
|
||||||
|
ignored. The default is 8.
|
||||||
|
|
||||||
|
+@item -fworking-directory
|
||||||
|
+@opindex fworking-directory
|
||||||
|
+@opindex fno-working-directory
|
||||||
|
+Enable generation of linemarkers in the preprocessor output that will
|
||||||
|
+let the compiler know the current working directory at the time of
|
||||||
|
+preprocessing. When this option is enabled, the preprocessor will
|
||||||
|
+emit, after the initial linemarker, a second linemarker with the
|
||||||
|
+current working directory followed by two slashes. GCC will use this
|
||||||
|
+directory, when it's present in the preprocessed input, as the
|
||||||
|
+directory emitted as the current working directory in some debugging
|
||||||
|
+information formats. This option is implicitly enabled if debugging
|
||||||
|
+information is enabled, but this can be inhibited with the negated
|
||||||
|
+form @option{-fno-working-directory}. If the @option{-P} flag is
|
||||||
|
+present in the command line, this option has no effect, since no
|
||||||
|
+@code{#line} directives are emitted whatsoever.
|
||||||
|
+
|
||||||
|
@item -fno-show-column
|
||||||
|
@opindex fno-show-column
|
||||||
|
Do not print column numbers in diagnostics. This may be necessary if
|
||||||
|
--- gcc-3.3.4/gcc/doc/invoke.texi
|
||||||
|
+++ gcc-3.3.4/gcc/doc/invoke.texi
|
||||||
|
@@ -294,7 +294,8 @@
|
||||||
|
-include @var{file} -imacros @var{file} @gol
|
||||||
|
-iprefix @var{file} -iwithprefix @var{dir} @gol
|
||||||
|
-iwithprefixbefore @var{dir} -isystem @var{dir} @gol
|
||||||
|
--M -MM -MF -MG -MP -MQ -MT -nostdinc -P -remap @gol
|
||||||
|
+-M -MM -MF -MG -MP -MQ -MT -nostdinc @gol
|
||||||
|
+-P -fworking-directory -remap @gol
|
||||||
|
-trigraphs -undef -U@var{macro} -Wp,@var{option}}
|
||||||
|
|
||||||
|
@item Assembler Option
|
||||||
|
--- gcc-3.3.4/gcc/dwarf2out.c
|
||||||
|
+++ gcc-3.3.4/gcc/dwarf2out.c
|
||||||
|
@@ -11764,7 +11764,7 @@
|
||||||
|
{
|
||||||
|
dw_die_ref die;
|
||||||
|
char producer[250];
|
||||||
|
- const char *wd = getpwd ();
|
||||||
|
+ const char *wd = get_src_pwd ();
|
||||||
|
const char *language_string = lang_hooks.name;
|
||||||
|
int language;
|
||||||
|
|
||||||
|
@@ -13222,7 +13222,7 @@
|
||||||
|
|
||||||
|
if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL)
|
||||||
|
{
|
||||||
|
- char *wd = getpwd ();
|
||||||
|
+ char *wd = get_src_pwd ();
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
if (wd != NULL)
|
||||||
|
--- gcc-3.3.4/gcc/dwarfout.c
|
||||||
|
+++ gcc-3.3.4/gcc/dwarfout.c
|
||||||
|
@@ -4147,7 +4147,7 @@
|
||||||
|
stmt_list_attribute (LINE_BEGIN_LABEL);
|
||||||
|
|
||||||
|
{
|
||||||
|
- const char *wd = getpwd ();
|
||||||
|
+ const char *wd = get_src_pwd ();
|
||||||
|
if (wd)
|
||||||
|
comp_dir_attribute (wd);
|
||||||
|
}
|
||||||
|
@@ -6272,7 +6272,7 @@
|
||||||
|
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SFNAMES_SECTION);
|
||||||
|
ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL);
|
||||||
|
{
|
||||||
|
- const char *pwd = getpwd ();
|
||||||
|
+ const char *pwd = get_src_pwd ();
|
||||||
|
char *dirname;
|
||||||
|
|
||||||
|
if (!pwd)
|
||||||
|
--- gcc-3.3.4/gcc/gcc.c
|
||||||
|
+++ gcc-3.3.4/gcc/gcc.c
|
||||||
|
@@ -725,7 +725,7 @@
|
||||||
|
in turn cause preprocessor symbols to be defined specially. */
|
||||||
|
static const char *cpp_options =
|
||||||
|
"%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*}\
|
||||||
|
- %{O*} %{undef}";
|
||||||
|
+ %{g*} %{O*} %{undef}";
|
||||||
|
|
||||||
|
/* This contains cpp options which are not passed when the preprocessor
|
||||||
|
output will be used by another program. */
|
||||||
|
--- gcc-3.3.4/gcc/toplev.c
|
||||||
|
+++ gcc-3.3.4/gcc/toplev.c
|
||||||
|
@@ -1711,6 +1711,46 @@
|
||||||
|
FILE *rtl_dump_file = NULL;
|
||||||
|
FILE *cgraph_dump_file = NULL;
|
||||||
|
|
||||||
|
+/* The current working directory of a translation. It's generally the
|
||||||
|
+ directory from which compilation was initiated, but a preprocessed
|
||||||
|
+ file may specify the original directory in which it was
|
||||||
|
+ created. */
|
||||||
|
+
|
||||||
|
+static const char *src_pwd;
|
||||||
|
+
|
||||||
|
+/* Initialize src_pwd with the given string, and return true. If it
|
||||||
|
+ was already initialized, return false. As a special case, it may
|
||||||
|
+ be called with a NULL argument to test whether src_pwd has NOT been
|
||||||
|
+ initialized yet. */
|
||||||
|
+
|
||||||
|
+bool
|
||||||
|
+set_src_pwd (const char *pwd)
|
||||||
|
+{
|
||||||
|
+ if (src_pwd)
|
||||||
|
+ {
|
||||||
|
+ if (strcmp (src_pwd, pwd) == 0)
|
||||||
|
+ return true;
|
||||||
|
+ else
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ src_pwd = xstrdup (pwd);
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Return the directory from which the translation unit was initiated,
|
||||||
|
+ in case set_src_pwd() was not called before to assign it a
|
||||||
|
+ different value. */
|
||||||
|
+
|
||||||
|
+const char *
|
||||||
|
+get_src_pwd (void)
|
||||||
|
+{
|
||||||
|
+ if (! src_pwd)
|
||||||
|
+ src_pwd = getpwd ();
|
||||||
|
+
|
||||||
|
+ return src_pwd;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Decode the string P as an integral parameter.
|
||||||
|
If the string is indeed an integer return its numeric value else
|
||||||
|
issue an Invalid Option error for the option PNAME and return DEFVAL.
|
||||||
|
--- gcc-3.3.4/gcc/toplev.h
|
||||||
|
+++ gcc-3.3.4/gcc/toplev.h
|
||||||
|
@@ -133,4 +133,10 @@
|
||||||
|
extern int exact_log2_wide PARAMS ((unsigned HOST_WIDE_INT));
|
||||||
|
extern int floor_log2_wide PARAMS ((unsigned HOST_WIDE_INT));
|
||||||
|
|
||||||
|
+/* Functions used to get and set GCC's notion of in what directory
|
||||||
|
+ compilation was started. */
|
||||||
|
+
|
||||||
|
+extern const char *get_src_pwd (void);
|
||||||
|
+extern bool set_src_pwd (const char *);
|
||||||
|
+
|
||||||
|
#endif /* ! GCC_TOPLEV_H */
|
22
gcc-gcc-3.3-ppc64.patch
Normal file
22
gcc-gcc-3.3-ppc64.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- gcc-3.3/libtool.m4.ppc64 2003-07-03 22:58:43.000000000 +0200
|
||||||
|
+++ gcc-3.3/libtool.m4 2003-07-03 22:59:06.000000000 +0200
|
||||||
|
@@ -202,6 +202,9 @@
|
||||||
|
ppc64-*linux*)
|
||||||
|
LD="${LD-ld} -m elf32ppclinux"
|
||||||
|
;;
|
||||||
|
+ powerpc64-*linux*)
|
||||||
|
+ LD="${LD-ld} -m elf32ppclinux"
|
||||||
|
+ ;;
|
||||||
|
s390x-*linux*)
|
||||||
|
LD="${LD-ld} -m elf_s390"
|
||||||
|
;;
|
||||||
|
@@ -218,6 +221,9 @@
|
||||||
|
ppc*-*linux*|powerpc*-*linux*)
|
||||||
|
LD="${LD-ld} -m elf64ppc"
|
||||||
|
;;
|
||||||
|
+ powerpc64-*linux*)
|
||||||
|
+ LD="${LD-ld} -m elf64ppc"
|
||||||
|
+ ;;
|
||||||
|
s390*-*linux*)
|
||||||
|
LD="${LD-ld} -m elf64_s390"
|
||||||
|
;;
|
3
gcc-gcc-3.3.5-hammer.patch.bz2
Normal file
3
gcc-gcc-3.3.5-hammer.patch.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:220ba46c8020c6ea1013b2711b602df4a4b52028a0406d434c93ff8f8f922628
|
||||||
|
size 986481
|
41
gcc-gcc-noalias-warn.diff
Normal file
41
gcc-gcc-noalias-warn.diff
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
Index: boehm-gc/finalize.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/boehm-gc/finalize.c,v
|
||||||
|
retrieving revision 1.11.28.1
|
||||||
|
diff -u -p -r1.11.28.1 finalize.c
|
||||||
|
--- boehm-gc/finalize.c 24 Jan 2004 11:05:54 -0000 1.11.28.1
|
||||||
|
+++ boehm-gc/finalize.c 9 Feb 2004 16:07:25 -0000
|
||||||
|
@@ -164,6 +164,7 @@ signed_word * log_size_ptr;
|
||||||
|
int index;
|
||||||
|
struct disappearing_link * new_dl;
|
||||||
|
DCL_LOCK_STATE;
|
||||||
|
+ struct disappearing_link *** dl_head_adr = &dl_head;
|
||||||
|
|
||||||
|
if ((word)link & (ALIGNMENT-1))
|
||||||
|
ABORT("Bad arg to GC_general_register_disappearing_link");
|
||||||
|
@@ -176,7 +177,7 @@ signed_word * log_size_ptr;
|
||||||
|
# ifndef THREADS
|
||||||
|
DISABLE_SIGNALS();
|
||||||
|
# endif
|
||||||
|
- GC_grow_table((struct hash_chain_entry ***)(&dl_head),
|
||||||
|
+ GC_grow_table((struct hash_chain_entry ***)dl_head_adr,
|
||||||
|
&log_dl_table_size);
|
||||||
|
# ifdef CONDPRINT
|
||||||
|
if (GC_print_stats) {
|
||||||
|
@@ -339,6 +340,7 @@ finalization_mark_proc * mp;
|
||||||
|
struct finalizable_object *new_fo;
|
||||||
|
hdr *hhdr;
|
||||||
|
DCL_LOCK_STATE;
|
||||||
|
+ struct finalizable_object *** fo_head_adr = &fo_head;
|
||||||
|
|
||||||
|
# ifdef THREADS
|
||||||
|
DISABLE_SIGNALS();
|
||||||
|
@@ -349,7 +351,7 @@ finalization_mark_proc * mp;
|
||||||
|
# ifndef THREADS
|
||||||
|
DISABLE_SIGNALS();
|
||||||
|
# endif
|
||||||
|
- GC_grow_table((struct hash_chain_entry ***)(&fo_head),
|
||||||
|
+ GC_grow_table((struct hash_chain_entry ***)fo_head_adr,
|
||||||
|
&log_fo_table_size);
|
||||||
|
# ifdef CONDPRINT
|
||||||
|
if (GC_print_stats) {
|
30
gcc-gcc32-ada-addr2line.patch
Normal file
30
gcc-gcc32-ada-addr2line.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
============================================================
|
||||||
|
Index: gcc/ada/adaint.c
|
||||||
|
--- gcc/ada/adaint.c 31 May 2002 18:08:22 -0000 1.10
|
||||||
|
+++ gcc/ada/adaint.c 22 Oct 2002 14:13:58 -0000
|
||||||
|
@@ -2244,17 +2244,6 @@ int _flush_cache()
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined (CROSS_COMPILE) \
|
||||||
|
- || (! (defined (sparc) && defined (sun) && defined (__SVR4)) \
|
||||||
|
- && ! defined (linux) \
|
||||||
|
- && ! defined (hpux) \
|
||||||
|
- && ! (defined (__alpha__) && defined (__osf__)) \
|
||||||
|
- && ! defined (__MINGW32__))
|
||||||
|
-
|
||||||
|
-/* Dummy function to satisfy g-trasym.o. Currently Solaris sparc, HP/UX,
|
||||||
|
- GNU/Linux, Tru64 & Windows provide a non-dummy version of this procedure in
|
||||||
|
- libaddr2line.a. */
|
||||||
|
-
|
||||||
|
void
|
||||||
|
convert_addresses (addrs, n_addr, buf, len)
|
||||||
|
void *addrs ATTRIBUTE_UNUSED;
|
||||||
|
@@ -2264,7 +2253,6 @@ convert_addresses (addrs, n_addr, buf, l
|
||||||
|
{
|
||||||
|
*len = 0;
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
#if defined (_WIN32)
|
||||||
|
int __gnat_argument_needs_quote = 1;
|
80
gcc-gcc32-ada-link.patch
Normal file
80
gcc-gcc32-ada-link.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
--- gcc/ada/link.c.jj Tue May 7 12:50:23 2002
|
||||||
|
+++ gcc/ada/link.c Wed Jun 5 14:45:32 2002
|
||||||
|
@@ -158,11 +158,11 @@ const char *object_library_extension = "
|
||||||
|
|
||||||
|
#elif defined (linux)
|
||||||
|
const char *object_file_option = "";
|
||||||
|
-const char *run_path_option = "-Wl,-rpath,";
|
||||||
|
-char shared_libgnat_default = STATIC;
|
||||||
|
+const char *run_path_option = "";
|
||||||
|
+char shared_libgnat_default = SHARED;
|
||||||
|
int link_max = 2147483647;
|
||||||
|
unsigned char objlist_file_supported = 0;
|
||||||
|
-unsigned char using_gnu_linker = 0;
|
||||||
|
+unsigned char using_gnu_linker = 1;
|
||||||
|
const char *object_library_extension = ".a";
|
||||||
|
|
||||||
|
#elif defined (__svr4__) && defined (i386)
|
||||||
|
--- gcc/ada/Makefile.in.jj Wed Jun 5 16:06:56 2002
|
||||||
|
+++ gcc/ada/Makefile.in Wed Jun 5 16:27:33 2002
|
||||||
|
@@ -1214,6 +1214,33 @@ ifeq ($(strip $(filter-out %86 linux%,$(
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
+ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
|
||||||
|
+ MLIB_TGT=5lml-tgt
|
||||||
|
+ SYMLIB=
|
||||||
|
+ THREADSLIB=-lpthread
|
||||||
|
+ GNATLIB_SHARED=gnatlib-shared-dual
|
||||||
|
+ GMEM_LIB=gmemlib
|
||||||
|
+ LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
|
||||||
|
+ MLIB_TGT=5lml-tgt
|
||||||
|
+ SYMLIB=
|
||||||
|
+ THREADSLIB=-lpthread
|
||||||
|
+ GNATLIB_SHARED=gnatlib-shared-dual
|
||||||
|
+ GMEM_LIB=gmemlib
|
||||||
|
+ LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+ifeq ($(strip $(filter-out ia64 linux%,$(arch) $(osys))),)
|
||||||
|
+ MLIB_TGT=5lml-tgt
|
||||||
|
+ SYMLIB=
|
||||||
|
+ THREADSLIB=-lpthread
|
||||||
|
+ GNATLIB_SHARED=gnatlib-shared-dual
|
||||||
|
+ GMEM_LIB=gmemlib
|
||||||
|
+ LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
|
||||||
|
ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
|
||||||
|
LIBGNAT_TARGET_PAIRS = \
|
||||||
|
--- gcc/ada/gnat_rm.texi.jj Tue Apr 23 20:27:39 2002
|
||||||
|
+++ gcc/ada/gnat_rm.texi Thu Jun 6 14:30:21 2002
|
||||||
|
@@ -31,6 +31,10 @@
|
||||||
|
@settitle GNAT Reference Manual
|
||||||
|
@setchapternewpage odd
|
||||||
|
@syncodeindex fn cp
|
||||||
|
+@dircategory Programming
|
||||||
|
+@direntry
|
||||||
|
+* gnat_rm: (gnat_rm). GNAT Reference Manual
|
||||||
|
+@end direntry
|
||||||
|
|
||||||
|
@titlepage
|
||||||
|
|
||||||
|
--- gcc/ada/gnat_ug.texi.jj Tue May 7 12:50:03 2002
|
||||||
|
+++ gcc/ada/gnat_ug.texi Thu Jun 6 14:30:33 2002
|
||||||
|
@@ -75,6 +75,11 @@
|
||||||
|
@syncodeindex fn cp
|
||||||
|
@c %**end of header
|
||||||
|
|
||||||
|
+@dircategory Programming
|
||||||
|
+@direntry
|
||||||
|
+* gnat_ug: (gnat_ug). GNAT User's Guide
|
||||||
|
+@end direntry
|
||||||
|
+
|
||||||
|
@titlepage
|
||||||
|
|
||||||
|
@ifset vms
|
62
gcc-gcse-volatile.patch
Normal file
62
gcc-gcse-volatile.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
Hello,
|
||||||
|
|
||||||
|
in the appended testcase (obtained from linux kernel), the following
|
||||||
|
bug occurred: load motion decides to optimize non-volatile instance
|
||||||
|
of src_pte, and not to take volatile instance into account. When
|
||||||
|
checking for availability, we however consider these instances to be equal,
|
||||||
|
which causes us to believe that the second load of pte is redundant.
|
||||||
|
|
||||||
|
The patch fixes it.
|
||||||
|
|
||||||
|
Zdenek
|
||||||
|
|
||||||
|
typedef struct { unsigned long pte_low; } pte_t;
|
||||||
|
static inline void clear_bit(int nr, volatile void * addr)
|
||||||
|
{
|
||||||
|
__asm__ __volatile__(
|
||||||
|
"btrl %1,%0"
|
||||||
|
:"=m" ((*(volatile long *) addr))
|
||||||
|
:"Ir" (nr));
|
||||||
|
}
|
||||||
|
static inline void ptep_set_wrprotect(pte_t *ptep) { clear_bit(1, ptep); }
|
||||||
|
int copy_page_range(void)
|
||||||
|
{
|
||||||
|
pte_t * src_pte;
|
||||||
|
pte_t pte = *src_pte;
|
||||||
|
|
||||||
|
if (pte.pte_low) {
|
||||||
|
ptep_set_wrprotect(src_pte);
|
||||||
|
pte = *src_pte;
|
||||||
|
}
|
||||||
|
|
||||||
|
foo (pte);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Changelog:
|
||||||
|
* gcse.c (expr_equiv_p): Don't consider anything to be equal to
|
||||||
|
volatile mem.
|
||||||
|
|
||||||
|
Index: gcse.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
|
||||||
|
retrieving revision 1.222.2.18
|
||||||
|
diff -c -3 -p -r1.222.2.18 gcse.c
|
||||||
|
*** gcc/gcse.c 15 Aug 2003 13:21:01 -0000 1.222.2.18
|
||||||
|
--- gcc/gcse.c 29 Aug 2003 22:33:15 -0000
|
||||||
|
*************** expr_equiv_p (x, y)
|
||||||
|
*** 1844,1849 ****
|
||||||
|
--- 1844,1853 ----
|
||||||
|
due to it being set with the different alias set. */
|
||||||
|
if (MEM_ALIAS_SET (x) != MEM_ALIAS_SET (y))
|
||||||
|
return 0;
|
||||||
|
+
|
||||||
|
+ /* A volatile mem should not be considered equivalent to any other. */
|
||||||
|
+ if (MEM_VOLATILE_P (x) || MEM_VOLATILE_P (y))
|
||||||
|
+ return 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* For commutative operations, check both orders. */
|
||||||
|
|
||||||
|
|
86
gcc-head-tail.patch
Normal file
86
gcc-head-tail.patch
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
Index: gcc/configure.in
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
|
||||||
|
retrieving revision 1.627.2.13
|
||||||
|
diff -u -p -a -u -p -a -r1.627.2.13 gcc/configure.in
|
||||||
|
--- gcc/configure.in 25 Jun 2003 23:14:55 -0000 1.627.2.13
|
||||||
|
+++ gcc/configure.in 22 Jul 2003 17:58:51 -0000
|
||||||
|
@@ -1613,7 +1613,7 @@ elif test x$gcc_cv_as != x; then
|
||||||
|
# GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
|
||||||
|
# This is irritatingly difficult to feature test for. Look for
|
||||||
|
# the date string after the version number.
|
||||||
|
- ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
|
||||||
|
+ ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n 1`
|
||||||
|
if echo "$ld_ver" | grep GNU > /dev/null; then
|
||||||
|
changequote(,)dnl
|
||||||
|
ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
|
||||||
|
@@ -1688,7 +1688,7 @@ EOF
|
||||||
|
# ??? There exists an elf-specific test that will crash
|
||||||
|
# the assembler. Perhaps it's better to figure out whether
|
||||||
|
# arbitrary sections are supported and try the test.
|
||||||
|
- as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
|
||||||
|
+ as_ver=`$gcc_cv_as --version 2>/dev/null | head -n 1`
|
||||||
|
if echo "$as_ver" | grep GNU > /dev/null; then
|
||||||
|
changequote(,)dnl
|
||||||
|
as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
|
||||||
|
@@ -1716,7 +1716,7 @@ if test x$gcc_cv_gas_major_version != x
|
||||||
|
fi
|
||||||
|
elif test x$gcc_cv_as != x; then
|
||||||
|
# Check if this is GAS.
|
||||||
|
- as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
|
||||||
|
+ as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n 1`
|
||||||
|
rm -f a.out 2> /dev/null
|
||||||
|
if echo "$as_ver" | grep GNU > /dev/null; then
|
||||||
|
# Versions up to and including 2.11.0 may mis-optimize
|
||||||
|
@@ -1769,7 +1769,7 @@ EOF
|
||||||
|
# and we got the correct data, then succeed.
|
||||||
|
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
|
||||||
|
&& $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
|
||||||
|
- | tail -3 > conftest.got \
|
||||||
|
+ | tail -n 3 > conftest.got \
|
||||||
|
&& { cmp conftest.lit conftest.got > /dev/null 2>&1 \
|
||||||
|
|| cmp conftest.big conftest.got > /dev/null 2>&1; }
|
||||||
|
then
|
||||||
|
Index: gcc/configure
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/configure,v
|
||||||
|
retrieving revision 1.641.2.14
|
||||||
|
diff -u -p -a -u -p -a -r1.641.2.14 gcc/configure
|
||||||
|
--- gcc/configure 25 Jun 2003 23:14:53 -0000 1.641.2.14
|
||||||
|
+++ gcc/configure 22 Jul 2003 17:59:30 -0000
|
||||||
|
@@ -7130,7 +7130,7 @@ elif test x$gcc_cv_as != x; then
|
||||||
|
# GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
|
||||||
|
# This is irritatingly difficult to feature test for. Look for
|
||||||
|
# the date string after the version number.
|
||||||
|
- ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
|
||||||
|
+ ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n 1`
|
||||||
|
if echo "$ld_ver" | grep GNU > /dev/null; then
|
||||||
|
ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
|
||||||
|
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
|
||||||
|
@@ -7206,7 +7206,7 @@ EOF
|
||||||
|
# ??? There exists an elf-specific test that will crash
|
||||||
|
# the assembler. Perhaps it's better to figure out whether
|
||||||
|
# arbitrary sections are supported and try the test.
|
||||||
|
- as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
|
||||||
|
+ as_ver=`$gcc_cv_as --version 2>/dev/null | head -n 1`
|
||||||
|
if echo "$as_ver" | grep GNU > /dev/null; then
|
||||||
|
as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
|
||||||
|
as_major=`echo $as_ver | sed 's/\..*//'`
|
||||||
|
@@ -7235,7 +7235,7 @@ if test x$gcc_cv_gas_major_version != x
|
||||||
|
fi
|
||||||
|
elif test x$gcc_cv_as != x; then
|
||||||
|
# Check if this is GAS.
|
||||||
|
- as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
|
||||||
|
+ as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n 1`
|
||||||
|
rm -f a.out 2> /dev/null
|
||||||
|
if echo "$as_ver" | grep GNU > /dev/null; then
|
||||||
|
# Versions up to and including 2.11.0 may mis-optimize
|
||||||
|
@@ -7288,7 +7288,7 @@ EOF
|
||||||
|
# and we got the correct data, then succeed.
|
||||||
|
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
|
||||||
|
&& $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
|
||||||
|
- | tail -3 > conftest.got \
|
||||||
|
+ | tail -n 3 > conftest.got \
|
||||||
|
&& { cmp conftest.lit conftest.got > /dev/null 2>&1 \
|
||||||
|
|| cmp conftest.big conftest.got > /dev/null 2>&1; }
|
||||||
|
then
|
27
gcc-hppa.patch
Normal file
27
gcc-hppa.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
--- gcc/config/pa/pa.c 2004/07/12 14:49:07 1.1
|
||||||
|
+++ gcc/config/pa/pa.c 2004/07/12 14:53:02
|
||||||
|
@@ -8367,4 +8367,14 @@
|
||||||
|
fputs (",DATA\n", stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+optimization_options (level, size)
|
||||||
|
+ int level;
|
||||||
|
+ int size ATTRIBUTE_UNUSED;
|
||||||
|
+{
|
||||||
|
+ if (level > 2)
|
||||||
|
+ flag_unroll_loops = 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#include "gt-pa.h"
|
||||||
|
--- gcc/config/pa/pa.h 2004/07/12 14:49:04 1.1
|
||||||
|
+++ gcc/config/pa/pa.h 2004/07/12 14:56:58
|
||||||
|
@@ -2039,3 +2039,7 @@
|
||||||
|
/* We need a libcall to canonicalize function pointers on TARGET_ELF32. */
|
||||||
|
#define CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL \
|
||||||
|
"__canonicalize_funcptr_for_compare"
|
||||||
|
+
|
||||||
|
+/* Define this to change the optimizations performed by default. */
|
||||||
|
+#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
|
||||||
|
+ optimization_options ((LEVEL), (SIZE))
|
149
gcc-ia64intrin.patch
Normal file
149
gcc-ia64intrin.patch
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
--- gcc/config/ia64/ia64intrin.h 25 Apr 2003 14:26:35 +0200 1.4
|
||||||
|
+++ gcc/config/ia64/ia64intrin.h 16 Apr 2004 15:03:13 +0200
|
||||||
|
@@ -14,114 +14,114 @@ extern long __sync_val_compare_and_swap_
|
||||||
|
#define __sync_val_compare_and_swap(PTR, OLD, NEW) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
? (__typeof__(*(PTR))) \
|
||||||
|
- __sync_val_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW)) \
|
||||||
|
+ __sync_val_compare_and_swap_si((int *)(void *)(PTR),(int)(OLD),(int)(NEW)) \
|
||||||
|
: (__typeof__(*(PTR))) \
|
||||||
|
- __sync_val_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
|
||||||
|
+ __sync_val_compare_and_swap_di((long *)(void *)(PTR),(long)(OLD),(long)(NEW)))
|
||||||
|
|
||||||
|
extern int __sync_bool_compare_and_swap_si (int *, int, int);
|
||||||
|
extern int __sync_bool_compare_and_swap_di (long *, long, long);
|
||||||
|
#define __sync_bool_compare_and_swap(PTR, OLD, NEW) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? __sync_bool_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW)) \
|
||||||
|
- : __sync_bool_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
|
||||||
|
+ ? __sync_bool_compare_and_swap_si((int *)(void *)(PTR),(int)(OLD),(int)(NEW)) \
|
||||||
|
+ : __sync_bool_compare_and_swap_di((long *)(void *)(PTR),(long)(OLD),(long)(NEW)))
|
||||||
|
|
||||||
|
extern void __sync_lock_release_si (int *);
|
||||||
|
extern void __sync_lock_release_di (long *);
|
||||||
|
#define __sync_lock_release(PTR) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? __sync_lock_release_si((int *)(PTR)) \
|
||||||
|
- : __sync_lock_release_di((long *)(PTR)))
|
||||||
|
+ ? __sync_lock_release_si((int *)(void *)(PTR)) \
|
||||||
|
+ : __sync_lock_release_di((long *)(void *)(PTR)))
|
||||||
|
|
||||||
|
extern int __sync_lock_test_and_set_si (int *, int);
|
||||||
|
extern long __sync_lock_test_and_set_di (long *, long);
|
||||||
|
#define __sync_lock_test_and_set(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_lock_test_and_set_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_lock_test_and_set_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_lock_test_and_set_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_lock_test_and_set_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_fetch_and_add_si (int *, int);
|
||||||
|
extern long __sync_fetch_and_add_di (long *, long);
|
||||||
|
#define __sync_fetch_and_add(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_fetch_and_add_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_fetch_and_add_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_fetch_and_add_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_fetch_and_add_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_fetch_and_sub_si (int *, int);
|
||||||
|
extern long __sync_fetch_and_sub_di (long *, long);
|
||||||
|
#define __sync_fetch_and_sub(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_fetch_and_sub_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_fetch_and_sub_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_fetch_and_sub_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_fetch_and_sub_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_fetch_and_and_si (int *, int);
|
||||||
|
extern long __sync_fetch_and_and_di (long *, long);
|
||||||
|
#define __sync_fetch_and_and(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_fetch_and_and_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_fetch_and_and_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_fetch_and_and_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_fetch_and_and_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_fetch_and_or_si (int *, int);
|
||||||
|
extern long __sync_fetch_and_or_di (long *, long);
|
||||||
|
#define __sync_fetch_and_or(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_fetch_and_or_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_fetch_and_or_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_fetch_and_or_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_fetch_and_or_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_fetch_and_xor_si (int *, int);
|
||||||
|
extern long __sync_fetch_and_xor_di (long *, long);
|
||||||
|
#define __sync_fetch_and_xor(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_fetch_and_xor_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_fetch_and_xor_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_fetch_and_xor_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_fetch_and_xor_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_fetch_and_nand_si (int *, int);
|
||||||
|
extern long __sync_fetch_and_nand_di (long *, long);
|
||||||
|
#define __sync_fetch_and_nand(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_fetch_and_nand_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_fetch_and_nand_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_fetch_and_nand_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_fetch_and_nand_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_add_and_fetch_si (int *, int);
|
||||||
|
extern long __sync_add_and_fetch_di (long *, long);
|
||||||
|
#define __sync_add_and_fetch(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_add_and_fetch_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_add_and_fetch_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_add_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_add_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_sub_and_fetch_si (int *, int);
|
||||||
|
extern long __sync_sub_and_fetch_di (long *, long);
|
||||||
|
#define __sync_sub_and_fetch(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_sub_and_fetch_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_sub_and_fetch_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_sub_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_sub_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_and_and_fetch_si (int *, int);
|
||||||
|
extern long __sync_and_and_fetch_di (long *, long);
|
||||||
|
#define __sync_and_and_fetch(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_and_and_fetch_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_and_and_fetch_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_and_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_and_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_or_and_fetch_si (int *, int);
|
||||||
|
extern long __sync_or_and_fetch_di (long *, long);
|
||||||
|
#define __sync_or_and_fetch(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_or_and_fetch_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_or_and_fetch_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_or_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_or_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_xor_and_fetch_si (int *, int);
|
||||||
|
extern long __sync_xor_and_fetch_di (long *, long);
|
||||||
|
#define __sync_xor_and_fetch(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_xor_and_fetch_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_xor_and_fetch_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_xor_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_xor_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
extern int __sync_nand_and_fetch_si (int *, int);
|
||||||
|
extern long __sync_nand_and_fetch_di (long *, long);
|
||||||
|
#define __sync_nand_and_fetch(PTR,VAL) \
|
||||||
|
((sizeof (*(PTR)) == sizeof(int)) \
|
||||||
|
- ? (__typeof__(*(PTR))) __sync_nand_and_fetch_si((int *)(PTR),(int)(VAL)) \
|
||||||
|
- : (__typeof__(*(PTR))) __sync_nand_and_fetch_di((long *)(PTR),(long)(VAL)))
|
||||||
|
+ ? (__typeof__(*(PTR))) __sync_nand_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
|
||||||
|
+ : (__typeof__(*(PTR))) __sync_nand_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
547
gcc-libgc.patch
Normal file
547
gcc-libgc.patch
Normal file
@ -0,0 +1,547 @@
|
|||||||
|
Index: boehm-gc/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/boehm-gc/Makefile.am,v
|
||||||
|
retrieving revision 1.36.2.2
|
||||||
|
diff -u -p -a -r1.36.2.2 Makefile.am
|
||||||
|
--- boehm-gc/Makefile.am 24 Jan 2004 11:05:53 -0000 1.36.2.2
|
||||||
|
+++ boehm-gc/Makefile.am 30 Mar 2004 11:17:02 -0000
|
||||||
|
@@ -16,6 +16,7 @@ MULTISUBDIR =
|
||||||
|
MULTIDO = true
|
||||||
|
MULTICLEAN = true
|
||||||
|
|
||||||
|
+toolexeclib_LTLIBRARIES = libgc.la
|
||||||
|
noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la
|
||||||
|
|
||||||
|
if POWERPC_DARWIN
|
||||||
|
@@ -38,13 +39,18 @@ mips_sgi_mach_dep.s mips_ultrix_mach_dep
|
||||||
|
rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
|
||||||
|
sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
|
||||||
|
|
||||||
|
+libgc_la_SOURCES = $(GC_SOURCES)
|
||||||
|
libgcjgc_la_SOURCES = $(GC_SOURCES)
|
||||||
|
libgcjgc_convenience_la_SOURCES = $(GC_SOURCES)
|
||||||
|
+EXTRA_libgc_la_SOURCES = $(GC_SOURCES)
|
||||||
|
EXTRA_libgcjgc_la_SOURCES = $(EXTRA_GC_SOURCES)
|
||||||
|
EXTRA_libgcjgc_convenience_la_SOURCES = $(EXTRA_GC_SOURCES)
|
||||||
|
|
||||||
|
# Include THREADLIBS here to ensure that the correct versions of
|
||||||
|
# linuxthread semaphore functions get linked:
|
||||||
|
+libgc_la_LIBADD = @addobjs@ $(THREADLIBS)
|
||||||
|
+libgc_la_DEPENDENCIES = @addobjs@
|
||||||
|
+libgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
|
||||||
|
libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
|
||||||
|
libgcjgc_la_DEPENDENCIES = @addobjs@
|
||||||
|
libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
|
||||||
|
@@ -137,12 +143,12 @@ CONFIG_STATUS_DEPENDENCIES = $(srcdir)/c
|
||||||
|
.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
|
||||||
|
maintainer-clean-multi
|
||||||
|
|
||||||
|
-all-am: all-multi
|
||||||
|
-install-am: install-multi
|
||||||
|
-mostlyclean-am: mostlyclean-multi
|
||||||
|
-clean-am: clean-multi
|
||||||
|
-distclean-am: distclean-multi
|
||||||
|
-maintainer-clean-am: maintainer-clean-multi
|
||||||
|
+all-recursive: all-multi
|
||||||
|
+install-recursive: install-multi
|
||||||
|
+mostlyclean-recursive: mostlyclean-multi
|
||||||
|
+clean-recursive: clean-multi
|
||||||
|
+distclean-recursive: distclean-multi
|
||||||
|
+maintainer-clean-recursive: maintainer-clean-multi
|
||||||
|
|
||||||
|
all-multi:
|
||||||
|
: $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
|
||||||
|
Index: boehm-gc/Makefile.in
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/boehm-gc/Makefile.in,v
|
||||||
|
retrieving revision 1.40.2.3
|
||||||
|
diff -u -p -a -r1.40.2.3 Makefile.in
|
||||||
|
--- boehm-gc/Makefile.in 24 Jan 2004 11:05:54 -0000 1.40.2.3
|
||||||
|
+++ boehm-gc/Makefile.in 30 Mar 2004 11:17:02 -0000
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
|
||||||
|
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
@@ -113,33 +113,29 @@ MULTISUBDIR =
|
||||||
|
MULTIDO = true
|
||||||
|
MULTICLEAN = true
|
||||||
|
|
||||||
|
+toolexeclib_LTLIBRARIES = libgc.la
|
||||||
|
noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la
|
||||||
|
-@POWERPC_DARWIN_TRUE@asm_libgc_sources = @POWERPC_DARWIN_TRUE@powerpc_darwin_mach_dep.s
|
||||||
|
+@POWERPC_DARWIN_TRUE@asm_libgc_sources = powerpc_darwin_mach_dep.s
|
||||||
|
@POWERPC_DARWIN_FALSE@asm_libgc_sources =
|
||||||
|
|
||||||
|
-GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
|
||||||
|
-dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c \
|
||||||
|
-malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
|
||||||
|
-obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
|
||||||
|
-solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
|
||||||
|
-backgraph.c win32_threads.c \
|
||||||
|
-pthread_support.c pthread_stop_world.c darwin_stop_world.c \
|
||||||
|
-$(asm_libgc_sources)
|
||||||
|
+GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c backgraph.c win32_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c $(asm_libgc_sources)
|
||||||
|
|
||||||
|
|
||||||
|
-EXTRA_GC_SOURCES = alpha_mach_dep.S \
|
||||||
|
-mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
|
||||||
|
-rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
|
||||||
|
-sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
|
||||||
|
+EXTRA_GC_SOURCES = alpha_mach_dep.S mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
|
||||||
|
|
||||||
|
|
||||||
|
+libgc_la_SOURCES = $(GC_SOURCES)
|
||||||
|
libgcjgc_la_SOURCES = $(GC_SOURCES)
|
||||||
|
libgcjgc_convenience_la_SOURCES = $(GC_SOURCES)
|
||||||
|
+EXTRA_libgc_la_SOURCES = $(GC_SOURCES)
|
||||||
|
EXTRA_libgcjgc_la_SOURCES = $(EXTRA_GC_SOURCES)
|
||||||
|
EXTRA_libgcjgc_convenience_la_SOURCES = $(EXTRA_GC_SOURCES)
|
||||||
|
|
||||||
|
# Include THREADLIBS here to ensure that the correct versions of
|
||||||
|
# linuxthread semaphore functions get linked:
|
||||||
|
+libgc_la_LIBADD = @addobjs@ $(THREADLIBS)
|
||||||
|
+libgc_la_DEPENDENCIES = @addobjs@
|
||||||
|
+libgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
|
||||||
|
libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
|
||||||
|
libgcjgc_la_DEPENDENCIES = @addobjs@
|
||||||
|
libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
|
||||||
|
@@ -162,52 +158,14 @@ TESTS = gctest
|
||||||
|
|
||||||
|
all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
|
||||||
|
|
||||||
|
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
|
||||||
|
- $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||||
|
- $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
|
||||||
|
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
|
||||||
|
|
||||||
|
LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
|
||||||
|
|
||||||
|
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
||||||
|
# values defined in terms of make variables, as is the case for CC and
|
||||||
|
# friends when we are called from the top level Makefile.
|
||||||
|
-AM_MAKEFLAGS = \
|
||||||
|
- "AR_FLAGS=$(AR_FLAGS)" \
|
||||||
|
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
||||||
|
- "CFLAGS=$(CFLAGS)" \
|
||||||
|
- "CXXFLAGS=$(CXXFLAGS)" \
|
||||||
|
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
|
||||||
|
- "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
|
||||||
|
- "INSTALL=$(INSTALL)" \
|
||||||
|
- "INSTALL_DATA=$(INSTALL_DATA)" \
|
||||||
|
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
||||||
|
- "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
|
||||||
|
- "LDFLAGS=$(LDFLAGS)" \
|
||||||
|
- "LIBCFLAGS=$(LIBCFLAGS)" \
|
||||||
|
- "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
||||||
|
- "MAKE=$(MAKE)" \
|
||||||
|
- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
||||||
|
- "PICFLAG=$(PICFLAG)" \
|
||||||
|
- "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
||||||
|
- "SHELL=$(SHELL)" \
|
||||||
|
- "EXPECT=$(EXPECT)" \
|
||||||
|
- "RUNTEST=$(RUNTEST)" \
|
||||||
|
- "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
||||||
|
- "exec_prefix=$(exec_prefix)" \
|
||||||
|
- "infodir=$(infodir)" \
|
||||||
|
- "libdir=$(libdir)" \
|
||||||
|
- "prefix=$(prefix)" \
|
||||||
|
- "tooldir=$(tooldir)" \
|
||||||
|
- "AR=$(AR)" \
|
||||||
|
- "AS=$(AS)" \
|
||||||
|
- "CC=$(CC)" \
|
||||||
|
- "CXX=$(CXX)" \
|
||||||
|
- "LD=$(LD)" \
|
||||||
|
- "LIBCFLAGS=$(LIBCFLAGS)" \
|
||||||
|
- "NM=$(NM)" \
|
||||||
|
- "PICFLAG=$(PICFLAG)" \
|
||||||
|
- "RANLIB=$(RANLIB)" \
|
||||||
|
- "DESTDIR=$(DESTDIR)"
|
||||||
|
+AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "EXPECT=$(EXPECT)" "RUNTEST=$(RUNTEST)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "NM=$(NM)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "DESTDIR=$(DESTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
|
||||||
|
@@ -215,13 +173,24 @@ CONFIG_STATUS_DEPENDENCIES = $(srcdir)/c
|
||||||
|
MAKEOVERRIDES =
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
-LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||||
|
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
|
||||||
|
|
||||||
|
|
||||||
|
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
+@POWERPC_DARWIN_TRUE@libgcjgc_la_OBJECTS = allchblk.lo alloc.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@os_dep.lo pcr_interface.lo ptr_chck.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@real_malloc.lo reclaim.lo solaris_pthreads.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@solaris_threads.lo specific.lo stubborn.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@typd_mlc.lo backgraph.lo win32_threads.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@pthread_support.lo pthread_stop_world.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@darwin_stop_world.lo powerpc_darwin_mach_dep.lo
|
||||||
|
@POWERPC_DARWIN_FALSE@libgcjgc_la_OBJECTS = allchblk.lo alloc.lo \
|
||||||
|
@POWERPC_DARWIN_FALSE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \
|
||||||
|
@POWERPC_DARWIN_FALSE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \
|
||||||
|
@@ -233,18 +202,18 @@ LIBS = @LIBS@
|
||||||
|
@POWERPC_DARWIN_FALSE@typd_mlc.lo backgraph.lo win32_threads.lo \
|
||||||
|
@POWERPC_DARWIN_FALSE@pthread_support.lo pthread_stop_world.lo \
|
||||||
|
@POWERPC_DARWIN_FALSE@darwin_stop_world.lo
|
||||||
|
-@POWERPC_DARWIN_TRUE@libgcjgc_la_OBJECTS = allchblk.lo alloc.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@os_dep.lo pcr_interface.lo ptr_chck.lo \
|
||||||
|
+libgcjgc_convenience_la_LDFLAGS =
|
||||||
|
+@POWERPC_DARWIN_TRUE@libgcjgc_convenience_la_OBJECTS = allchblk.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@headers.lo aix_irix_threads.lo malloc.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@mallocx.lo mark.lo mark_rts.lo misc.lo new_hblk.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@real_malloc.lo reclaim.lo solaris_pthreads.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@solaris_threads.lo specific.lo stubborn.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@typd_mlc.lo backgraph.lo win32_threads.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@pthread_support.lo pthread_stop_world.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@darwin_stop_world.lo powerpc_darwin_mach_dep.lo
|
||||||
|
-libgcjgc_convenience_la_LDFLAGS =
|
||||||
|
@POWERPC_DARWIN_FALSE@libgcjgc_convenience_la_OBJECTS = allchblk.lo \
|
||||||
|
@POWERPC_DARWIN_FALSE@alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \
|
||||||
|
@POWERPC_DARWIN_FALSE@dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \
|
||||||
|
@@ -256,32 +225,43 @@ libgcjgc_convenience_la_LDFLAGS =
|
||||||
|
@POWERPC_DARWIN_FALSE@specific.lo stubborn.lo typd_mlc.lo backgraph.lo \
|
||||||
|
@POWERPC_DARWIN_FALSE@win32_threads.lo pthread_support.lo \
|
||||||
|
@POWERPC_DARWIN_FALSE@pthread_stop_world.lo darwin_stop_world.lo
|
||||||
|
-@POWERPC_DARWIN_TRUE@libgcjgc_convenience_la_OBJECTS = allchblk.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@headers.lo aix_irix_threads.lo malloc.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@mallocx.lo mark.lo mark_rts.lo misc.lo new_hblk.lo \
|
||||||
|
-@POWERPC_DARWIN_TRUE@obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@libgc_la_OBJECTS = allchblk.lo alloc.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \
|
||||||
|
+@POWERPC_DARWIN_TRUE@os_dep.lo pcr_interface.lo ptr_chck.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@real_malloc.lo reclaim.lo solaris_pthreads.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@solaris_threads.lo specific.lo stubborn.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@typd_mlc.lo backgraph.lo win32_threads.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@pthread_support.lo pthread_stop_world.lo \
|
||||||
|
@POWERPC_DARWIN_TRUE@darwin_stop_world.lo powerpc_darwin_mach_dep.lo
|
||||||
|
+@POWERPC_DARWIN_FALSE@libgc_la_OBJECTS = allchblk.lo alloc.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@os_dep.lo pcr_interface.lo ptr_chck.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@real_malloc.lo reclaim.lo solaris_pthreads.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@solaris_threads.lo specific.lo stubborn.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@typd_mlc.lo backgraph.lo win32_threads.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@pthread_support.lo pthread_stop_world.lo \
|
||||||
|
+@POWERPC_DARWIN_FALSE@darwin_stop_world.lo
|
||||||
|
check_PROGRAMS = gctest$(EXEEXT)
|
||||||
|
gctest_DEPENDENCIES = ./libgcjgc.la
|
||||||
|
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
CCLD = $(CC)
|
||||||
|
DIST_COMMON = ChangeLog Makefile.am Makefile.in acinclude.m4 aclocal.m4 \
|
||||||
|
config.guess config.sub configure configure.in install-sh ltconfig \
|
||||||
|
-ltmain.sh mkinstalldirs
|
||||||
|
+ltmain.sh missing mkinstalldirs
|
||||||
|
|
||||||
|
|
||||||
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
-TAR = gtar
|
||||||
|
+TAR = tar
|
||||||
|
GZIP_ENV = --best
|
||||||
|
-SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) $(libgcjgc_convenience_la_SOURCES) $(EXTRA_libgcjgc_convenience_la_SOURCES)
|
||||||
|
-OBJECTS = $(libgcjgc_la_OBJECTS) $(libgcjgc_convenience_la_OBJECTS)
|
||||||
|
+SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) $(libgcjgc_convenience_la_SOURCES) $(EXTRA_libgcjgc_convenience_la_SOURCES) $(libgc_la_SOURCES) $(EXTRA_libgc_la_SOURCES)
|
||||||
|
+OBJECTS = $(libgcjgc_la_OBJECTS) $(libgcjgc_convenience_la_OBJECTS) $(libgc_la_OBJECTS)
|
||||||
|
|
||||||
|
all: all-redirect
|
||||||
|
.SUFFIXES:
|
||||||
|
@@ -310,6 +290,31 @@ distclean-noinstLTLIBRARIES:
|
||||||
|
|
||||||
|
maintainer-clean-noinstLTLIBRARIES:
|
||||||
|
|
||||||
|
+mostlyclean-toolexeclibLTLIBRARIES:
|
||||||
|
+
|
||||||
|
+clean-toolexeclibLTLIBRARIES:
|
||||||
|
+ -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
|
||||||
|
+
|
||||||
|
+distclean-toolexeclibLTLIBRARIES:
|
||||||
|
+
|
||||||
|
+maintainer-clean-toolexeclibLTLIBRARIES:
|
||||||
|
+
|
||||||
|
+install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
|
||||||
|
+ @$(NORMAL_INSTALL)
|
||||||
|
+ $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
|
||||||
|
+ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
|
||||||
|
+ if test -f $$p; then \
|
||||||
|
+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
|
||||||
|
+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
|
||||||
|
+ else :; fi; \
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+uninstall-toolexeclibLTLIBRARIES:
|
||||||
|
+ @$(NORMAL_UNINSTALL)
|
||||||
|
+ list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
|
||||||
|
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
.c.o:
|
||||||
|
$(COMPILE) -c $<
|
||||||
|
|
||||||
|
@@ -357,6 +362,9 @@ libgcjgc.la: $(libgcjgc_la_OBJECTS) $(li
|
||||||
|
libgcjgc_convenience.la: $(libgcjgc_convenience_la_OBJECTS) $(libgcjgc_convenience_la_DEPENDENCIES)
|
||||||
|
$(LINK) $(libgcjgc_convenience_la_LDFLAGS) $(libgcjgc_convenience_la_OBJECTS) $(libgcjgc_convenience_la_LIBADD) $(LIBS)
|
||||||
|
|
||||||
|
+libgc.la: $(libgc_la_OBJECTS) $(libgc_la_DEPENDENCIES)
|
||||||
|
+ $(LINK) -rpath $(toolexeclibdir) $(libgc_la_LDFLAGS) $(libgc_la_OBJECTS) $(libgc_la_LIBADD) $(LIBS)
|
||||||
|
+
|
||||||
|
mostlyclean-checkPROGRAMS:
|
||||||
|
|
||||||
|
clean-checkPROGRAMS:
|
||||||
|
@@ -553,7 +561,7 @@ installcheck-am:
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-info-am:
|
||||||
|
install-info: install-info-recursive
|
||||||
|
-install-exec-am:
|
||||||
|
+install-exec-am: install-toolexeclibLTLIBRARIES
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
@@ -562,7 +570,7 @@ install-data: install-data-recursive
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
install: install-recursive
|
||||||
|
-uninstall-am:
|
||||||
|
+uninstall-am: uninstall-toolexeclibLTLIBRARIES
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
all-am: Makefile $(LTLIBRARIES)
|
||||||
|
all-redirect: all-recursive
|
||||||
|
@@ -570,6 +578,7 @@ install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
+ $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean-generic:
|
||||||
|
@@ -581,19 +590,21 @@ distclean-generic:
|
||||||
|
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
-mostlyclean-am: mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
|
||||||
|
+mostlyclean-am: mostlyclean-noinstLTLIBRARIES \
|
||||||
|
+ mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
|
||||||
|
mostlyclean-libtool mostlyclean-checkPROGRAMS \
|
||||||
|
mostlyclean-tags mostlyclean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
-clean-am: clean-noinstLTLIBRARIES clean-compile clean-libtool \
|
||||||
|
- clean-checkPROGRAMS clean-tags clean-generic \
|
||||||
|
- mostlyclean-am
|
||||||
|
+clean-am: clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES \
|
||||||
|
+ clean-compile clean-libtool clean-checkPROGRAMS \
|
||||||
|
+ clean-tags clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
-distclean-am: distclean-noinstLTLIBRARIES distclean-compile \
|
||||||
|
+distclean-am: distclean-noinstLTLIBRARIES \
|
||||||
|
+ distclean-toolexeclibLTLIBRARIES distclean-compile \
|
||||||
|
distclean-libtool distclean-checkPROGRAMS \
|
||||||
|
distclean-tags distclean-generic clean-am
|
||||||
|
-rm -f libtool
|
||||||
|
@@ -602,6 +613,7 @@ distclean: distclean-recursive
|
||||||
|
-rm -f config.status
|
||||||
|
|
||||||
|
maintainer-clean-am: maintainer-clean-noinstLTLIBRARIES \
|
||||||
|
+ maintainer-clean-toolexeclibLTLIBRARIES \
|
||||||
|
maintainer-clean-compile maintainer-clean-libtool \
|
||||||
|
maintainer-clean-checkPROGRAMS maintainer-clean-tags \
|
||||||
|
maintainer-clean-generic distclean-am
|
||||||
|
@@ -613,6 +625,9 @@ maintainer-clean: maintainer-clean-recur
|
||||||
|
|
||||||
|
.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
|
||||||
|
clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
|
||||||
|
+mostlyclean-toolexeclibLTLIBRARIES distclean-toolexeclibLTLIBRARIES \
|
||||||
|
+clean-toolexeclibLTLIBRARIES maintainer-clean-toolexeclibLTLIBRARIES \
|
||||||
|
+uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
|
||||||
|
mostlyclean-compile distclean-compile clean-compile \
|
||||||
|
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
||||||
|
clean-libtool maintainer-clean-libtool mostlyclean-checkPROGRAMS \
|
||||||
|
@@ -647,12 +662,12 @@ include/gc_mark.h @addincludes@
|
||||||
|
.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
|
||||||
|
maintainer-clean-multi
|
||||||
|
|
||||||
|
-all-am: all-multi
|
||||||
|
-install-am: install-multi
|
||||||
|
-mostlyclean-am: mostlyclean-multi
|
||||||
|
-clean-am: clean-multi
|
||||||
|
-distclean-am: distclean-multi
|
||||||
|
-maintainer-clean-am: maintainer-clean-multi
|
||||||
|
+all-recursive: all-multi
|
||||||
|
+install-recursive: install-multi
|
||||||
|
+mostlyclean-recursive: mostlyclean-multi
|
||||||
|
+clean-recursive: clean-multi
|
||||||
|
+distclean-recursive: distclean-multi
|
||||||
|
+maintainer-clean-recursive: maintainer-clean-multi
|
||||||
|
|
||||||
|
all-multi:
|
||||||
|
: $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
|
||||||
|
Index: boehm-gc/include/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/boehm-gc/include/Makefile.am,v
|
||||||
|
retrieving revision 1.1.40.1
|
||||||
|
diff -u -p -a -r1.1.40.1 Makefile.am
|
||||||
|
--- boehm-gc/include/Makefile.am 12 Jan 2003 14:24:07 -0000 1.1.40.1
|
||||||
|
+++ boehm-gc/include/Makefile.am 30 Mar 2004 11:17:02 -0000
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
|
-noinst_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \
|
||||||
|
+include_HEADERS = gc.h gc_backptr.h gc_config_macros.h gc_local_alloc.h \
|
||||||
|
gc_pthread_redirects.h gc_cpp.h
|
||||||
|
|
||||||
|
|
||||||
|
Index: boehm-gc/include/Makefile.in
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/boehm-gc/include/Makefile.in,v
|
||||||
|
retrieving revision 1.3.30.2
|
||||||
|
diff -u -p -a -r1.3.30.2 Makefile.in
|
||||||
|
--- boehm-gc/include/Makefile.in 24 Jan 2004 11:05:56 -0000 1.3.30.2
|
||||||
|
+++ boehm-gc/include/Makefile.in 30 Mar 2004 11:17:02 -0000
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
|
||||||
|
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
@@ -103,29 +103,43 @@ toolexeclibdir = @toolexeclibdir@
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
|
-noinst_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \
|
||||||
|
- gc_pthread_redirects.h gc_cpp.h
|
||||||
|
+include_HEADERS = gc.h gc_backptr.h gc_config_macros.h gc_local_alloc.h gc_pthread_redirects.h gc_cpp.h
|
||||||
|
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
-HEADERS = $(noinst_HEADERS)
|
||||||
|
+HEADERS = $(include_HEADERS)
|
||||||
|
|
||||||
|
DIST_COMMON = Makefile.am Makefile.in
|
||||||
|
|
||||||
|
|
||||||
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
-TAR = gtar
|
||||||
|
+TAR = tar
|
||||||
|
GZIP_ENV = --best
|
||||||
|
all: all-redirect
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||||
|
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus include/Makefile
|
||||||
|
+ cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile
|
||||||
|
|
||||||
|
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||||
|
cd $(top_builddir) \
|
||||||
|
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
|
|
||||||
|
+install-includeHEADERS: $(include_HEADERS)
|
||||||
|
+ @$(NORMAL_INSTALL)
|
||||||
|
+ $(mkinstalldirs) $(DESTDIR)$(includedir)
|
||||||
|
+ @list='$(include_HEADERS)'; for p in $$list; do \
|
||||||
|
+ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
|
||||||
|
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
|
||||||
|
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+uninstall-includeHEADERS:
|
||||||
|
+ @$(NORMAL_UNINSTALL)
|
||||||
|
+ list='$(include_HEADERS)'; for p in $$list; do \
|
||||||
|
+ rm -f $(DESTDIR)$(includedir)/$$p; \
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||||
|
@@ -160,8 +174,13 @@ distdir = $(top_builddir)/$(PACKAGE)-$(V
|
||||||
|
subdir = include
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
+ here=`cd $(top_builddir) && pwd`; \
|
||||||
|
+ top_distdir=`cd $(top_distdir) && pwd`; \
|
||||||
|
+ distdir=`cd $(distdir) && pwd`; \
|
||||||
|
+ cd $(top_srcdir) \
|
||||||
|
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign include/Makefile
|
||||||
|
@for file in $(DISTFILES); do \
|
||||||
|
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
+ d=$(srcdir); \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||||
|
else \
|
||||||
|
@@ -174,28 +193,27 @@ info-am:
|
||||||
|
info: info-am
|
||||||
|
dvi-am:
|
||||||
|
dvi: dvi-am
|
||||||
|
-check-am:
|
||||||
|
+check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
installcheck-am:
|
||||||
|
installcheck: installcheck-am
|
||||||
|
-install-info-am:
|
||||||
|
-install-info: install-info-am
|
||||||
|
install-exec-am:
|
||||||
|
install-exec: install-exec-am
|
||||||
|
|
||||||
|
-install-data-am:
|
||||||
|
+install-data-am: install-includeHEADERS
|
||||||
|
install-data: install-data-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
install: install-am
|
||||||
|
-uninstall-am:
|
||||||
|
+uninstall-am: uninstall-includeHEADERS
|
||||||
|
uninstall: uninstall-am
|
||||||
|
all-am: Makefile $(HEADERS)
|
||||||
|
all-redirect: all-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||||
|
installdirs:
|
||||||
|
+ $(mkinstalldirs) $(DESTDIR)$(includedir)
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean-generic:
|
||||||
|
@@ -227,12 +245,12 @@ maintainer-clean-am: maintainer-clean-t
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
|
||||||
|
-.PHONY: tags mostlyclean-tags distclean-tags clean-tags \
|
||||||
|
-maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
|
||||||
|
-installcheck-am installcheck install-info-am install-info \
|
||||||
|
-install-exec-am install-exec install-data-am install-data install-am \
|
||||||
|
-install uninstall-am uninstall all-redirect all-am all installdirs \
|
||||||
|
-mostlyclean-generic distclean-generic clean-generic \
|
||||||
|
+.PHONY: uninstall-includeHEADERS install-includeHEADERS tags \
|
||||||
|
+mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||||
|
+distdir info-am info dvi-am dvi check check-am installcheck-am \
|
||||||
|
+installcheck install-exec-am install-exec install-data-am install-data \
|
||||||
|
+install-am install uninstall-am uninstall all-redirect all-am all \
|
||||||
|
+installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||||
|
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||||
|
|
||||||
|
|
44
gcc-ppc-nof.patch
Normal file
44
gcc-ppc-nof.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
diff -ru gcc-3.3.2/gcc/config/rs6000/t-linux64bi /gcc-3.3.2/gcc/config/rs6000/t-linux64bi
|
||||||
|
--- gcc-3.3.2/gcc/config/rs6000/t-linux64bi 2004-02-11 20:41:25.000000000 +0000
|
||||||
|
+++ gcc-3.3.2/gcc/config/rs6000/t-linux64bi 2004-02-11 17:33:38.000000000 +0000
|
||||||
|
@@ -9,13 +9,12 @@
|
||||||
|
|
||||||
|
SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc64.ver
|
||||||
|
|
||||||
|
-MULTILIB_OPTIONS = m64/m32 msoft-float
|
||||||
|
-MULTILIB_DIRNAMES = 64 32 nof
|
||||||
|
+MULTILIB_OPTIONS = m64/m32
|
||||||
|
+MULTILIB_DIRNAMES = 64 32
|
||||||
|
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
|
||||||
|
-MULTILIB_EXCEPTIONS = m64/msoft-float
|
||||||
|
-MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
|
||||||
|
-MULTILIB_OSDIRNAMES = ../lib64 ../lib nof
|
||||||
|
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
|
||||||
|
+MULTILIB_EXCEPTIONS =
|
||||||
|
+MULTILIB_EXCLUSIONS =
|
||||||
|
+MULTILIB_OSDIRNAMES = ../lib64 ../lib
|
||||||
|
|
||||||
|
# We want fine grained libraries, so use the new code to build the
|
||||||
|
# floating point emulation libraries.
|
||||||
|
diff -ru gcc-3.3.2/gcc/config/rs6000/t-linuxbi /gcc-3.3.2/gcc/config/rs6000/t-linuxbi
|
||||||
|
--- gcc-3.3.2/gcc/config/rs6000/t-linuxbi 2004-02-11 20:41:25.000000000 +0000
|
||||||
|
+++ gcc-3.3.2/gcc/config/rs6000/t-linuxbi 2004-02-11 11:15:51.000000000 +0000
|
||||||
|
@@ -9,13 +9,12 @@
|
||||||
|
|
||||||
|
SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc64.ver
|
||||||
|
|
||||||
|
-MULTILIB_OPTIONS = m64/m32 msoft-float
|
||||||
|
-MULTILIB_DIRNAMES = 64 32 nof
|
||||||
|
+MULTILIB_OPTIONS = m64/m32
|
||||||
|
+MULTILIB_DIRNAMES = 64 32
|
||||||
|
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
|
||||||
|
-MULTILIB_EXCEPTIONS = m64/msoft-float
|
||||||
|
-MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
|
||||||
|
-MULTILIB_OSDIRNAMES = ../lib64 ../lib nof
|
||||||
|
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
|
||||||
|
+MULTILIB_EXCEPTIONS =
|
||||||
|
+MULTILIB_EXCLUSIONS =
|
||||||
|
+MULTILIB_OSDIRNAMES = ../lib64 ../lib
|
||||||
|
|
||||||
|
# We want fine grained libraries, so use the new code to build the
|
||||||
|
# floating point emulation libraries.
|
20
gcc-ppc-nostartfileprefix.patch
Normal file
20
gcc-ppc-nostartfileprefix.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff -ur gcc-3.3.2/gcc/config/rs6000/linux64.h gcc-3.3.2/gcc/config/rs6000/linux64.h
|
||||||
|
--- gcc-3.3.2/gcc/config/rs6000/linux64.h 2003-11-28 09:14:56.000000000 +0000
|
||||||
|
+++ gcc-3.3.2/gcc/config/rs6000/linux64.h 2003-11-28 08:56:36.000000000 +0000
|
||||||
|
@@ -398,12 +398,12 @@
|
||||||
|
#if !defined (CROSS_COMPILE) || defined (NATIVE_CROSS)
|
||||||
|
#if DEFAULT_ARCH64_P
|
||||||
|
#define STARTFILE_PREFIX_SPEC "\
|
||||||
|
- %{!m32: " STANDARD_STARTFILE_PREFIX "../lib64/ /lib64/ /usr/lib64/} \
|
||||||
|
- %{m32: " STANDARD_STARTFILE_PREFIX " /lib/ /usr/lib/}"
|
||||||
|
+ %{!m32: /lib64/ /usr/lib64/} \
|
||||||
|
+ %{m32: /lib/ /usr/lib/}"
|
||||||
|
#else
|
||||||
|
#define STARTFILE_PREFIX_SPEC "\
|
||||||
|
- %{!m64: " STANDARD_STARTFILE_PREFIX " /lib/ /usr/lib/} \
|
||||||
|
- %{m64: " STANDARD_STARTFILE_PREFIX "../lib64/ /lib64/ /usr/lib64/}"
|
||||||
|
+ %{!m64: /lib/ /usr/lib/} \
|
||||||
|
+ %{m64: /lib64/ /usr/lib64/}"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
20
gcc-stl-multiple-defs.diff
Normal file
20
gcc-stl-multiple-defs.diff
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- libstdc++-v3/include/bits/stl_tree.h.orig 2005-01-20 11:11:09.000000000 +0000
|
||||||
|
+++ libstdc++-v3/include/bits/stl_tree.h 2005-01-20 11:05:06.000000000 +0000
|
||||||
|
@@ -302,7 +302,7 @@ namespace std
|
||||||
|
__x->_M_parent = __y;
|
||||||
|
}
|
||||||
|
|
||||||
|
- void
|
||||||
|
+ inline void
|
||||||
|
_Rb_tree_rebalance(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
|
||||||
|
{
|
||||||
|
__x->_M_color = _M_red;
|
||||||
|
@@ -357,7 +357,7 @@ namespace std
|
||||||
|
__root->_M_color = _M_black;
|
||||||
|
}
|
||||||
|
|
||||||
|
- _Rb_tree_node_base*
|
||||||
|
+ inline _Rb_tree_node_base*
|
||||||
|
_Rb_tree_rebalance_for_erase(_Rb_tree_node_base* __z,
|
||||||
|
_Rb_tree_node_base*& __root,
|
||||||
|
_Rb_tree_node_base*& __leftmost,
|
45
gcc-suse46595.diff
Normal file
45
gcc-suse46595.diff
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
Index: semantics.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
|
||||||
|
retrieving revision 1.282.2.13
|
||||||
|
diff -u -p -r1.282.2.13 semantics.c
|
||||||
|
--- gcc/cp/semantics.c 5 May 2004 13:05:50 -0000 1.282.2.13
|
||||||
|
+++ gcc/cp/semantics.c 1 Oct 2004 13:21:06 -0000
|
||||||
|
@@ -2455,6 +2455,18 @@ expand_or_defer_fn (fn)
|
||||||
|
if (flag_unit_at_a_time && cgraph_global_info_ready)
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
+ /* If this function is marked with the constructor attribute, add it
|
||||||
|
+ to the list of functions to be called along with constructors
|
||||||
|
+ from static duration objects. */
|
||||||
|
+ if (DECL_STATIC_CONSTRUCTOR (fn))
|
||||||
|
+ static_ctors = tree_cons (NULL_TREE, fn, static_ctors);
|
||||||
|
+
|
||||||
|
+ /* If this function is marked with the destructor attribute, add it
|
||||||
|
+ to the list of functions to be called along with destructors from
|
||||||
|
+ static duration objects. */
|
||||||
|
+ if (DECL_STATIC_DESTRUCTOR (fn))
|
||||||
|
+ static_dtors = tree_cons (NULL_TREE, fn, static_dtors);
|
||||||
|
+
|
||||||
|
if (flag_unit_at_a_time && !cgraph_global_info_ready)
|
||||||
|
{
|
||||||
|
if (at_eof)
|
||||||
|
@@ -2673,18 +2685,6 @@ genrtl_finish_function (fn)
|
||||||
|
if (ctype && TREE_ASM_WRITTEN (fn))
|
||||||
|
note_debug_info_needed (ctype);
|
||||||
|
#endif
|
||||||
|
-
|
||||||
|
- /* If this function is marked with the constructor attribute, add it
|
||||||
|
- to the list of functions to be called along with constructors
|
||||||
|
- from static duration objects. */
|
||||||
|
- if (DECL_STATIC_CONSTRUCTOR (fn))
|
||||||
|
- static_ctors = tree_cons (NULL_TREE, fn, static_ctors);
|
||||||
|
-
|
||||||
|
- /* If this function is marked with the destructor attribute, add it
|
||||||
|
- to the list of functions to be called along with destructors from
|
||||||
|
- static duration objects. */
|
||||||
|
- if (DECL_STATIC_DESTRUCTOR (fn))
|
||||||
|
- static_dtors = tree_cons (NULL_TREE, fn, static_dtors);
|
||||||
|
|
||||||
|
--function_depth;
|
||||||
|
|
31
gcc-swig-alias.patch
Normal file
31
gcc-swig-alias.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
* alias.c (init_alias_analysis): Don't check for
|
||||||
|
prologue_epilogue_contains.
|
||||||
|
|
||||||
|
Index: alias.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
|
||||||
|
retrieving revision 1.180.2.5
|
||||||
|
diff -c -3 -p -r1.180.2.5 alias.c
|
||||||
|
*** gcc/alias.c 14 Aug 2003 13:20:09 -0000 1.180.2.5
|
||||||
|
--- gcc/alias.c 21 Aug 2003 23:17:21 -0000
|
||||||
|
*************** init_alias_analysis ()
|
||||||
|
*** 2810,2815 ****
|
||||||
|
--- 2810,2816 ----
|
||||||
|
{
|
||||||
|
rtx note, set;
|
||||||
|
|
||||||
|
+ #if 0
|
||||||
|
#if defined (HAVE_prologue) || defined (HAVE_epilogue)
|
||||||
|
/* The prologue/epilogue insns are not threaded onto the
|
||||||
|
insn chain until after reload has completed. Thus,
|
||||||
|
*************** init_alias_analysis ()
|
||||||
|
*** 2818,2823 ****
|
||||||
|
--- 2819,2825 ----
|
||||||
|
if (reload_completed
|
||||||
|
&& prologue_epilogue_contains (insn))
|
||||||
|
continue;
|
||||||
|
+ #endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If this insn has a noalias note, process it, Otherwise,
|
||||||
|
|
41
gcc-unwind-ia64.patch
Normal file
41
gcc-unwind-ia64.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From nobody Fri Jun 18 12:05:46 2004
|
||||||
|
From: Jakub Jelinek <jakub@redhat.com>
|
||||||
|
Subject: [PATCH] Fix ia64 _Unwind_Backtrace
|
||||||
|
To: Jim Wilson <wilson@specifixinc.com>
|
||||||
|
Cc: gcc-patches@gcc.gnu.org
|
||||||
|
Date: Tue, 8 Jun 2004 08:19:45 +0200
|
||||||
|
|
||||||
|
Hi!
|
||||||
|
|
||||||
|
_Unwind_Backtrace on ia64 happily goes through a frame with IP 0 and might
|
||||||
|
crash later.
|
||||||
|
.save rp, r0
|
||||||
|
in _start is used to terminate the chain, so we should stop right there.
|
||||||
|
Without this patch, GCC assumes there is a leaf function without unwind info
|
||||||
|
at address 0.
|
||||||
|
I looked at libunwind and it special cases RP == 0 as well.
|
||||||
|
Ok for 3.3/3.4/HEAD?
|
||||||
|
|
||||||
|
2004-06-08 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* config/ia64/unwind-ia64.c (uw_frame_state_for): Don't assume a
|
||||||
|
leaf function without unwind info at RP 0.
|
||||||
|
|
||||||
|
--- gcc/config/ia64/unwind-ia64.c.jj 2004-04-01 18:43:56.000000000 +0200
|
||||||
|
+++ gcc/config/ia64/unwind-ia64.c 2004-06-08 10:26:50.673203249 +0200
|
||||||
|
@@ -1783,8 +1783,10 @@ uw_frame_state_for (struct _Unwind_Conte
|
||||||
|
an unwind table entry.
|
||||||
|
|
||||||
|
This can only happen in the frame after unwinding through a signal
|
||||||
|
- handler. Avoid infinite looping by requiring that B0 != RP. */
|
||||||
|
- if (context->br_loc[0] && *context->br_loc[0] != context->rp)
|
||||||
|
+ handler. Avoid infinite looping by requiring that B0 != RP.
|
||||||
|
+ RP == 0 terminates the chain. */
|
||||||
|
+ if (context->br_loc[0] && *context->br_loc[0] != context->rp
|
||||||
|
+ && context->rp != 0)
|
||||||
|
{
|
||||||
|
fs->curr.reg[UNW_REG_RP].where = UNW_WHERE_BR;
|
||||||
|
fs->curr.reg[UNW_REG_RP].when = -1;
|
||||||
|
|
||||||
|
Jakub
|
||||||
|
|
582
linkerscripts.patch
Normal file
582
linkerscripts.patch
Normal file
@ -0,0 +1,582 @@
|
|||||||
|
--- i386.ld
|
||||||
|
+++ i386.ld
|
||||||
|
@@ -1,116 +1,164 @@
|
||||||
|
-/* ld script to make i386 Linux kernel
|
||||||
|
- * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
|
||||||
|
- */
|
||||||
|
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
||||||
|
+/* Default linker script, for normal executables */
|
||||||
|
+OUTPUT_FORMAT("elf32-i386", "elf32-i386",
|
||||||
|
+ "elf32-i386")
|
||||||
|
OUTPUT_ARCH(i386)
|
||||||
|
-SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/alpha-unknown-linux-gnu/lib);
|
||||||
|
ENTRY(_start)
|
||||||
|
+SEARCH_DIR("/usr/i586-suse-linux/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* Read-only sections, merged into text segment: */
|
||||||
|
- . = 0x60000000 + SIZEOF_HEADERS;
|
||||||
|
- .interp : { *(.interp) }
|
||||||
|
- .hash : { *(.hash) }
|
||||||
|
- .dynsym : { *(.dynsym) }
|
||||||
|
- .dynstr : { *(.dynstr) }
|
||||||
|
- .gnu.version : { *(.gnu.version) }
|
||||||
|
- .gnu.version_d : { *(.gnu.version_d) }
|
||||||
|
- .gnu.version_r : { *(.gnu.version_r) }
|
||||||
|
- .rel.text :
|
||||||
|
- { *(.rel.text) *(.rel.gnu.linkonce.t*) }
|
||||||
|
- .rela.text :
|
||||||
|
- { *(.rela.text) *(.rela.gnu.linkonce.t*) }
|
||||||
|
- .rel.data :
|
||||||
|
- { *(.rel.data) *(.rel.gnu.linkonce.d*) }
|
||||||
|
- .rela.data :
|
||||||
|
- { *(.rela.data) *(.rela.gnu.linkonce.d*) }
|
||||||
|
- .rel.rodata :
|
||||||
|
- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
|
||||||
|
- .rela.rodata :
|
||||||
|
- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
|
||||||
|
- .rel.got : { *(.rel.got) }
|
||||||
|
- .rela.got : { *(.rela.got) }
|
||||||
|
- .rel.ctors : { *(.rel.ctors) }
|
||||||
|
- .rela.ctors : { *(.rela.ctors) }
|
||||||
|
- .rel.dtors : { *(.rel.dtors) }
|
||||||
|
- .rela.dtors : { *(.rela.dtors) }
|
||||||
|
- .rel.init : { *(.rel.init) }
|
||||||
|
- .rela.init : { *(.rela.init) }
|
||||||
|
- .rel.fini : { *(.rel.fini) }
|
||||||
|
- .rela.fini : { *(.rela.fini) }
|
||||||
|
- .rel.bss : { *(.rel.bss) }
|
||||||
|
- .rela.bss : { *(.rela.bss) }
|
||||||
|
- .rel.plt : { *(.rel.plt) }
|
||||||
|
- .rela.plt : { *(.rela.plt) }
|
||||||
|
- .init : { *(.init) } =0x47ff041f
|
||||||
|
- .text :
|
||||||
|
+ PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS;
|
||||||
|
+ .interp : { *(.interp) }
|
||||||
|
+ .hash : { *(.hash) }
|
||||||
|
+ .dynsym : { *(.dynsym) }
|
||||||
|
+ .dynstr : { *(.dynstr) }
|
||||||
|
+ .gnu.version : { *(.gnu.version) }
|
||||||
|
+ .gnu.version_d : { *(.gnu.version_d) }
|
||||||
|
+ .gnu.version_r : { *(.gnu.version_r) }
|
||||||
|
+ .rel.init : { *(.rel.init) }
|
||||||
|
+ .rela.init : { *(.rela.init) }
|
||||||
|
+ .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
|
||||||
|
+ .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
|
||||||
|
+ .rel.fini : { *(.rel.fini) }
|
||||||
|
+ .rela.fini : { *(.rela.fini) }
|
||||||
|
+ .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
|
||||||
|
+ .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
|
||||||
|
+ .rel.data.rel.ro : { *(.rel.data.rel.ro*) }
|
||||||
|
+ .rela.data.rel.ro : { *(.rel.data.rel.ro*) }
|
||||||
|
+ .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
|
||||||
|
+ .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
|
||||||
|
+ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
|
||||||
|
+ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
|
||||||
|
+ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
|
||||||
|
+ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
|
||||||
|
+ .rel.ctors : { *(.rel.ctors) }
|
||||||
|
+ .rela.ctors : { *(.rela.ctors) }
|
||||||
|
+ .rel.dtors : { *(.rel.dtors) }
|
||||||
|
+ .rela.dtors : { *(.rela.dtors) }
|
||||||
|
+ .rel.got : { *(.rel.got) }
|
||||||
|
+ .rela.got : { *(.rela.got) }
|
||||||
|
+ .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
|
||||||
|
+ .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
|
||||||
|
+ .rel.plt : { *(.rel.plt) }
|
||||||
|
+ .rela.plt : { *(.rela.plt) }
|
||||||
|
+ .init :
|
||||||
|
{
|
||||||
|
- *(.text)
|
||||||
|
+ KEEP (*(.init))
|
||||||
|
+ } =0x90909090
|
||||||
|
+ .plt : { *(.plt) }
|
||||||
|
+ .text :
|
||||||
|
+ {
|
||||||
|
+ *(.text .stub .text.* .gnu.linkonce.t.*)
|
||||||
|
+ KEEP (*(.text.*personality*))
|
||||||
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||||
|
*(.gnu.warning)
|
||||||
|
- *(.gnu.linkonce.t*)
|
||||||
|
- } =0x47ff041f
|
||||||
|
- _etext = .;
|
||||||
|
+ } =0x90909090
|
||||||
|
+ .fini :
|
||||||
|
+ {
|
||||||
|
+ KEEP (*(.fini))
|
||||||
|
+ } =0x90909090
|
||||||
|
+ PROVIDE (__etext = .);
|
||||||
|
+ PROVIDE (_etext = .);
|
||||||
|
PROVIDE (etext = .);
|
||||||
|
- .fini : { *(.fini) } =0x47ff041f
|
||||||
|
- . = ALIGN(32 / 8);
|
||||||
|
- PROVIDE (__preinit_array_start = .);
|
||||||
|
- .preinit_array : { *(.preinit_array) }
|
||||||
|
- PROVIDE (__preinit_array_end = .);
|
||||||
|
- PROVIDE (__init_array_start = .);
|
||||||
|
- .init_array : { *(.init_array) }
|
||||||
|
- PROVIDE (__init_array_end = .);
|
||||||
|
- PROVIDE (__fini_array_start = .);
|
||||||
|
- .fini_array : { *(.fini_array) }
|
||||||
|
- PROVIDE (__fini_array_end = .);
|
||||||
|
- .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
|
||||||
|
- .rodata1 : { *(.rodata1) }
|
||||||
|
- .reginfo : { *(.reginfo) }
|
||||||
|
+ .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
||||||
|
+ .rodata1 : { *(.rodata1) }
|
||||||
|
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||||
|
+ .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||||
|
+ .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
|
||||||
|
/* Adjust the address for the data segment. We want to adjust up to
|
||||||
|
the same address within the page on the next page up. */
|
||||||
|
- . = ALIGN(0x100000) + (. & (0x100000 - 1));
|
||||||
|
- .data :
|
||||||
|
+ . = ALIGN (0x1000) - ((0x1000 - .) & (0x1000 - 1)); . = DATA_SEGMENT_ALIGN (0x1000, 0x1000);
|
||||||
|
+ /* Exception handling */
|
||||||
|
+ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||||
|
+ .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
|
||||||
|
+ /* Thread Local Storage sections */
|
||||||
|
+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||||
|
+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||||
|
+ .preinit_array :
|
||||||
|
+ {
|
||||||
|
+ PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
+ KEEP (*(.preinit_array))
|
||||||
|
+ PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
+ }
|
||||||
|
+ .init_array :
|
||||||
|
+ {
|
||||||
|
+ PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
+ KEEP (*(.init_array))
|
||||||
|
+ PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
+ }
|
||||||
|
+ .fini_array :
|
||||||
|
+ {
|
||||||
|
+ PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
+ KEEP (*(.fini_array))
|
||||||
|
+ PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
+ }
|
||||||
|
+ .ctors :
|
||||||
|
+ {
|
||||||
|
+ /* gcc uses crtbegin.o to find the start of
|
||||||
|
+ the constructors, so we make sure it is
|
||||||
|
+ first. Because this is a wildcard, it
|
||||||
|
+ doesn't matter if the user does not
|
||||||
|
+ actually link against crtbegin.o; the
|
||||||
|
+ linker won't look for a file to match a
|
||||||
|
+ wildcard. The wildcard also means that it
|
||||||
|
+ doesn't matter which directory crtbegin.o
|
||||||
|
+ is in. */
|
||||||
|
+ KEEP (*crtbegin*.o(.ctors))
|
||||||
|
+ /* We don't want to include the .ctor section from
|
||||||
|
+ from the crtend.o file until after the sorted ctors.
|
||||||
|
+ The .ctor section from the crtend file contains the
|
||||||
|
+ end of ctors marker and it must be last */
|
||||||
|
+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
|
||||||
|
+ KEEP (*(SORT(.ctors.*)))
|
||||||
|
+ KEEP (*(.ctors))
|
||||||
|
+ }
|
||||||
|
+ .dtors :
|
||||||
|
+ {
|
||||||
|
+ KEEP (*crtbegin*.o(.dtors))
|
||||||
|
+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
|
||||||
|
+ KEEP (*(SORT(.dtors.*)))
|
||||||
|
+ KEEP (*(.dtors))
|
||||||
|
+ }
|
||||||
|
+ .jcr : { KEEP (*(.jcr)) }
|
||||||
|
+ .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }
|
||||||
|
+ .dynamic : { *(.dynamic) }
|
||||||
|
+ .got : { *(.got) }
|
||||||
|
+ . = DATA_SEGMENT_RELRO_END (12, .);
|
||||||
|
+ .got.plt : { *(.got.plt) }
|
||||||
|
+ .data :
|
||||||
|
{
|
||||||
|
- *(.data)
|
||||||
|
- *(.gnu.linkonce.d*)
|
||||||
|
- CONSTRUCTORS
|
||||||
|
- }
|
||||||
|
- .data1 : { *(.data1) }
|
||||||
|
- .ctors :
|
||||||
|
- {
|
||||||
|
- *(.ctors)
|
||||||
|
- }
|
||||||
|
- .dtors :
|
||||||
|
- {
|
||||||
|
- *(.dtors)
|
||||||
|
- }
|
||||||
|
- .plt : { *(.plt) }
|
||||||
|
- .got : { *(.got.plt) *(.got) }
|
||||||
|
- .dynamic : { *(.dynamic) }
|
||||||
|
- /* We want the small data sections together, so single-instruction offsets
|
||||||
|
- can access them all, and initialized data all before uninitialized, so
|
||||||
|
- we can shorten the on-disk segment size. */
|
||||||
|
- .sdata : { *(.sdata) }
|
||||||
|
- _edata = .;
|
||||||
|
- PROVIDE (edata = .);
|
||||||
|
+ *(.data .data.* .gnu.linkonce.d.*)
|
||||||
|
+ KEEP (*(.gnu.linkonce.d.*personality*))
|
||||||
|
+ SORT(CONSTRUCTORS)
|
||||||
|
+ }
|
||||||
|
+ .data1 : { *(.data1) }
|
||||||
|
+ _edata = .; PROVIDE (edata = .);
|
||||||
|
__bss_start = .;
|
||||||
|
- .sbss : { *(.sbss) *(.scommon) }
|
||||||
|
- .bss :
|
||||||
|
+ .bss :
|
||||||
|
{
|
||||||
|
*(.dynbss)
|
||||||
|
- *(.bss)
|
||||||
|
+ *(.bss .bss.* .gnu.linkonce.b.*)
|
||||||
|
*(COMMON)
|
||||||
|
+ /* Align here to ensure that the .bss section occupies space up to
|
||||||
|
+ _end. Align after .bss to ensure correct alignment even if the
|
||||||
|
+ .bss section disappears because there are no input sections.
|
||||||
|
+ FIXME: Why do we need it? When there is no .bss section, we don't
|
||||||
|
+ pad the .data section. */
|
||||||
|
+ . = ALIGN(. != 0 ? 32 / 8 : 1);
|
||||||
|
}
|
||||||
|
- _end = . ;
|
||||||
|
+ . = ALIGN(32 / 8);
|
||||||
|
+ . = ALIGN(32 / 8);
|
||||||
|
+ _end = .;
|
||||||
|
PROVIDE (end = .);
|
||||||
|
+ . = DATA_SEGMENT_END (.);
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
- .stab 0 : { *(.stab) }
|
||||||
|
- .stabstr 0 : { *(.stabstr) }
|
||||||
|
- .stab.excl 0 : { *(.stab.excl) }
|
||||||
|
- .stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
- .stab.index 0 : { *(.stab.index) }
|
||||||
|
+ .stab 0 : { *(.stab) }
|
||||||
|
+ .stabstr 0 : { *(.stabstr) }
|
||||||
|
+ .stab.excl 0 : { *(.stab.excl) }
|
||||||
|
+ .stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
+ .stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
- .comment 0 : { *(.comment) }
|
||||||
|
+ .comment 0 : { *(.comment) }
|
||||||
|
/* DWARF debug sections.
|
||||||
|
Symbols in the DWARF debugging sections are relative to the beginning
|
||||||
|
of the section so we begin them at 0. */
|
||||||
|
@@ -124,7 +172,7 @@
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
- .debug_info 0 : { *(.debug_info) }
|
||||||
|
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
@@ -136,5 +184,5 @@
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
- /* These must appear regardless of . */
|
||||||
|
+ /DISCARD/ : { *(.note.GNU-stack) }
|
||||||
|
}
|
||||||
|
--- ppc.ld
|
||||||
|
+++ ppc.ld
|
||||||
|
@@ -1,116 +1,200 @@
|
||||||
|
-/* ld script to make i386 Linux kernel
|
||||||
|
- * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
|
||||||
|
- */
|
||||||
|
-OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
|
||||||
|
-OUTPUT_ARCH(powerpc)
|
||||||
|
-SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/alpha-unknown-linux-gnu/lib);
|
||||||
|
+/* Default linker script, for normal executables */
|
||||||
|
+OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
|
||||||
|
+ "elf32-powerpc")
|
||||||
|
+OUTPUT_ARCH(powerpc:common)
|
||||||
|
ENTRY(_start)
|
||||||
|
+SEARCH_DIR("/usr/powerpc-suse-linux/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* Read-only sections, merged into text segment: */
|
||||||
|
- . = 0x60000000 + SIZEOF_HEADERS;
|
||||||
|
- .interp : { *(.interp) }
|
||||||
|
- .hash : { *(.hash) }
|
||||||
|
- .dynsym : { *(.dynsym) }
|
||||||
|
- .dynstr : { *(.dynstr) }
|
||||||
|
- .gnu.version : { *(.gnu.version) }
|
||||||
|
- .gnu.version_d : { *(.gnu.version_d) }
|
||||||
|
- .gnu.version_r : { *(.gnu.version_r) }
|
||||||
|
- .rel.text :
|
||||||
|
- { *(.rel.text) *(.rel.gnu.linkonce.t*) }
|
||||||
|
- .rela.text :
|
||||||
|
- { *(.rela.text) *(.rela.gnu.linkonce.t*) }
|
||||||
|
- .rel.data :
|
||||||
|
- { *(.rel.data) *(.rel.gnu.linkonce.d*) }
|
||||||
|
- .rela.data :
|
||||||
|
- { *(.rela.data) *(.rela.gnu.linkonce.d*) }
|
||||||
|
- .rel.rodata :
|
||||||
|
- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
|
||||||
|
- .rela.rodata :
|
||||||
|
- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
|
||||||
|
- .rel.got : { *(.rel.got) }
|
||||||
|
- .rela.got : { *(.rela.got) }
|
||||||
|
- .rel.ctors : { *(.rel.ctors) }
|
||||||
|
- .rela.ctors : { *(.rela.ctors) }
|
||||||
|
- .rel.dtors : { *(.rel.dtors) }
|
||||||
|
- .rela.dtors : { *(.rela.dtors) }
|
||||||
|
- .rel.init : { *(.rel.init) }
|
||||||
|
- .rela.init : { *(.rela.init) }
|
||||||
|
- .rel.fini : { *(.rel.fini) }
|
||||||
|
- .rela.fini : { *(.rela.fini) }
|
||||||
|
- .rel.bss : { *(.rel.bss) }
|
||||||
|
- .rela.bss : { *(.rela.bss) }
|
||||||
|
- .rel.plt : { *(.rel.plt) }
|
||||||
|
- .rela.plt : { *(.rela.plt) }
|
||||||
|
- .init : { *(.init) } =0x47ff041f
|
||||||
|
- .text :
|
||||||
|
+ PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS;
|
||||||
|
+ .interp : { *(.interp) }
|
||||||
|
+ .hash : { *(.hash) }
|
||||||
|
+ .dynsym : { *(.dynsym) }
|
||||||
|
+ .dynstr : { *(.dynstr) }
|
||||||
|
+ .gnu.version : { *(.gnu.version) }
|
||||||
|
+ .gnu.version_d : { *(.gnu.version_d) }
|
||||||
|
+ .gnu.version_r : { *(.gnu.version_r) }
|
||||||
|
+ .rel.init : { *(.rel.init) }
|
||||||
|
+ .rela.init : { *(.rela.init) }
|
||||||
|
+ .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
|
||||||
|
+ .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
|
||||||
|
+ .rel.fini : { *(.rel.fini) }
|
||||||
|
+ .rela.fini : { *(.rela.fini) }
|
||||||
|
+ .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
|
||||||
|
+ .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
|
||||||
|
+ .rel.data.rel.ro : { *(.rel.data.rel.ro*) }
|
||||||
|
+ .rela.data.rel.ro : { *(.rel.data.rel.ro*) }
|
||||||
|
+ .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
|
||||||
|
+ .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
|
||||||
|
+ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
|
||||||
|
+ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
|
||||||
|
+ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
|
||||||
|
+ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
|
||||||
|
+ .rel.ctors : { *(.rel.ctors) }
|
||||||
|
+ .rela.ctors : { *(.rela.ctors) }
|
||||||
|
+ .rel.dtors : { *(.rel.dtors) }
|
||||||
|
+ .rela.dtors : { *(.rela.dtors) }
|
||||||
|
+ .rel.got : { *(.rel.got) }
|
||||||
|
+ .rela.got : { *(.rela.got) }
|
||||||
|
+ .rela.got1 : { *(.rela.got1) }
|
||||||
|
+ .rela.got2 : { *(.rela.got2) }
|
||||||
|
+ .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
|
||||||
|
+ .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
|
||||||
|
+ .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
|
||||||
|
+ .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
|
||||||
|
+ .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
|
||||||
|
+ .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
|
||||||
|
+ .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
|
||||||
|
+ .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
|
||||||
|
+ .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
|
||||||
|
+ .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
|
||||||
|
+ .rel.plt : { *(.rel.plt) }
|
||||||
|
+ .rela.plt : { *(.rela.plt) }
|
||||||
|
+ .init :
|
||||||
|
{
|
||||||
|
- *(.text)
|
||||||
|
+ KEEP (*(.init))
|
||||||
|
+ } =0
|
||||||
|
+ .text :
|
||||||
|
+ {
|
||||||
|
+ *(.text .stub .text.* .gnu.linkonce.t.*)
|
||||||
|
+ KEEP (*(.text.*personality*))
|
||||||
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||||
|
*(.gnu.warning)
|
||||||
|
- *(.gnu.linkonce.t*)
|
||||||
|
- } =0x47ff041f
|
||||||
|
- _etext = .;
|
||||||
|
+ *(.glink)
|
||||||
|
+ } =0
|
||||||
|
+ .fini :
|
||||||
|
+ {
|
||||||
|
+ KEEP (*(.fini))
|
||||||
|
+ } =0
|
||||||
|
+ PROVIDE (__etext = .);
|
||||||
|
+ PROVIDE (_etext = .);
|
||||||
|
PROVIDE (etext = .);
|
||||||
|
- .fini : { *(.fini) } =0x47ff041f
|
||||||
|
- . = ALIGN(32 / 8);
|
||||||
|
- PROVIDE (__preinit_array_start = .);
|
||||||
|
- .preinit_array : { *(.preinit_array) }
|
||||||
|
- PROVIDE (__preinit_array_end = .);
|
||||||
|
- PROVIDE (__init_array_start = .);
|
||||||
|
- .init_array : { *(.init_array) }
|
||||||
|
- PROVIDE (__init_array_end = .);
|
||||||
|
- PROVIDE (__fini_array_start = .);
|
||||||
|
- .fini_array : { *(.fini_array) }
|
||||||
|
- PROVIDE (__fini_array_end = .);
|
||||||
|
- .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
|
||||||
|
- .rodata1 : { *(.rodata1) }
|
||||||
|
- .reginfo : { *(.reginfo) }
|
||||||
|
+ .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
||||||
|
+ .rodata1 : { *(.rodata1) }
|
||||||
|
+ .sdata2 :
|
||||||
|
+ {
|
||||||
|
+ PROVIDE (_SDA2_BASE_ = 32768);
|
||||||
|
+ *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
|
||||||
|
+ }
|
||||||
|
+ .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
|
||||||
|
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||||
|
+ .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||||
|
+ .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
|
||||||
|
/* Adjust the address for the data segment. We want to adjust up to
|
||||||
|
the same address within the page on the next page up. */
|
||||||
|
- . = ALIGN(0x100000) + (. & (0x100000 - 1));
|
||||||
|
- .data :
|
||||||
|
+ . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN (0x10000, 0x1000);
|
||||||
|
+ /* Exception handling */
|
||||||
|
+ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||||
|
+ .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
|
||||||
|
+ /* Thread Local Storage sections */
|
||||||
|
+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||||
|
+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||||
|
+ .preinit_array :
|
||||||
|
+ {
|
||||||
|
+ PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
+ KEEP (*(.preinit_array))
|
||||||
|
+ PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
+ }
|
||||||
|
+ .init_array :
|
||||||
|
+ {
|
||||||
|
+ PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
+ KEEP (*(.init_array))
|
||||||
|
+ PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
+ }
|
||||||
|
+ .fini_array :
|
||||||
|
{
|
||||||
|
- *(.data)
|
||||||
|
- *(.gnu.linkonce.d*)
|
||||||
|
- CONSTRUCTORS
|
||||||
|
+ PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
+ KEEP (*(.fini_array))
|
||||||
|
+ PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
}
|
||||||
|
- .data1 : { *(.data1) }
|
||||||
|
- .ctors :
|
||||||
|
+ .ctors :
|
||||||
|
{
|
||||||
|
- *(.ctors)
|
||||||
|
+ /* gcc uses crtbegin.o to find the start of
|
||||||
|
+ the constructors, so we make sure it is
|
||||||
|
+ first. Because this is a wildcard, it
|
||||||
|
+ doesn't matter if the user does not
|
||||||
|
+ actually link against crtbegin.o; the
|
||||||
|
+ linker won't look for a file to match a
|
||||||
|
+ wildcard. The wildcard also means that it
|
||||||
|
+ doesn't matter which directory crtbegin.o
|
||||||
|
+ is in. */
|
||||||
|
+ KEEP (*crtbegin*.o(.ctors))
|
||||||
|
+ /* We don't want to include the .ctor section from
|
||||||
|
+ from the crtend.o file until after the sorted ctors.
|
||||||
|
+ The .ctor section from the crtend file contains the
|
||||||
|
+ end of ctors marker and it must be last */
|
||||||
|
+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
|
||||||
|
+ KEEP (*(SORT(.ctors.*)))
|
||||||
|
+ KEEP (*(.ctors))
|
||||||
|
}
|
||||||
|
- .dtors :
|
||||||
|
+ .dtors :
|
||||||
|
{
|
||||||
|
- *(.dtors)
|
||||||
|
+ KEEP (*crtbegin*.o(.dtors))
|
||||||
|
+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
|
||||||
|
+ KEEP (*(SORT(.dtors.*)))
|
||||||
|
+ KEEP (*(.dtors))
|
||||||
|
}
|
||||||
|
- .plt : { *(.plt) }
|
||||||
|
- .got : { *(.got.plt) *(.got) }
|
||||||
|
- .dynamic : { *(.dynamic) }
|
||||||
|
+ .jcr : { KEEP (*(.jcr)) }
|
||||||
|
+ .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }
|
||||||
|
+ .got1 : { *(.got1) }
|
||||||
|
+ .got2 : { *(.got2) }
|
||||||
|
+ .dynamic : { *(.dynamic) }
|
||||||
|
+ .got : SPECIAL { *(.got) }
|
||||||
|
+ . = DATA_SEGMENT_RELRO_END (0, .);
|
||||||
|
+ .plt : SPECIAL { *(.plt) }
|
||||||
|
+ .data :
|
||||||
|
+ {
|
||||||
|
+ *(.data .data.* .gnu.linkonce.d.*)
|
||||||
|
+ KEEP (*(.gnu.linkonce.d.*personality*))
|
||||||
|
+ SORT(CONSTRUCTORS)
|
||||||
|
+ }
|
||||||
|
+ .data1 : { *(.data1) }
|
||||||
|
+ .got : SPECIAL { *(.got) }
|
||||||
|
/* We want the small data sections together, so single-instruction offsets
|
||||||
|
can access them all, and initialized data all before uninitialized, so
|
||||||
|
we can shorten the on-disk segment size. */
|
||||||
|
- .sdata : { *(.sdata) }
|
||||||
|
- _edata = .;
|
||||||
|
- PROVIDE (edata = .);
|
||||||
|
+ .sdata :
|
||||||
|
+ {
|
||||||
|
+ PROVIDE (_SDA_BASE_ = 32768);
|
||||||
|
+ *(.sdata .sdata.* .gnu.linkonce.s.*)
|
||||||
|
+ }
|
||||||
|
+ _edata = .; PROVIDE (edata = .);
|
||||||
|
__bss_start = .;
|
||||||
|
- .sbss : { *(.sbss) *(.scommon) }
|
||||||
|
- .bss :
|
||||||
|
+ .sbss :
|
||||||
|
+ {
|
||||||
|
+ PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
|
||||||
|
+ *(.dynsbss)
|
||||||
|
+ *(.sbss .sbss.* .gnu.linkonce.sb.*)
|
||||||
|
+ *(.scommon)
|
||||||
|
+ PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
|
||||||
|
+ }
|
||||||
|
+ .plt : SPECIAL { *(.plt) }
|
||||||
|
+ .bss :
|
||||||
|
{
|
||||||
|
*(.dynbss)
|
||||||
|
- *(.bss)
|
||||||
|
+ *(.bss .bss.* .gnu.linkonce.b.*)
|
||||||
|
*(COMMON)
|
||||||
|
+ /* Align here to ensure that the .bss section occupies space up to
|
||||||
|
+ _end. Align after .bss to ensure correct alignment even if the
|
||||||
|
+ .bss section disappears because there are no input sections.
|
||||||
|
+ FIXME: Why do we need it? When there is no .bss section, we don't
|
||||||
|
+ pad the .data section. */
|
||||||
|
+ . = ALIGN(. != 0 ? 32 / 8 : 1);
|
||||||
|
}
|
||||||
|
- _end = . ;
|
||||||
|
+ . = ALIGN(32 / 8);
|
||||||
|
+ . = ALIGN(32 / 8);
|
||||||
|
+ _end = .;
|
||||||
|
PROVIDE (end = .);
|
||||||
|
+ . = DATA_SEGMENT_END (.);
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
- .stab 0 : { *(.stab) }
|
||||||
|
- .stabstr 0 : { *(.stabstr) }
|
||||||
|
- .stab.excl 0 : { *(.stab.excl) }
|
||||||
|
- .stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
- .stab.index 0 : { *(.stab.index) }
|
||||||
|
+ .stab 0 : { *(.stab) }
|
||||||
|
+ .stabstr 0 : { *(.stabstr) }
|
||||||
|
+ .stab.excl 0 : { *(.stab.excl) }
|
||||||
|
+ .stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
+ .stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
- .comment 0 : { *(.comment) }
|
||||||
|
+ .comment 0 : { *(.comment) }
|
||||||
|
/* DWARF debug sections.
|
||||||
|
Symbols in the DWARF debugging sections are relative to the beginning
|
||||||
|
of the section so we begin them at 0. */
|
||||||
|
@@ -124,7 +208,7 @@
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
- .debug_info 0 : { *(.debug_info) }
|
||||||
|
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
@@ -136,5 +220,6 @@
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
- /* These must appear regardless of . */
|
||||||
|
+ /DISCARD/ : { *(.fixup) }
|
||||||
|
+ /DISCARD/ : { *(.note.GNU-stack) }
|
||||||
|
}
|
22
qemu-0.7.0-amd64.patch
Normal file
22
qemu-0.7.0-amd64.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- x86_64.ld
|
||||||
|
+++ x86_64.ld
|
||||||
|
@@ -59,8 +59,6 @@
|
||||||
|
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
||||||
|
.rodata1 : { *(.rodata1) }
|
||||||
|
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||||
|
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||||
|
- .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table) }
|
||||||
|
/* Adjust the address for the data segment. We want to adjust up to
|
||||||
|
the same address within the page on the next page up. */
|
||||||
|
. = ALIGN (0x100000) - ((0x100000 - .) & (0x100000 - 1)); . = DATA_SEGMENT_ALIGN (0x100000, 0x1000);
|
||||||
|
@@ -86,8 +84,8 @@
|
||||||
|
.data1 : { *(.data1) }
|
||||||
|
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||||
|
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||||
|
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||||
|
- .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table) }
|
||||||
|
+ .eh_frame : { KEEP (*(.eh_frame)) }
|
||||||
|
+ .gcc_except_table : { *(.gcc_except_table) }
|
||||||
|
.dynamic : { *(.dynamic) }
|
||||||
|
.ctors :
|
||||||
|
{
|
60
qemu-0.7.0-binfmt.patch
Normal file
60
qemu-0.7.0-binfmt.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
--- qemu-binfmt-conf.sh
|
||||||
|
+++ qemu-binfmt-conf.sh
|
||||||
|
@@ -2,38 +2,46 @@
|
||||||
|
# enable automatic i386/ARM/SPARC/PPC program execution by the kernel
|
||||||
|
|
||||||
|
# load the binfmt_misc module
|
||||||
|
-/sbin/modprobe binfmt_misc
|
||||||
|
+
|
||||||
|
+if test ! -e /proc/sys/fs/binfmt_misc/register
|
||||||
|
+then
|
||||||
|
+ /sbin/modprobe binfmt_misc
|
||||||
|
+ mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
|
||||||
|
+fi
|
||||||
|
|
||||||
|
# probe cpu type
|
||||||
|
cpu=`uname -m`
|
||||||
|
case "$cpu" in
|
||||||
|
- i386|i486|i586|i686|i86pc|BePC)
|
||||||
|
+ i386|i486|i586|i686|i86pc|BePC|x86_64)
|
||||||
|
cpu="i386"
|
||||||
|
;;
|
||||||
|
"Power Macintosh"|ppc|ppc64)
|
||||||
|
cpu="ppc"
|
||||||
|
;;
|
||||||
|
- armv4l)
|
||||||
|
+ armv[4-9]*l)
|
||||||
|
cpu="arm"
|
||||||
|
;;
|
||||||
|
+ sparc*)
|
||||||
|
+ cpu="sparc"
|
||||||
|
+ ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# register the interpreter for each cpu except for the native one
|
||||||
|
if [ $cpu != "i386" ] ; then
|
||||||
|
- echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "arm" ] ; then
|
||||||
|
- echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "sparc" ] ; then
|
||||||
|
- echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "ppc" ] ; then
|
||||||
|
- echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "mips" ] ; then
|
||||||
|
- echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
49
qemu-0.7.0-sigaltstackhack.patch
Normal file
49
qemu-0.7.0-sigaltstackhack.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
--- linux-user/syscall.c
|
||||||
|
+++ linux-user/syscall.c
|
||||||
|
@@ -2727,7 +2727,8 @@
|
||||||
|
case TARGET_NR_capset:
|
||||||
|
goto unimplemented;
|
||||||
|
case TARGET_NR_sigaltstack:
|
||||||
|
- goto unimplemented;
|
||||||
|
+ ret = 0; /* good enough for most purposes */
|
||||||
|
+ break;
|
||||||
|
case TARGET_NR_sendfile:
|
||||||
|
goto unimplemented;
|
||||||
|
#ifdef TARGET_NR_getpmsg
|
||||||
|
--- linux-user/signal.c
|
||||||
|
+++ linux-user/signal.c
|
||||||
|
@@ -1014,6 +1021,14 @@
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
+void* hack_stack;
|
||||||
|
+
|
||||||
|
+void hack_handler(int signum)
|
||||||
|
+{
|
||||||
|
+ fprintf(stderr,"QEMU: stack overflow, aborting\n");
|
||||||
|
+ exit(-SIGSEGV);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static inline void *
|
||||||
|
get_sigframe(struct emulated_sigaction *ka, CPUState *regs, int framesize)
|
||||||
|
{
|
||||||
|
@@ -1026,6 +1041,19 @@
|
||||||
|
if ((ka->sa.sa_flags & SA_ONSTACK) && !sas_ss_flags(sp))
|
||||||
|
sp = current->sas_ss_sp + current->sas_ss_size;
|
||||||
|
#endif
|
||||||
|
+
|
||||||
|
+ /* EVIL HACK TIME!
|
||||||
|
+ This is supposed to prevent endless segfault loops in case of stack
|
||||||
|
+ overflows that can occur as a result of the dummy sigaltstack()
|
||||||
|
+ syscall. */
|
||||||
|
+ struct sigaction oldact;
|
||||||
|
+ struct sigaction act;
|
||||||
|
+ memset(&act,0,sizeof(struct sigaction));
|
||||||
|
+ act.sa_handler=hack_handler;
|
||||||
|
+ sigaction(SIGSEGV,&act,&oldact);
|
||||||
|
+ hack_stack = *((void**)((sp-framesize)&~7));
|
||||||
|
+ sigaction(SIGSEGV,&oldact,&act);
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* ATPCS B01 mandates 8-byte alignment
|
||||||
|
*/
|
82
qemu-0.7.1-armfpaex.patch
Normal file
82
qemu-0.7.1-armfpaex.patch
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
--- linux-user/main.c
|
||||||
|
+++ linux-user/main.c
|
||||||
|
@@ -323,18 +323,54 @@
|
||||||
|
{
|
||||||
|
TaskState *ts = env->opaque;
|
||||||
|
uint32_t opcode;
|
||||||
|
+ int rc;
|
||||||
|
|
||||||
|
/* we handle the FPU emulation here, as Linux */
|
||||||
|
/* we get the opcode */
|
||||||
|
opcode = tget32(env->regs[15]);
|
||||||
|
|
||||||
|
- if (EmulateAll(opcode, &ts->fpa, env) == 0) {
|
||||||
|
+ if ((rc=EmulateAll(opcode, &ts->fpa, env)) == 0) { /* illegal instruction */
|
||||||
|
info.si_signo = SIGILL;
|
||||||
|
info.si_errno = 0;
|
||||||
|
info.si_code = TARGET_ILL_ILLOPN;
|
||||||
|
info._sifields._sigfault._addr = env->regs[15];
|
||||||
|
queue_signal(info.si_signo, &info);
|
||||||
|
- } else {
|
||||||
|
+ } else if (rc < 0) { /* FP exception */
|
||||||
|
+ int arm_fpe=0;
|
||||||
|
+ /* translate softfloat flags to FPSR flags */
|
||||||
|
+ if(-rc & float_flag_invalid) arm_fpe |= BIT_IOC;
|
||||||
|
+ if(-rc & float_flag_divbyzero) arm_fpe |= BIT_DZC;
|
||||||
|
+ if(-rc & float_flag_overflow) arm_fpe |= BIT_OFC;
|
||||||
|
+ if(-rc & float_flag_underflow) arm_fpe |= BIT_UFC;
|
||||||
|
+ if(-rc & float_flag_inexact) arm_fpe |= BIT_IXC;
|
||||||
|
+
|
||||||
|
+ FPSR fpsr = ts->fpa.fpsr;
|
||||||
|
+ //printf("fpsr 0x%x, arm_fpe 0x%x\n",fpsr,arm_fpe);
|
||||||
|
+
|
||||||
|
+ if(fpsr & (arm_fpe << 16)) /* exception enabled? */
|
||||||
|
+ {
|
||||||
|
+ info.si_signo = SIGFPE;
|
||||||
|
+ info.si_errno = 0;
|
||||||
|
+ /* ordered by priority, least first */
|
||||||
|
+ if(arm_fpe & BIT_IXC) info.si_code = TARGET_FPE_FLTRES;
|
||||||
|
+ if(arm_fpe & BIT_UFC) info.si_code = TARGET_FPE_FLTUND;
|
||||||
|
+ if(arm_fpe & BIT_OFC) info.si_code = TARGET_FPE_FLTOVF;
|
||||||
|
+ if(arm_fpe & BIT_DZC) info.si_code = TARGET_FPE_FLTDIV;
|
||||||
|
+ if(arm_fpe & BIT_IOC) info.si_code = TARGET_FPE_FLTINV;
|
||||||
|
+ info._sifields._sigfault._addr = env->regs[15];
|
||||||
|
+ queue_signal(info.si_signo, &info);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ env->regs[15] += 4;
|
||||||
|
+
|
||||||
|
+ /* accumulate unenabled exceptions */
|
||||||
|
+ if((!(fpsr & BIT_IXE)) && (arm_fpe & BIT_IXC)) fpsr |= BIT_IXC;
|
||||||
|
+ if((!(fpsr & BIT_UFE)) && (arm_fpe & BIT_UFC)) fpsr |= BIT_UFC;
|
||||||
|
+ if((!(fpsr & BIT_OFE)) && (arm_fpe & BIT_OFC)) fpsr |= BIT_OFC;
|
||||||
|
+ if((!(fpsr & BIT_DZE)) && (arm_fpe & BIT_DZC)) fpsr |= BIT_DZC;
|
||||||
|
+ if((!(fpsr & BIT_IOE)) && (arm_fpe & BIT_IOC)) fpsr |= BIT_IOC;
|
||||||
|
+ ts->fpa.fpsr=fpsr;
|
||||||
|
+ } else { /* everything OK */
|
||||||
|
/* increment PC */
|
||||||
|
env->regs[15] += 4;
|
||||||
|
}
|
||||||
|
--- target-arm/nwfpe/fpa11.c
|
||||||
|
+++ target-arm/nwfpe/fpa11.c
|
||||||
|
@@ -162,6 +162,8 @@
|
||||||
|
fpa11->initflag = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ set_float_exception_flags(0, &fpa11->fp_status);
|
||||||
|
+
|
||||||
|
if (TEST_OPCODE(opcode,MASK_CPRT))
|
||||||
|
{
|
||||||
|
//fprintf(stderr,"emulating CPRT\n");
|
||||||
|
@@ -191,6 +193,11 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
// restore_flags(flags);
|
||||||
|
+ if(nRc == 1 && get_float_exception_flags(&fpa11->fp_status))
|
||||||
|
+ {
|
||||||
|
+ //printf("fef 0x%x\n",float_exception_flags);
|
||||||
|
+ nRc=-get_float_exception_flags(&fpa11->fp_status);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
//printf("returning %d\n",nRc);
|
||||||
|
return(nRc);
|
19
qemu-0.7.1-jobsignals.patch
Normal file
19
qemu-0.7.1-jobsignals.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
--- linux-user/signal.c
|
||||||
|
+++ linux-user/signal.c
|
||||||
|
@@ -341,10 +341,15 @@
|
||||||
|
k = &sigact_table[sig - 1];
|
||||||
|
handler = k->sa._sa_handler;
|
||||||
|
if (handler == TARGET_SIG_DFL) {
|
||||||
|
+ if (sig == TARGET_SIGTSTP || sig == TARGET_SIGTTIN || sig == TARGET_SIGTTOU) {
|
||||||
|
+ kill(getpid(),SIGSTOP);
|
||||||
|
+ return 0;
|
||||||
|
+ } else
|
||||||
|
/* default handler : ignore some signal. The other are fatal */
|
||||||
|
if (sig != TARGET_SIGCHLD &&
|
||||||
|
sig != TARGET_SIGURG &&
|
||||||
|
- sig != TARGET_SIGWINCH) {
|
||||||
|
+ sig != TARGET_SIGWINCH &&
|
||||||
|
+ sig != TARGET_SIGCONT) {
|
||||||
|
force_sig(sig);
|
||||||
|
} else {
|
||||||
|
return 0; /* indicate ignored */
|
100
qemu-0.7.1-syscalls.patch
Normal file
100
qemu-0.7.1-syscalls.patch
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
--- linux-user/arm/syscall_nr.h
|
||||||
|
+++ linux-user/arm/syscall_nr.h
|
||||||
|
@@ -259,4 +259,5 @@
|
||||||
|
/* 254 for set_thread_area */
|
||||||
|
/* 255 for get_thread_area */
|
||||||
|
/* 256 for set_tid_address */
|
||||||
|
+#define TARGET_NR_clock_gettime (263)
|
||||||
|
#define TARGET_NR_utimes (269)
|
||||||
|
--- linux-user/syscall.c
|
||||||
|
+++ linux-user/syscall.c
|
||||||
|
@@ -138,6 +138,7 @@
|
||||||
|
#define __NR_sys_getdents __NR_getdents
|
||||||
|
#define __NR_sys_getdents64 __NR_getdents64
|
||||||
|
#define __NR_sys_rt_sigqueueinfo __NR_rt_sigqueueinfo
|
||||||
|
+#define __NR_sys_syslog __NR_syslog
|
||||||
|
|
||||||
|
#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__)
|
||||||
|
#define __NR__llseek __NR_lseek
|
||||||
|
@@ -157,6 +158,7 @@
|
||||||
|
_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
|
||||||
|
loff_t *, res, uint, wh);
|
||||||
|
_syscall3(int,sys_rt_sigqueueinfo,int,pid,int,sig,siginfo_t *,uinfo)
|
||||||
|
+_syscall3(int,sys_syslog,int,type,char*,bufp,int,len)
|
||||||
|
#ifdef __NR_exit_group
|
||||||
|
_syscall1(int,exit_group,int,error_code)
|
||||||
|
#endif
|
||||||
|
@@ -170,6 +172,7 @@
|
||||||
|
extern int setresgid(gid_t, gid_t, gid_t);
|
||||||
|
extern int getresgid(gid_t *, gid_t *, gid_t *);
|
||||||
|
extern int setgroups(int, gid_t *);
|
||||||
|
+extern int uselib(const char*);
|
||||||
|
|
||||||
|
static inline long get_errno(long ret)
|
||||||
|
{
|
||||||
|
@@ -2593,7 +2596,9 @@
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TARGET_NR_uselib:
|
||||||
|
- goto unimplemented;
|
||||||
|
+ ret = get_errno(uselib(path((const char*)arg1)));
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
case TARGET_NR_swapon:
|
||||||
|
p = lock_user_string(arg1);
|
||||||
|
ret = get_errno(swapon(p, arg2));
|
||||||
|
@@ -2833,7 +2838,9 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case TARGET_NR_syslog:
|
||||||
|
- goto unimplemented;
|
||||||
|
+ ret = get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3));
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
case TARGET_NR_setitimer:
|
||||||
|
{
|
||||||
|
struct itimerval value, ovalue, *pvalue;
|
||||||
|
@@ -3708,7 +3715,9 @@
|
||||||
|
goto unimplemented;
|
||||||
|
#ifdef TARGET_NR_mincore
|
||||||
|
case TARGET_NR_mincore:
|
||||||
|
- goto unimplemented;
|
||||||
|
+ page_unprotect_range((void*)arg3, ((size_t)arg2 + TARGET_PAGE_SIZE - 1) / TARGET_PAGE_SIZE);
|
||||||
|
+ ret = get_errno(mincore((void*)arg1, (size_t)arg2, (unsigned char*)arg3));
|
||||||
|
+ break;
|
||||||
|
#endif
|
||||||
|
#ifdef TARGET_NR_madvise
|
||||||
|
case TARGET_NR_madvise:
|
||||||
|
@@ -3799,7 +3808,8 @@
|
||||||
|
ret = get_errno(gettid());
|
||||||
|
break;
|
||||||
|
case TARGET_NR_readahead:
|
||||||
|
- goto unimplemented;
|
||||||
|
+ ret = get_errno(readahead((int)arg1, (off64_t)arg2, (size_t)arg3));
|
||||||
|
+ break;
|
||||||
|
#ifdef TARGET_NR_setxattr
|
||||||
|
case TARGET_NR_setxattr:
|
||||||
|
case TARGET_NR_lsetxattr:
|
||||||
|
@@ -3824,6 +3834,22 @@
|
||||||
|
case TARGET_NR_getdomainname:
|
||||||
|
goto unimplemented_nowarn;
|
||||||
|
#endif
|
||||||
|
+#ifdef TARGET_NR_clock_gettime
|
||||||
|
+ case TARGET_NR_clock_gettime:
|
||||||
|
+ {
|
||||||
|
+ struct target_timespec* ttp = (struct target_timespec*)arg2;
|
||||||
|
+ struct timespec htp;
|
||||||
|
+ if(ttp) {
|
||||||
|
+ htp.tv_sec = tswapl(ttp->tv_sec);
|
||||||
|
+ htp.tv_nsec = tswapl(ttp->tv_nsec);
|
||||||
|
+ ret = get_errno(clock_gettime((clockid_t)arg1, &htp));
|
||||||
|
+ ttp->tv_sec = tswapl(htp.tv_sec);
|
||||||
|
+ ttp->tv_nsec = tswapl(htp.tv_nsec);
|
||||||
|
+ } else
|
||||||
|
+ ret = get_errno(clock_gettime((clockid_t)arg1, NULL));
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
default:
|
||||||
|
unimplemented:
|
||||||
|
gemu_log("qemu: Unsupported syscall: %d\n", num);
|
35
qemu-0.7.1.patch
Normal file
35
qemu-0.7.1.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Index: Makefile.target
|
||||||
|
================================================================================
|
||||||
|
--- Makefile.target
|
||||||
|
+++ Makefile.target
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
VPATH+=:$(SRC_PATH)/linux-user
|
||||||
|
DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
|
||||||
|
endif
|
||||||
|
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
|
||||||
|
+CFLAGS += -Wall -g -fno-strict-aliasing
|
||||||
|
#CFLAGS+=-Werror
|
||||||
|
LDFLAGS=-g
|
||||||
|
LIBS=
|
||||||
|
@@ -150,8 +150,8 @@
|
||||||
|
|
||||||
|
#########################################################
|
||||||
|
|
||||||
|
-DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
||||||
|
-LIBS+=-lm
|
||||||
|
+DEFINES+=-D_GNU_SOURCE -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
||||||
|
+LIBS+=-lm -lrt
|
||||||
|
ifndef CONFIG_USER_ONLY
|
||||||
|
LIBS+=-lz
|
||||||
|
endif
|
||||||
|
--- linux-user/signal.c
|
||||||
|
+++ linux-user/signal.c
|
||||||
|
@@ -389,6 +394,8 @@
|
||||||
|
{
|
||||||
|
int sig;
|
||||||
|
target_siginfo_t tinfo;
|
||||||
|
+
|
||||||
|
+ //printf("host_signal_handler, signum %d\n",host_signum);
|
||||||
|
|
||||||
|
/* the CPU emulator uses some host signals to detect exceptions,
|
||||||
|
we we forward to it some signals */
|
117
qemu-0.7.2-kqemu.patch
Normal file
117
qemu-0.7.2-kqemu.patch
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
--- kqemu/kqemu.h
|
||||||
|
+++ kqemu/kqemu.h
|
||||||
|
@@ -0,0 +1,114 @@
|
||||||
|
+/*
|
||||||
|
+ * KQEMU header
|
||||||
|
+ *
|
||||||
|
+ * Copyright (c) 2004-2005 Fabrice Bellard
|
||||||
|
+ *
|
||||||
|
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
+ * of this software and associated documentation files (the "Software"), to deal
|
||||||
|
+ * in the Software without restriction, including without limitation the rights
|
||||||
|
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
+ * copies of the Software, and to permit persons to whom the Software is
|
||||||
|
+ * furnished to do so, subject to the following conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be included in
|
||||||
|
+ * all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
+ * THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+#ifndef KQEMU_H
|
||||||
|
+#define KQEMU_H
|
||||||
|
+
|
||||||
|
+#define KQEMU_VERSION 0x010200
|
||||||
|
+
|
||||||
|
+struct kqemu_segment_cache {
|
||||||
|
+ uint32_t selector;
|
||||||
|
+ unsigned long base;
|
||||||
|
+ uint32_t limit;
|
||||||
|
+ uint32_t flags;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct kqemu_cpu_state {
|
||||||
|
+#ifdef __x86_64__
|
||||||
|
+ unsigned long regs[16];
|
||||||
|
+#else
|
||||||
|
+ unsigned long regs[8];
|
||||||
|
+#endif
|
||||||
|
+ unsigned long eip;
|
||||||
|
+ unsigned long eflags;
|
||||||
|
+
|
||||||
|
+ uint32_t dummy0, dummy1, dumm2, dummy3, dummy4;
|
||||||
|
+
|
||||||
|
+ struct kqemu_segment_cache segs[6]; /* selector values */
|
||||||
|
+ struct kqemu_segment_cache ldt;
|
||||||
|
+ struct kqemu_segment_cache tr;
|
||||||
|
+ struct kqemu_segment_cache gdt; /* only base and limit are used */
|
||||||
|
+ struct kqemu_segment_cache idt; /* only base and limit are used */
|
||||||
|
+
|
||||||
|
+ unsigned long cr0;
|
||||||
|
+ unsigned long dummy5;
|
||||||
|
+ unsigned long cr2;
|
||||||
|
+ unsigned long cr3;
|
||||||
|
+ unsigned long cr4;
|
||||||
|
+ uint32_t a20_mask;
|
||||||
|
+
|
||||||
|
+ uint64_t efer __attribute__((aligned(8)));
|
||||||
|
+
|
||||||
|
+ unsigned long dr0;
|
||||||
|
+ unsigned long dr1;
|
||||||
|
+ unsigned long dr2;
|
||||||
|
+ unsigned long dr3;
|
||||||
|
+ unsigned long dr6;
|
||||||
|
+ unsigned long dr7;
|
||||||
|
+
|
||||||
|
+ uint8_t cpl;
|
||||||
|
+ uint8_t user_only;
|
||||||
|
+
|
||||||
|
+ uint32_t error_code; /* error_code when exiting with an exception */
|
||||||
|
+ unsigned long next_eip; /* next eip value when exiting with an interrupt */
|
||||||
|
+ unsigned int nb_pages_to_flush; /* number of pages to flush,
|
||||||
|
+ KQEMU_FLUSH_ALL means full flush */
|
||||||
|
+#define KQEMU_MAX_PAGES_TO_FLUSH 512
|
||||||
|
+#define KQEMU_FLUSH_ALL (KQEMU_MAX_PAGES_TO_FLUSH + 1)
|
||||||
|
+
|
||||||
|
+ long retval;
|
||||||
|
+
|
||||||
|
+ /* number of ram_dirty entries to update */
|
||||||
|
+ unsigned int nb_ram_pages_to_update;
|
||||||
|
+#define KQEMU_MAX_RAM_PAGES_TO_UPDATE 512
|
||||||
|
+#define KQEMU_RAM_PAGES_UPDATE_ALL (KQEMU_MAX_RAM_PAGES_TO_UPDATE + 1)
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct kqemu_init {
|
||||||
|
+ uint8_t *ram_base; /* must be page aligned */
|
||||||
|
+ unsigned long ram_size; /* must be multiple of 4 KB */
|
||||||
|
+ uint8_t *ram_dirty; /* must be page aligned */
|
||||||
|
+ uint32_t **phys_to_ram_map; /* must be page aligned */
|
||||||
|
+ unsigned long *pages_to_flush; /* must be page aligned */
|
||||||
|
+ unsigned long *ram_pages_to_update; /* must be page aligned */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+#define KQEMU_RET_ABORT (-1)
|
||||||
|
+#define KQEMU_RET_EXCEPTION 0x0000 /* 8 low order bit are the exception */
|
||||||
|
+#define KQEMU_RET_INT 0x0100 /* 8 low order bit are the interrupt */
|
||||||
|
+#define KQEMU_RET_SOFTMMU 0x0200 /* emulation needed (I/O or
|
||||||
|
+ unsupported INSN) */
|
||||||
|
+#define KQEMU_RET_INTR 0x0201 /* interrupted by a signal */
|
||||||
|
+#define KQEMU_RET_SYSCALL 0x0300 /* syscall insn */
|
||||||
|
+
|
||||||
|
+#ifdef _WIN32
|
||||||
|
+#define KQEMU_EXEC CTL_CODE(FILE_DEVICE_UNKNOWN, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||||
|
+#define KQEMU_INIT CTL_CODE(FILE_DEVICE_UNKNOWN, 2, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||||
|
+#define KQEMU_GET_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, 3, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||||
|
+#else
|
||||||
|
+#define KQEMU_EXEC _IOWR('q', 1, struct kqemu_cpu_state)
|
||||||
|
+#define KQEMU_INIT _IOW('q', 2, struct kqemu_init)
|
||||||
|
+#define KQEMU_GET_VERSION _IOR('q', 3, int)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#endif /* KQEMU_H */
|
141
qemu-0.8.2-char-signedness.patch
Normal file
141
qemu-0.8.2-char-signedness.patch
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
--- fpu/softfloat-native.c
|
||||||
|
+++ fpu/softfloat-native.c
|
||||||
|
@@ -149,7 +149,7 @@
|
||||||
|
{
|
||||||
|
return sqrtf(a);
|
||||||
|
}
|
||||||
|
-char float32_compare( float32 a, float32 b STATUS_PARAM )
|
||||||
|
+signed char float32_compare( float32 a, float32 b STATUS_PARAM )
|
||||||
|
{
|
||||||
|
if (a < b) {
|
||||||
|
return -1;
|
||||||
|
@@ -161,7 +161,7 @@
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-char float32_compare_quiet( float32 a, float32 b STATUS_PARAM )
|
||||||
|
+signed char float32_compare_quiet( float32 a, float32 b STATUS_PARAM )
|
||||||
|
{
|
||||||
|
if (isless(a, b)) {
|
||||||
|
return -1;
|
||||||
|
@@ -253,7 +253,7 @@
|
||||||
|
{
|
||||||
|
return sqrt(a);
|
||||||
|
}
|
||||||
|
-char float64_compare( float64 a, float64 b STATUS_PARAM )
|
||||||
|
+signed char float64_compare( float64 a, float64 b STATUS_PARAM )
|
||||||
|
{
|
||||||
|
if (a < b) {
|
||||||
|
return -1;
|
||||||
|
@@ -265,7 +265,7 @@
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-char float64_compare_quiet( float64 a, float64 b STATUS_PARAM )
|
||||||
|
+signed char float64_compare_quiet( float64 a, float64 b STATUS_PARAM )
|
||||||
|
{
|
||||||
|
if (isless(a, b)) {
|
||||||
|
return -1;
|
||||||
|
@@ -334,7 +334,7 @@
|
||||||
|
{
|
||||||
|
return sqrtl(a);
|
||||||
|
}
|
||||||
|
-char floatx80_compare( floatx80 a, floatx80 b STATUS_PARAM )
|
||||||
|
+signed char floatx80_compare( floatx80 a, floatx80 b STATUS_PARAM )
|
||||||
|
{
|
||||||
|
if (a < b) {
|
||||||
|
return -1;
|
||||||
|
@@ -346,7 +346,7 @@
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-char floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM )
|
||||||
|
+signed char floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM )
|
||||||
|
{
|
||||||
|
if (isless(a, b)) {
|
||||||
|
return -1;
|
||||||
|
--- fpu/softfloat-native.h
|
||||||
|
+++ fpu/softfloat-native.h
|
||||||
|
@@ -181,8 +181,8 @@
|
||||||
|
return isunordered(a, b);
|
||||||
|
|
||||||
|
}
|
||||||
|
-char float32_compare( float32, float32 STATUS_PARAM );
|
||||||
|
-char float32_compare_quiet( float32, float32 STATUS_PARAM );
|
||||||
|
+signed char float32_compare( float32, float32 STATUS_PARAM );
|
||||||
|
+signed char float32_compare_quiet( float32, float32 STATUS_PARAM );
|
||||||
|
char float32_is_signaling_nan( float32 );
|
||||||
|
|
||||||
|
INLINE float32 float32_abs(float32 a)
|
||||||
|
@@ -262,8 +262,8 @@
|
||||||
|
return isunordered(a, b);
|
||||||
|
|
||||||
|
}
|
||||||
|
-char float64_compare( float64, float64 STATUS_PARAM );
|
||||||
|
-char float64_compare_quiet( float64, float64 STATUS_PARAM );
|
||||||
|
+signed char float64_compare( float64, float64 STATUS_PARAM );
|
||||||
|
+signed char float64_compare_quiet( float64, float64 STATUS_PARAM );
|
||||||
|
char float64_is_signaling_nan( float64 );
|
||||||
|
|
||||||
|
INLINE float64 float64_abs(float64 a)
|
||||||
|
@@ -343,8 +343,8 @@
|
||||||
|
return isunordered(a, b);
|
||||||
|
|
||||||
|
}
|
||||||
|
-char floatx80_compare( floatx80, floatx80 STATUS_PARAM );
|
||||||
|
-char floatx80_compare_quiet( floatx80, floatx80 STATUS_PARAM );
|
||||||
|
+signed char floatx80_compare( floatx80, floatx80 STATUS_PARAM );
|
||||||
|
+signed char floatx80_compare_quiet( floatx80, floatx80 STATUS_PARAM );
|
||||||
|
char floatx80_is_signaling_nan( floatx80 );
|
||||||
|
|
||||||
|
INLINE floatx80 floatx80_abs(floatx80 a)
|
||||||
|
--- fpu/softfloat.c
|
||||||
|
+++ fpu/softfloat.c
|
||||||
|
@@ -5272,7 +5272,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
#define COMPARE(s, nan_exp) \
|
||||||
|
-INLINE char float ## s ## _compare_internal( float ## s a, float ## s b, \
|
||||||
|
+INLINE signed char float ## s ## _compare_internal( float ## s a, float ## s b, \
|
||||||
|
int is_quiet STATUS_PARAM ) \
|
||||||
|
{ \
|
||||||
|
flag aSign, bSign; \
|
||||||
|
@@ -5306,12 +5306,12 @@
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
-char float ## s ## _compare( float ## s a, float ## s b STATUS_PARAM ) \
|
||||||
|
+signed char float ## s ## _compare( float ## s a, float ## s b STATUS_PARAM ) \
|
||||||
|
{ \
|
||||||
|
return float ## s ## _compare_internal(a, b, 0 STATUS_VAR); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
-char float ## s ## _compare_quiet( float ## s a, float ## s b STATUS_PARAM ) \
|
||||||
|
+signed char float ## s ## _compare_quiet( float ## s a, float ## s b STATUS_PARAM ) \
|
||||||
|
{ \
|
||||||
|
return float ## s ## _compare_internal(a, b, 1 STATUS_VAR); \
|
||||||
|
}
|
||||||
|
--- fpu/softfloat.h
|
||||||
|
+++ fpu/softfloat.h
|
||||||
|
@@ -234,8 +234,8 @@
|
||||||
|
char float32_eq_signaling( float32, float32 STATUS_PARAM );
|
||||||
|
char float32_le_quiet( float32, float32 STATUS_PARAM );
|
||||||
|
char float32_lt_quiet( float32, float32 STATUS_PARAM );
|
||||||
|
-char float32_compare( float32, float32 STATUS_PARAM );
|
||||||
|
-char float32_compare_quiet( float32, float32 STATUS_PARAM );
|
||||||
|
+signed char float32_compare( float32, float32 STATUS_PARAM );
|
||||||
|
+signed char float32_compare_quiet( float32, float32 STATUS_PARAM );
|
||||||
|
char float32_is_signaling_nan( float32 );
|
||||||
|
|
||||||
|
INLINE float32 float32_abs(float32 a)
|
||||||
|
@@ -281,8 +281,8 @@
|
||||||
|
char float64_eq_signaling( float64, float64 STATUS_PARAM );
|
||||||
|
char float64_le_quiet( float64, float64 STATUS_PARAM );
|
||||||
|
char float64_lt_quiet( float64, float64 STATUS_PARAM );
|
||||||
|
-char float64_compare( float64, float64 STATUS_PARAM );
|
||||||
|
-char float64_compare_quiet( float64, float64 STATUS_PARAM );
|
||||||
|
+signed char float64_compare( float64, float64 STATUS_PARAM );
|
||||||
|
+signed char float64_compare_quiet( float64, float64 STATUS_PARAM );
|
||||||
|
char float64_is_signaling_nan( float64 );
|
||||||
|
|
||||||
|
INLINE float64 float64_abs(float64 a)
|
17
qemu-0.8.2-sparconppc.patch
Normal file
17
qemu-0.8.2-sparconppc.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
--- target-sparc/op_helper.c
|
||||||
|
+++ target-sparc/op_helper.c
|
||||||
|
@@ -12,12 +12,12 @@
|
||||||
|
#ifdef USE_INT_TO_FLOAT_HELPERS
|
||||||
|
void do_fitos(void)
|
||||||
|
{
|
||||||
|
- FT0 = int32_to_float32(*((int32_t *)&FT1));
|
||||||
|
+ FT0 = int32_to_float32(*((int32_t *)&FT1), &env->fp_status);
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_fitod(void)
|
||||||
|
{
|
||||||
|
- DT0 = int32_to_float64(*((int32_t *)&FT1));
|
||||||
|
+ DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
3
qemu-0.8.2.tar.bz2
Normal file
3
qemu-0.8.2.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3b1b28006bcd95412904fe9b09dcdc7d3fb3eb17d071f249229eb04c4938930b
|
||||||
|
size 1567414
|
178
qemu.changes
Normal file
178
qemu.changes
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 27 18:48:53 CEST 2006 - schwab@suse.de
|
||||||
|
|
||||||
|
- Fix char signedness.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 11 16:56:15 CEST 2006 - uli@suse.de
|
||||||
|
|
||||||
|
- re-added ARM FPE patch
|
||||||
|
- fixed SPARC on PPC
|
||||||
|
- install missing openbios-sparc32
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Sep 9 02:52:53 CEST 2006 - dmueller@suse.de
|
||||||
|
|
||||||
|
- update to 0.8.2:
|
||||||
|
- ACPI support
|
||||||
|
- PC VGA BIOS fixes
|
||||||
|
- MIPS FPU support (Marius Groeger)
|
||||||
|
- PPC breakpoints and single stepping (Jason Wessel)
|
||||||
|
- USB updates (Paul Brook)
|
||||||
|
- UDP/TCP/telnet character devices (Jason Wessel)
|
||||||
|
- Windows sparse file support (Frediano Ziglio)
|
||||||
|
- RTL8139 NIC TCP segmentation offloading (Igor Kovalenko)
|
||||||
|
- PCNET NIC support (Antony T Curtis)
|
||||||
|
- Support for variable frequency host CPUs
|
||||||
|
- Workaround for win32 SMP hosts
|
||||||
|
- Support for AMD Flash memories (Jocelyn Mayer)
|
||||||
|
- Audio capture to WAV files support (malc)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 30 11:57:16 CEST 2006 - uli@suse.de
|
||||||
|
|
||||||
|
- fixed to build on PPC with new glibc
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 29 13:39:30 CEST 2006 - uli@suse.de
|
||||||
|
|
||||||
|
- fixed to build with new kernel headers
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 8 18:14:04 CET 2006 - uli@suse.de
|
||||||
|
|
||||||
|
- split giant patch
|
||||||
|
- added NWFPE glue code fix
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 7 22:31:12 CET 2006 - schwab@suse.de
|
||||||
|
|
||||||
|
- More fixes for ia64 port.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 6 23:54:26 CET 2006 - schwab@suse.de
|
||||||
|
|
||||||
|
- Remove obsolete hunk from ia64 patch.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 25 21:40:58 CET 2006 - mls@suse.de
|
||||||
|
|
||||||
|
- converted neededforbuild to BuildRequires
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 20 13:14:34 CET 2005 - uli@suse.de
|
||||||
|
|
||||||
|
- update -> 0.8.0
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 8 14:47:53 CET 2005 - uli@suse.de
|
||||||
|
|
||||||
|
- update to current CVS (MIPS userspace, ARM system, SMP, USB,
|
||||||
|
NX, VLAN, serial, parallel, ES1370, ALSA backend)
|
||||||
|
- build i386 and AMD64 emus with kqemu support if possible
|
||||||
|
- install missing PPC video driver, SPARC boot ROM
|
||||||
|
- install missing keymaps
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 7 15:41:57 CET 2005 - uli@suse.de
|
||||||
|
|
||||||
|
- updated linker scripts for new binutils release
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Sep 17 18:42:42 CEST 2005 - dmueller@suse.de
|
||||||
|
|
||||||
|
- update to 0.7.2
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 15 23:11:50 CEST 2005 - schwab@suse.de
|
||||||
|
|
||||||
|
- Don't package /emul/ia32-linux on ia64.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 15 16:27:02 CEST 2005 - schwab@suse.de
|
||||||
|
|
||||||
|
- Fix compilation on ia64.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 1 15:28:42 CEST 2005 - uli@suse.de
|
||||||
|
|
||||||
|
- update -> 0.7.1
|
||||||
|
- enabled x86_64-system
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 11 16:29:52 CEST 2005 - uli@suse.de
|
||||||
|
|
||||||
|
- update -> CVS (MIPS emulation)
|
||||||
|
- build with throwaway GCC3 (still no GCC4-compatible QEMU in
|
||||||
|
sight)
|
||||||
|
- enabled armeb-user
|
||||||
|
- link *-user statically (necessary for chrooting into non-native
|
||||||
|
systems)
|
||||||
|
- disabled s390, alpha, armv4l build (broken and unmaintained)
|
||||||
|
- disabled qemu-fast (broken and deprecated)
|
||||||
|
- disabled i386-user on x86_64 (useless)
|
||||||
|
- build with %jobs
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 1 02:24:11 CEST 2005 - ro@suse.de
|
||||||
|
|
||||||
|
- update to 0.7.0, still no success with gcc-4
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 14:00:04 CET 2005 - uli@suse.de
|
||||||
|
|
||||||
|
- baselibs-x86 link is unnecessary on x86/AMD64
|
||||||
|
- two ARM emulation fixes (RRX operand fix by Paul Brook, shifter
|
||||||
|
carry fix by me)
|
||||||
|
- SDL 1.2.8 can be linked statically -> enabled qemu-fast
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 29 14:55:36 CET 2004 - uli@suse.de
|
||||||
|
|
||||||
|
- update -> 0.6.1
|
||||||
|
- build softmmu binaries on s390 (still doesn't work though)
|
||||||
|
- pack /emul/ia32-linux directory and symlink from /usr/share/qemu
|
||||||
|
so it's possible to use the IA64 baselibs-x86 packages
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 15 11:19:49 CEST 2004 - uli@suse.de
|
||||||
|
|
||||||
|
- removed unnecessary dependency on private glibc symbol
|
||||||
|
(bug #44864)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 6 16:52:36 CEST 2004 - uli@suse.de
|
||||||
|
|
||||||
|
- update -> 0.6.0 (fixes for several OSs, improvements in emulated
|
||||||
|
hardware (IDE, PCI, network, VGA, APM, PowerMac), minor fixes,
|
||||||
|
tool for conversion of VMware images)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 11 16:18:25 CEST 2004 - uli@suse.de
|
||||||
|
|
||||||
|
- update -> 0.5.5 (contains ARM, utime() fixes and several others)
|
||||||
|
- make uname() return target machine name (fixes config.guess,
|
||||||
|
rpm etc.)
|
||||||
|
- fake sigaltstack() (fixes m4)
|
||||||
|
- enabled x86-64
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 5 15:29:24 CEST 2004 - uli@suse.de
|
||||||
|
|
||||||
|
- fixed ARM emulation bug
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 28 16:39:31 CEST 2004 - uli@suse.de
|
||||||
|
|
||||||
|
- build with -fno-unit-at-a-time (fixes PPC system emulator)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 28 10:14:17 CEST 2004 - uli@suse.de
|
||||||
|
|
||||||
|
- update -> 0.5.4 (runs Linux/PPC, several fixes)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 19 16:17:00 CEST 2004 - uli@suse.de
|
||||||
|
|
||||||
|
- initial package
|
||||||
|
|
360
qemu.spec
Normal file
360
qemu.spec
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
#
|
||||||
|
# spec file for package qemu (Version 0.8.2)
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
# This file and all modifications and additions to the pristine
|
||||||
|
# package are under the same license as the package itself.
|
||||||
|
#
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
# norootforbuild
|
||||||
|
|
||||||
|
Name: qemu
|
||||||
|
BuildRequires: SDL-devel
|
||||||
|
URL: http://fabrice.bellard.free.fr/qemu/
|
||||||
|
License: BSD License and BSD-like, GNU General Public License (GPL) - all versions
|
||||||
|
Group: System/Emulators/Other
|
||||||
|
Summary: Universal CPU emulator
|
||||||
|
Version: 0.8.2
|
||||||
|
Release: 13
|
||||||
|
Source: %name-%version.tar.bz2
|
||||||
|
Patch1: qemu-0.7.0-binfmt.patch
|
||||||
|
Patch5: qemu-0.7.0-sigaltstackhack.patch
|
||||||
|
Patch6: qemu-0.7.0-amd64.patch
|
||||||
|
Patch8: qemu-0.7.1.patch
|
||||||
|
Patch10: linkerscripts.patch
|
||||||
|
Patch11: qemu-0.7.2-kqemu.patch
|
||||||
|
Patch14: qemu-0.7.1-jobsignals.patch
|
||||||
|
Patch15: qemu-0.7.1-syscalls.patch
|
||||||
|
Patch16: qemu-0.7.1-armfpaex.patch
|
||||||
|
Patch17: qemu-0.8.2-sparconppc.patch
|
||||||
|
Patch18: qemu-0.8.2-char-signedness.patch
|
||||||
|
# GCC 3 sources/patches
|
||||||
|
Source601: gcc-3.3.5.tar.bz2
|
||||||
|
Patch600: gcc-gcc-3.3.5-hammer.patch.bz2
|
||||||
|
Patch601: gcc-gcc-noalias-warn.diff
|
||||||
|
Patch602: gcc-configure.patch
|
||||||
|
Patch603: gcc-head-tail.patch
|
||||||
|
Patch604: gcc-bug-reporting.patch
|
||||||
|
Patch605: gcc-libgc.patch
|
||||||
|
Patch606: gcc-ia64intrin.patch
|
||||||
|
Patch607: gcc-ffi.patch
|
||||||
|
Patch608: gcc-fworking-directory.patch
|
||||||
|
Patch610: gcc-altivec.diff
|
||||||
|
Patch611: gcc-compact-dwarf2.patch
|
||||||
|
Patch616: gcc-c99-double-inline.diff
|
||||||
|
Patch617: gcc-c99numbers.diff
|
||||||
|
Patch621: gcc-gcse-volatile.patch
|
||||||
|
Patch622: gcc-swig-alias.patch
|
||||||
|
Patch632: gcc-aliasing.diff
|
||||||
|
Patch633: gcc-aliasing12.diff
|
||||||
|
Patch634: gcc-aliasing3.diff
|
||||||
|
Patch637: gcc-cse-mem-expr.patch
|
||||||
|
Patch642: gcc-emit-note.patch
|
||||||
|
Patch643: gcc-unwind-ia64.patch
|
||||||
|
Patch644: gcc-hppa.patch
|
||||||
|
Patch645: gcc-suse46595.diff
|
||||||
|
Patch646: gcc-stl-multiple-defs.diff
|
||||||
|
# Ada patches
|
||||||
|
Patch653: gcc-gcc32-ada-link.patch
|
||||||
|
Patch654: gcc-gcc32-ada-addr2line.patch
|
||||||
|
# c++ patches
|
||||||
|
# PPC specific
|
||||||
|
Patch661: gcc-gcc-3.3-ppc64.patch
|
||||||
|
# Do not merge this patch into the Alan M patch, it will just get lost later.
|
||||||
|
# If you think it is useless, try building "fam" and watch libtool break.
|
||||||
|
Patch663: gcc-ppc-nostartfileprefix.patch
|
||||||
|
Patch664: gcc-ppc-nof.patch
|
||||||
|
Patch700: gcc-abuildappease.patch
|
||||||
|
Patch701: gcc-3.3.5.dif
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
ExclusiveArch: %ix86 ppc sparc x86_64 ia64
|
||||||
|
|
||||||
|
%description
|
||||||
|
QEMU is an extremely well-performing CPU emulator that allows you to
|
||||||
|
choose between simulating an entire system and running userspace
|
||||||
|
binaries for different architectures under your native operating
|
||||||
|
system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
|
||||||
|
as PC and PowerMac systems.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Fabrice Bellard <fabrice.bellard@free.fr>
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -a601
|
||||||
|
%patch1
|
||||||
|
%patch5
|
||||||
|
%patch6
|
||||||
|
%patch8
|
||||||
|
%patch10
|
||||||
|
%patch11
|
||||||
|
%patch14
|
||||||
|
%patch15
|
||||||
|
%patch16
|
||||||
|
%patch17
|
||||||
|
%patch18
|
||||||
|
cd gcc-3.3.5
|
||||||
|
%patch600
|
||||||
|
%patch601
|
||||||
|
%patch602
|
||||||
|
%patch603
|
||||||
|
%patch604
|
||||||
|
%patch605
|
||||||
|
%patch606
|
||||||
|
%patch607
|
||||||
|
%patch608 -p1
|
||||||
|
%patch610
|
||||||
|
%patch611
|
||||||
|
%patch616
|
||||||
|
%patch617
|
||||||
|
%patch621
|
||||||
|
%patch622
|
||||||
|
%patch632
|
||||||
|
%patch633
|
||||||
|
%patch634
|
||||||
|
%patch637
|
||||||
|
%patch642
|
||||||
|
%patch643
|
||||||
|
%patch644
|
||||||
|
%patch645
|
||||||
|
%patch646
|
||||||
|
%patch653
|
||||||
|
%patch654
|
||||||
|
#%ifarch ppc ppc64
|
||||||
|
%patch661 -p1
|
||||||
|
#%patch6063 -p1
|
||||||
|
#%endif
|
||||||
|
%patch700 -p1
|
||||||
|
%patch701
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
%build
|
||||||
|
QEMU_OPT_FLAGS="$RPM_OPT_FLAGS"
|
||||||
|
%define gcc33tmp /tmp/gcc33
|
||||||
|
%define qemucc %{gcc33tmp}/bin/gcc
|
||||||
|
%ifarch %ix86
|
||||||
|
QEMU_OPT_FLAGS="${RPM_OPT_FLAGS/-mtune=/-mcpu=}"
|
||||||
|
%endif
|
||||||
|
# build gcc 3.3
|
||||||
|
%define GCCDIST %{_target_cpu}-suse-linux
|
||||||
|
cd gcc-3.3.5
|
||||||
|
./configure --enable-threads=posix \
|
||||||
|
--prefix=%{gcc33tmp} --with-local-prefix=/usr/local \
|
||||||
|
--enable-languages=c \
|
||||||
|
--enable-shared --disable-biarch --disable-multilib \
|
||||||
|
%ifarch sparc
|
||||||
|
--with-cpu=v7 \
|
||||||
|
%endif
|
||||||
|
--host=%{GCCDIST}
|
||||||
|
make bootstrap-lean BOOT_CFLAGS="$QEMU_OPT_FLAGS" STAGE1_CFLAGS="$QEMU_OPT_FLAGS" CFLAGS="$QEMU_OPT_FLAGS" %{?jobs:-j%{jobs}}
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
# build QEMU
|
||||||
|
%ifarch x86_64
|
||||||
|
target_list_kqemu="x86_64-softmmu"
|
||||||
|
%else
|
||||||
|
target_list_kqemu="i386-softmmu"
|
||||||
|
%endif
|
||||||
|
target_list="ppc-softmmu sparc-softmmu mips-softmmu arm-softmmu"
|
||||||
|
%ifarch x86_64
|
||||||
|
target_list="$target_list i386-softmmu"
|
||||||
|
%else
|
||||||
|
%ifarch %ix86
|
||||||
|
target_list="$target_list x86_64-softmmu"
|
||||||
|
%else
|
||||||
|
target_list="$target_list i386-softmmu x86_64-softmmu"
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
target_list_user=""
|
||||||
|
%ifnarch %ix86 x86_64
|
||||||
|
target_list_user="$target_list_user i386-user"
|
||||||
|
%endif
|
||||||
|
%ifnarch armv4l
|
||||||
|
target_list_user="$target_list_user arm-user"
|
||||||
|
%endif
|
||||||
|
%ifnarch armv4b
|
||||||
|
target_list_user="$target_list_user armeb-user"
|
||||||
|
%endif
|
||||||
|
%ifnarch sparc sparc64
|
||||||
|
target_list_user="$target_list_user sparc-user"
|
||||||
|
%endif
|
||||||
|
%ifnarch ppc ppc64
|
||||||
|
target_list_user="$target_list_user ppc-user"
|
||||||
|
%endif
|
||||||
|
%ifnarch mips
|
||||||
|
target_list_user="$target_list_user mips-user"
|
||||||
|
%endif
|
||||||
|
%ifnarch mipsel
|
||||||
|
target_list_user="$target_list_user mipsel-user"
|
||||||
|
%endif
|
||||||
|
QEMU_OPT_FLAGS="$QEMU_OPT_FLAGS -fno-strict-aliasing"
|
||||||
|
mkdir -p dynamic
|
||||||
|
%ifarch %ix86 x86_64
|
||||||
|
# build i386/x86_64 system with kqemu support
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--interp-prefix=/usr/share/qemu/qemu-i386 \
|
||||||
|
--target-list="$target_list_kqemu" --cc=%qemucc \
|
||||||
|
--enable-adlib --extra-cflags="$QEMU_OPT_FLAGS"
|
||||||
|
echo '#define USE_KQEMU 1' >>config-host.h
|
||||||
|
make %{?jobs:-j%{jobs}}
|
||||||
|
mv */qemu */qemu-* dynamic || true
|
||||||
|
make clean
|
||||||
|
%endif
|
||||||
|
# build system emus without kqemu support
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--interp-prefix=/usr/share/qemu/qemu-i386 \
|
||||||
|
--target-list="$target_list" --cc=%qemucc \
|
||||||
|
--enable-adlib --extra-cflags="$QEMU_OPT_FLAGS"
|
||||||
|
make %{?jobs:-j%{jobs}}
|
||||||
|
mv */qemu *-*/qemu-* dynamic || true
|
||||||
|
make clean
|
||||||
|
# build userland emus
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--interp-prefix=/usr/share/qemu/qemu-i386 \
|
||||||
|
--target-list="$target_list_user" --cc=%qemucc \
|
||||||
|
--static --extra-cflags="$QEMU_OPT_FLAGS"
|
||||||
|
make %{?jobs:-j%{jobs}}
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/usr/bin
|
||||||
|
%ifnarch alpha
|
||||||
|
install -m 755 */qemu */qemu-* $RPM_BUILD_ROOT/usr/bin
|
||||||
|
ln -sf qemu $RPM_BUILD_ROOT/usr/bin/qemu-system-i386
|
||||||
|
%endif
|
||||||
|
install -m 755 */qemu-* $RPM_BUILD_ROOT/usr/bin
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/%{_mandir}/man1
|
||||||
|
install -m 644 qemu.1 $RPM_BUILD_ROOT/%{_mandir}/man1
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/usr/share/qemu
|
||||||
|
install -m 644 pc-bios/*.bin pc-bios/video.x pc-bios/openbios-sparc32 $RPM_BUILD_ROOT/usr/share/qemu
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/usr/sbin
|
||||||
|
install -m 755 qemu-binfmt-conf.sh $RPM_BUILD_ROOT/usr/sbin
|
||||||
|
install -m 755 qemu-img $RPM_BUILD_ROOT/usr/bin
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/usr/share/qemu/keymaps
|
||||||
|
install -m 644 keymaps/[a-z]* $RPM_BUILD_ROOT/usr/share/qemu/keymaps
|
||||||
|
%ifnarch %ix86 x86_64
|
||||||
|
ln -sf ../../../emul/ia32-linux $RPM_BUILD_ROOT/usr/share/qemu/qemu-i386
|
||||||
|
%endif
|
||||||
|
%ifnarch ia64
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/emul/ia32-linux
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
rm -rf %{gcc33tmp}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%doc COPYING COPYING.LIB Changelog README README.distrib TODO VERSION qemu-doc.html
|
||||||
|
%ifnarch alpha
|
||||||
|
/usr/bin/qemu
|
||||||
|
%endif
|
||||||
|
/usr/bin/qemu-*
|
||||||
|
/usr/sbin/qemu*
|
||||||
|
%{_mandir}/man1/qemu*.1.gz
|
||||||
|
/usr/share/qemu
|
||||||
|
%ifnarch %ix86 x86_64 ia64
|
||||||
|
%dir /emul/ia32-linux
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog -n qemu
|
||||||
|
* Fri Oct 27 2006 - schwab@suse.de
|
||||||
|
- Fix char signedness.
|
||||||
|
* Mon Sep 11 2006 - uli@suse.de
|
||||||
|
- re-added ARM FPE patch
|
||||||
|
- fixed SPARC on PPC
|
||||||
|
- install missing openbios-sparc32
|
||||||
|
* Sat Sep 09 2006 - dmueller@suse.de
|
||||||
|
- update to 0.8.2:
|
||||||
|
- ACPI support
|
||||||
|
- PC VGA BIOS fixes
|
||||||
|
- MIPS FPU support (Marius Groeger)
|
||||||
|
- PPC breakpoints and single stepping (Jason Wessel)
|
||||||
|
- USB updates (Paul Brook)
|
||||||
|
- UDP/TCP/telnet character devices (Jason Wessel)
|
||||||
|
- Windows sparse file support (Frediano Ziglio)
|
||||||
|
- RTL8139 NIC TCP segmentation offloading (Igor Kovalenko)
|
||||||
|
- PCNET NIC support (Antony T Curtis)
|
||||||
|
- Support for variable frequency host CPUs
|
||||||
|
- Workaround for win32 SMP hosts
|
||||||
|
- Support for AMD Flash memories (Jocelyn Mayer)
|
||||||
|
- Audio capture to WAV files support (malc)
|
||||||
|
* Tue May 30 2006 - uli@suse.de
|
||||||
|
- fixed to build on PPC with new glibc
|
||||||
|
* Mon May 29 2006 - uli@suse.de
|
||||||
|
- fixed to build with new kernel headers
|
||||||
|
* Wed Mar 08 2006 - uli@suse.de
|
||||||
|
- split giant patch
|
||||||
|
- added NWFPE glue code fix
|
||||||
|
* Tue Mar 07 2006 - schwab@suse.de
|
||||||
|
- More fixes for ia64 port.
|
||||||
|
* Mon Mar 06 2006 - schwab@suse.de
|
||||||
|
- Remove obsolete hunk from ia64 patch.
|
||||||
|
* Wed Jan 25 2006 - mls@suse.de
|
||||||
|
- converted neededforbuild to BuildRequires
|
||||||
|
* Tue Dec 20 2005 - uli@suse.de
|
||||||
|
- update -> 0.8.0
|
||||||
|
* Thu Dec 08 2005 - uli@suse.de
|
||||||
|
- update to current CVS (MIPS userspace, ARM system, SMP, USB,
|
||||||
|
NX, VLAN, serial, parallel, ES1370, ALSA backend)
|
||||||
|
- build i386 and AMD64 emus with kqemu support if possible
|
||||||
|
- install missing PPC video driver, SPARC boot ROM
|
||||||
|
- install missing keymaps
|
||||||
|
* Mon Nov 07 2005 - uli@suse.de
|
||||||
|
- updated linker scripts for new binutils release
|
||||||
|
* Sat Sep 17 2005 - dmueller@suse.de
|
||||||
|
- update to 0.7.2
|
||||||
|
* Mon Aug 15 2005 - schwab@suse.de
|
||||||
|
- Don't package /emul/ia32-linux on ia64.
|
||||||
|
* Mon Aug 15 2005 - schwab@suse.de
|
||||||
|
- Fix compilation on ia64.
|
||||||
|
* Mon Aug 01 2005 - uli@suse.de
|
||||||
|
- update -> 0.7.1
|
||||||
|
- enabled x86_64-system
|
||||||
|
* Mon Jul 11 2005 - uli@suse.de
|
||||||
|
- update -> CVS (MIPS emulation)
|
||||||
|
- build with throwaway GCC3 (still no GCC4-compatible QEMU in
|
||||||
|
sight)
|
||||||
|
- enabled armeb-user
|
||||||
|
- link *-user statically (necessary for chrooting into non-native
|
||||||
|
systems)
|
||||||
|
- disabled s390, alpha, armv4l build (broken and unmaintained)
|
||||||
|
- disabled qemu-fast (broken and deprecated)
|
||||||
|
- disabled i386-user on x86_64 (useless)
|
||||||
|
- build with %%jobs
|
||||||
|
* Wed Jun 01 2005 - ro@suse.de
|
||||||
|
- update to 0.7.0, still no success with gcc-4
|
||||||
|
* Thu Jan 27 2005 - uli@suse.de
|
||||||
|
- baselibs-x86 link is unnecessary on x86/AMD64
|
||||||
|
- two ARM emulation fixes (RRX operand fix by Paul Brook, shifter
|
||||||
|
carry fix by me)
|
||||||
|
- SDL 1.2.8 can be linked statically -> enabled qemu-fast
|
||||||
|
* Mon Nov 29 2004 - uli@suse.de
|
||||||
|
- update -> 0.6.1
|
||||||
|
- build softmmu binaries on s390 (still doesn't work though)
|
||||||
|
- pack /emul/ia32-linux directory and symlink from /usr/share/qemu
|
||||||
|
so it's possible to use the IA64 baselibs-x86 packages
|
||||||
|
* Wed Sep 15 2004 - uli@suse.de
|
||||||
|
- removed unnecessary dependency on private glibc symbol
|
||||||
|
(bug #44864)
|
||||||
|
* Fri Aug 06 2004 - uli@suse.de
|
||||||
|
- update -> 0.6.0 (fixes for several OSs, improvements in emulated
|
||||||
|
hardware (IDE, PCI, network, VGA, APM, PowerMac), minor fixes,
|
||||||
|
tool for conversion of VMware images)
|
||||||
|
* Tue May 11 2004 - uli@suse.de
|
||||||
|
- update -> 0.5.5 (contains ARM, utime() fixes and several others)
|
||||||
|
- make uname() return target machine name (fixes config.guess,
|
||||||
|
rpm etc.)
|
||||||
|
- fake sigaltstack() (fixes m4)
|
||||||
|
- enabled x86-64
|
||||||
|
* Wed May 05 2004 - uli@suse.de
|
||||||
|
- fixed ARM emulation bug
|
||||||
|
* Wed Apr 28 2004 - uli@suse.de
|
||||||
|
- build with -fno-unit-at-a-time (fixes PPC system emulator)
|
||||||
|
* Wed Apr 28 2004 - uli@suse.de
|
||||||
|
- update -> 0.5.4 (runs Linux/PPC, several fixes)
|
||||||
|
* Mon Apr 19 2004 - uli@suse.de
|
||||||
|
- initial package
|
Loading…
Reference in New Issue
Block a user