Rebuild for mingw32-gcc 4.4
This commit is contained in:
parent
eb48a5079c
commit
9a2ea4cd66
@ -1,2 +1,3 @@
|
||||
gcc-core-4.3.2.tar.bz2
|
||||
gcc-g++-4.3.2.tar.bz2
|
||||
fastjar-0.97.tar.gz
|
||||
gcc-4.4.0-20090216.tar.bz2
|
||||
cloog-ppl-0.15.tar.gz
|
||||
|
||||
56
README.libgcjwebplugin.so
Normal file
56
README.libgcjwebplugin.so
Normal file
@ -0,0 +1,56 @@
|
||||
gcjwebplugin is a Firefox plugin for running Java applets. It is now
|
||||
included in the libgcj sub-package, though it is not enabled by
|
||||
default.
|
||||
|
||||
GNU Classpath and libgcj's security implementation is under active
|
||||
development, but it is not ready to be declared secure. Specifically,
|
||||
it cannot run untrusted applets safely.
|
||||
|
||||
When gcjwebplugin is enabled, it prompts you with a dialog before
|
||||
loading an applet. The dialog tells you that a certain URL would like
|
||||
to load an applet, and asks if you trust the applet. Be aware though
|
||||
that this dialog is mostly informative and doesn't provide much
|
||||
protection:
|
||||
|
||||
- http and DNS can be spoofed meaning that the URL named in the
|
||||
warning dialog cannot be trusted
|
||||
|
||||
- someone could create a browser denial-of-service attack by creating a
|
||||
page with hundreds of applet tags, causing gcjwebplugin to create
|
||||
warning dialog after warning dialog. The browser would have to be
|
||||
closed to eliminate the latest dialog
|
||||
|
||||
- the whitelist is provided as a convenience, but it is unsafe because a
|
||||
domain may change hands from a trusted owner to an untrusted owner.
|
||||
If that domain is in the whitelist then the warning dialog will not
|
||||
appear when loading the new malicious applet.
|
||||
|
||||
CURRENTLY GCJWEBPLUGIN RUNS WITH NO SECURITY MANAGER. THIS MEANS THAT
|
||||
APPLETS CAN DO ANYTHING A JAVA APPLICATION THAT YOU DOWNLOAD AND RUN
|
||||
COULD DO. BE *VERY* CAREFUL WHICH APPLETS YOU RUN. DO NOT USE
|
||||
GCJWEBPLUGIN ON YOUR SYSTEM IF YOUR SYSTEM STORES IMPORTANT DATA.
|
||||
THIS DATA CAN BE DESTROYED OR STOLEN.
|
||||
|
||||
The same warning applies to gappletviewer, which also runs with no
|
||||
security manager (in fact, gcjwebplugin spawns gappletviewer to do the
|
||||
applet loading). When run on the command line, gappletviewer issues a
|
||||
warning on startup and asks you if you want to continue.
|
||||
|
||||
Even considering the risks involved, you may still want to try
|
||||
gcjwebplugin. GNU Classpath's AWT and Swing implementations are now
|
||||
sufficiently mature that they're able to run many applets deployed on
|
||||
the web. If you're interested in trying gcjwebplugin, you can do so
|
||||
by creating a symbolic link in ~/.mozilla/plugins like so:
|
||||
|
||||
ln -s /usr/lib/gcj-@VERSION@/libgcjwebplugin.so ~/.mozilla/plugins/
|
||||
|
||||
Type about:plugins in Firefox's URL bar to confirm that the plugin has
|
||||
been loaded. To see gcjwebplugin debugging output, run:
|
||||
|
||||
firefox -g
|
||||
|
||||
then at the GDB prompt, type
|
||||
|
||||
run
|
||||
|
||||
Please report bugs in Red Hat Bugzilla: http://bugzilla.redhat.com
|
||||
29
fastjar-0.97-segfault.patch
Normal file
29
fastjar-0.97-segfault.patch
Normal file
@ -0,0 +1,29 @@
|
||||
2009-01-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* jartool.c (make_manifest): Initialize current_time before
|
||||
calling unix2dostime on it.
|
||||
|
||||
--- fastjar-0.97/jartool.c.jj 2008-10-15 18:35:37.000000000 +0200
|
||||
+++ fastjar-0.97/jartool.c 2009-01-14 15:40:50.000000000 +0100
|
||||
@@ -820,6 +820,10 @@ int make_manifest(int jfd, const char *m
|
||||
int mod_time; /* file modification time */
|
||||
struct zipentry *ze;
|
||||
|
||||
+ current_time = time(NULL);
|
||||
+ if(current_time == (time_t)-1)
|
||||
+ exit_on_error("time");
|
||||
+
|
||||
mod_time = unix2dostime(¤t_time);
|
||||
|
||||
/* If we are creating a new manifest, create a META-INF directory entry */
|
||||
@@ -828,10 +832,6 @@ int make_manifest(int jfd, const char *m
|
||||
|
||||
memset((file_header + 12), '\0', 16); /*clear mod time, crc, size fields*/
|
||||
|
||||
- current_time = time(NULL);
|
||||
- if(current_time == (time_t)-1)
|
||||
- exit_on_error("time");
|
||||
-
|
||||
PACK_UB2(file_header, LOC_EXTRA, 0);
|
||||
PACK_UB2(file_header, LOC_COMP, 0);
|
||||
PACK_UB2(file_header, LOC_FNLEN, nlen);
|
||||
52
gcc44-build-id.patch
Normal file
52
gcc44-build-id.patch
Normal file
@ -0,0 +1,52 @@
|
||||
2007-07-22 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* config/rs6000/sysv4.h (LINK_EH_SPEC): Add --build-id for
|
||||
non-relocatable link.
|
||||
* config/linux.h (LINK_EH_SPEC): Likewise.
|
||||
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
|
||||
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
|
||||
|
||||
--- gcc/config/rs6000/sysv4.h.~1~
|
||||
+++ gcc/config/rs6000/sysv4.h
|
||||
@@ -906,7 +906,7 @@ extern int fixuplabelno;
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
|
||||
#endif
|
||||
|
||||
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
|
||||
--- gcc/config/linux.h.~1~
|
||||
+++ gcc/config/linux.h
|
||||
@@ -85,7 +85,7 @@ Boston, MA 02110-1301, USA. */
|
||||
} while (0)
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
|
||||
#endif
|
||||
|
||||
/* Define this so we can compile MS code for use with WINE. */
|
||||
--- gcc/config/alpha/elf.h.~1~
|
||||
+++ gcc/config/alpha/elf.h
|
||||
@@ -421,7 +421,7 @@ extern int alpha_this_gpdisp_sequence_nu
|
||||
I imagine that other systems will catch up. In the meantime, it
|
||||
doesn't harm to make sure that the data exists to be used later. */
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
|
||||
#endif
|
||||
|
||||
/* A C statement (sans semicolon) to output to the stdio stream STREAM
|
||||
--- gcc/config/ia64/linux.h.~1~
|
||||
+++ gcc/config/ia64/linux.h
|
||||
@@ -56,7 +56,7 @@ do { \
|
||||
Signalize that because we have fde-glibc, we don't need all C shared libs
|
||||
linked against -lgcc_s. */
|
||||
#undef LINK_EH_SPEC
|
||||
-#define LINK_EH_SPEC ""
|
||||
+#define LINK_EH_SPEC "%{!r:--build-id} "
|
||||
|
||||
#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
|
||||
|
||||
102
gcc44-c++-builtin-redecl.patch
Normal file
102
gcc44-c++-builtin-redecl.patch
Normal file
@ -0,0 +1,102 @@
|
||||
2007-10-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* decl.c (duplicate_decls): When redeclaring a builtin function,
|
||||
keep the merged decl builtin whenever types match, even if new
|
||||
decl defines a function.
|
||||
|
||||
* gcc.dg/builtins-65.c: New test.
|
||||
* g++.dg/ext/builtin10.C: New test.
|
||||
|
||||
--- gcc/cp/decl.c.jj 2007-10-01 22:11:09.000000000 +0200
|
||||
+++ gcc/cp/decl.c 2007-10-02 11:39:46.000000000 +0200
|
||||
@@ -1988,23 +1988,21 @@ duplicate_decls (tree newdecl, tree oldd
|
||||
DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
|
||||
DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
|
||||
}
|
||||
+ /* If redeclaring a builtin function, it stays built in. */
|
||||
+ if (types_match && DECL_BUILT_IN (olddecl))
|
||||
+ {
|
||||
+ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
|
||||
+ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
|
||||
+ /* If we're keeping the built-in definition, keep the rtl,
|
||||
+ regardless of declaration matches. */
|
||||
+ COPY_DECL_RTL (olddecl, newdecl);
|
||||
+ }
|
||||
if (new_defines_function)
|
||||
/* If defining a function declared with other language
|
||||
linkage, use the previously declared language linkage. */
|
||||
SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
|
||||
else if (types_match)
|
||||
{
|
||||
- /* If redeclaring a builtin function, and not a definition,
|
||||
- it stays built in. */
|
||||
- if (DECL_BUILT_IN (olddecl))
|
||||
- {
|
||||
- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
|
||||
- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
|
||||
- /* If we're keeping the built-in definition, keep the rtl,
|
||||
- regardless of declaration matches. */
|
||||
- COPY_DECL_RTL (olddecl, newdecl);
|
||||
- }
|
||||
-
|
||||
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
|
||||
/* Don't clear out the arguments if we're redefining a function. */
|
||||
if (DECL_ARGUMENTS (olddecl))
|
||||
--- gcc/testsuite/gcc.dg/builtins-65.c.jj 2007-10-02 11:23:51.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/builtins-65.c 2007-10-02 11:24:12.000000000 +0200
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+typedef __SIZE_TYPE__ size_t;
|
||||
+extern void __chk_fail (void);
|
||||
+extern int snprintf (char *, size_t, const char *, ...);
|
||||
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
|
||||
+{
|
||||
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
|
||||
+ __chk_fail ();
|
||||
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
|
||||
+}
|
||||
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
|
||||
+
|
||||
+char buf[10];
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ snprintf (buf, 10, "%d%d\n", 10, 10);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler "mysnprintf" } } */
|
||||
+/* { dg-final { scan-assembler-not "__chk_fail" } } */
|
||||
--- gcc/testsuite/g++.dg/ext/builtin10.C.jj 2007-10-02 11:19:45.000000000 +0200
|
||||
+++ gcc/testsuite/g++.dg/ext/builtin10.C 2007-10-02 11:23:26.000000000 +0200
|
||||
@@ -0,0 +1,27 @@
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2" }
|
||||
+
|
||||
+typedef __SIZE_TYPE__ size_t;
|
||||
+extern "C" {
|
||||
+extern void __chk_fail (void);
|
||||
+extern int snprintf (char *, size_t, const char *, ...);
|
||||
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
|
||||
+{
|
||||
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
|
||||
+ __chk_fail ();
|
||||
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
|
||||
+}
|
||||
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
|
||||
+}
|
||||
+
|
||||
+char buf[10];
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ snprintf (buf, 10, "%d%d\n", 10, 10);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+// { dg-final { scan-assembler "mysnprintf" } }
|
||||
+// { dg-final { scan-assembler-not "__chk_fail" } }
|
||||
211
gcc44-cloog-dl.patch
Normal file
211
gcc44-cloog-dl.patch
Normal file
@ -0,0 +1,211 @@
|
||||
2009-01-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* toplev.c (save_argv): No longer static.
|
||||
* Makefile.in (BACKENDLIBS): Link against -ldl instead of -lcloog -lppl.
|
||||
(graphite.o): Force -O, remove -fkeep-inline-functions.
|
||||
* graphite.c: Include <dlfcn.h>. Reference libcloog and libppl symbols
|
||||
through pointers in cloog_pointers variable.
|
||||
(init_cloog_pointers): New function.
|
||||
(gcc_type_for_iv_of_clast_loop): Rename stmt_for argument to stmt_fora.
|
||||
(graphite_transform_loops): Call init_cloog_pointers.
|
||||
|
||||
--- gcc/toplev.c.jj 2008-12-09 23:59:10.000000000 +0100
|
||||
+++ gcc/toplev.c 2009-01-27 14:33:52.000000000 +0100
|
||||
@@ -128,7 +128,7 @@ static bool no_backend;
|
||||
const char *progname;
|
||||
|
||||
/* Copy of argument vector to toplev_main. */
|
||||
-static const char **save_argv;
|
||||
+const char **save_argv;
|
||||
|
||||
/* Name of top-level original source file (what was input to cpp).
|
||||
This comes from the #-command at the beginning of the actual input.
|
||||
--- gcc/Makefile.in.jj 2009-01-26 20:50:38.000000000 +0100
|
||||
+++ gcc/Makefile.in 2009-01-27 14:18:10.000000000 +0100
|
||||
@@ -915,7 +915,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
|
||||
# How to link with both our special library facilities
|
||||
# and the system's installed libraries.
|
||||
LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER)
|
||||
-BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS)
|
||||
+BACKENDLIBS = $(GMPLIBS) $(if $(CLOOGLIBS),-ldl)
|
||||
# Any system libraries needed just for GNAT.
|
||||
SYSLIBS = @GNAT_LIBEXC@
|
||||
|
||||
@@ -3076,6 +3076,9 @@ $(out_object_file): $(out_file) $(CONFIG
|
||||
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
|
||||
$(out_file) $(OUTPUT_OPTION)
|
||||
|
||||
+graphite.o : \
|
||||
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
|
||||
+
|
||||
# Build auxiliary files that support ecoff format.
|
||||
mips-tfile: mips-tfile.o version.o $(LIBDEPS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
|
||||
--- gcc/graphite.c.jj 2009-01-24 19:59:02.000000000 +0100
|
||||
+++ gcc/graphite.c 2009-01-27 14:52:08.000000000 +0100
|
||||
@@ -59,6 +59,138 @@ along with GCC; see the file COPYING3.
|
||||
#include "cloog/cloog.h"
|
||||
#include "graphite.h"
|
||||
|
||||
+#include <dlfcn.h>
|
||||
+#define DYNSYMS \
|
||||
+ DYNSYM (cloog_block_alloc); \
|
||||
+ DYNSYM (cloog_block_list_free); \
|
||||
+ DYNSYM (cloog_block_list_malloc); \
|
||||
+ DYNSYM (cloog_clast_create); \
|
||||
+ DYNSYM (cloog_clast_free); \
|
||||
+ DYNSYM (cloog_domain_free); \
|
||||
+ DYNSYM (cloog_domain_matrix2domain); \
|
||||
+ DYNSYM (cloog_initialize); \
|
||||
+ DYNSYM (cloog_loop_malloc); \
|
||||
+ DYNSYM (cloog_matrix_alloc); \
|
||||
+ DYNSYM (cloog_matrix_copy); \
|
||||
+ DYNSYM (cloog_matrix_free); \
|
||||
+ DYNSYM (cloog_matrix_print); \
|
||||
+ DYNSYM (cloog_names_malloc); \
|
||||
+ DYNSYM (cloog_names_scalarize); \
|
||||
+ DYNSYM (cloog_options_free); \
|
||||
+ DYNSYM (cloog_options_malloc); \
|
||||
+ DYNSYM (cloog_program_dump_cloog); \
|
||||
+ DYNSYM (cloog_program_extract_scalars); \
|
||||
+ DYNSYM (cloog_program_free); \
|
||||
+ DYNSYM (cloog_program_generate); \
|
||||
+ DYNSYM (cloog_program_malloc); \
|
||||
+ DYNSYM (cloog_program_print); \
|
||||
+ DYNSYM (cloog_program_scatter); \
|
||||
+ DYNSYM (cloog_statement_alloc); \
|
||||
+ DYNSYM (ppl_finalize); \
|
||||
+ DYNSYM (pprint); \
|
||||
+ DYNSYM (stmt_block); \
|
||||
+ DYNSYM (stmt_for); \
|
||||
+ DYNSYM (stmt_guard); \
|
||||
+ DYNSYM (stmt_root); \
|
||||
+ DYNSYM (stmt_user);
|
||||
+static struct
|
||||
+{
|
||||
+ bool inited;
|
||||
+ void *h;
|
||||
+#define DYNSYM(x) __typeof (x) *p_##x
|
||||
+ DYNSYMS
|
||||
+#undef DYNSYM
|
||||
+} cloog_pointers;
|
||||
+
|
||||
+#define cloog_block_alloc (*cloog_pointers.p_cloog_block_alloc)
|
||||
+#define cloog_block_list_free (*cloog_pointers.p_cloog_block_list_free)
|
||||
+#define cloog_block_list_malloc (*cloog_pointers.p_cloog_block_list_malloc)
|
||||
+#define cloog_clast_create (*cloog_pointers.p_cloog_clast_create)
|
||||
+#define cloog_clast_free (*cloog_pointers.p_cloog_clast_free)
|
||||
+#define cloog_domain_free (*cloog_pointers.p_cloog_domain_free)
|
||||
+#define cloog_domain_matrix2domain (*cloog_pointers.p_cloog_domain_matrix2domain)
|
||||
+#define cloog_initialize (*cloog_pointers.p_cloog_initialize)
|
||||
+#define cloog_loop_malloc (*cloog_pointers.p_cloog_loop_malloc)
|
||||
+#define cloog_matrix_alloc (*cloog_pointers.p_cloog_matrix_alloc)
|
||||
+#define cloog_matrix_copy (*cloog_pointers.p_cloog_matrix_copy)
|
||||
+#define cloog_matrix_free (*cloog_pointers.p_cloog_matrix_free)
|
||||
+#define cloog_matrix_print (*cloog_pointers.p_cloog_matrix_print)
|
||||
+#define cloog_names_malloc (*cloog_pointers.p_cloog_names_malloc)
|
||||
+#define cloog_names_scalarize (*cloog_pointers.p_cloog_names_scalarize)
|
||||
+#define cloog_options_free (*cloog_pointers.p_cloog_options_free)
|
||||
+#define cloog_options_malloc (*cloog_pointers.p_cloog_options_malloc)
|
||||
+#define cloog_program_dump_cloog (*cloog_pointers.p_cloog_program_dump_cloog)
|
||||
+#define cloog_program_extract_scalars (*cloog_pointers.p_cloog_program_extract_scalars)
|
||||
+#define cloog_program_free (*cloog_pointers.p_cloog_program_free)
|
||||
+#define cloog_program_generate (*cloog_pointers.p_cloog_program_generate)
|
||||
+#define cloog_program_malloc (*cloog_pointers.p_cloog_program_malloc)
|
||||
+#define cloog_program_print (*cloog_pointers.p_cloog_program_print)
|
||||
+#define cloog_program_scatter (*cloog_pointers.p_cloog_program_scatter)
|
||||
+#define cloog_statement_alloc (*cloog_pointers.p_cloog_statement_alloc)
|
||||
+#define ppl_finalize (*cloog_pointers.p_ppl_finalize)
|
||||
+#define pprint (*cloog_pointers.p_pprint)
|
||||
+#define stmt_block (*cloog_pointers.p_stmt_block)
|
||||
+#define stmt_for (*cloog_pointers.p_stmt_for)
|
||||
+#define stmt_guard (*cloog_pointers.p_stmt_guard)
|
||||
+#define stmt_root (*cloog_pointers.p_stmt_root)
|
||||
+#define stmt_user (*cloog_pointers.p_stmt_user)
|
||||
+
|
||||
+#define cloog_finalize (*cloog_pointers.p_ppl_finalize)
|
||||
+
|
||||
+static bool
|
||||
+init_cloog_pointers (void)
|
||||
+{
|
||||
+ void *h = NULL;
|
||||
+ extern const char **save_argv;
|
||||
+ char *buf, *p;
|
||||
+ size_t len;
|
||||
+
|
||||
+ if (cloog_pointers.inited)
|
||||
+ return cloog_pointers.h != NULL;
|
||||
+ len = progname - save_argv[0];
|
||||
+ buf = XALLOCAVAR (char, len + sizeof "libcloog.so.0");
|
||||
+ memcpy (buf, save_argv[0], len);
|
||||
+ strcpy (buf + len, "libcloog.so.0");
|
||||
+ len += sizeof "libcloog.so.0";
|
||||
+ p = strstr (buf, "/libexec/");
|
||||
+ if (p != NULL)
|
||||
+ {
|
||||
+ while (1)
|
||||
+ {
|
||||
+ char *q = strstr (p + 8, "/libexec/");
|
||||
+ if (q == NULL)
|
||||
+ break;
|
||||
+ p = q;
|
||||
+ }
|
||||
+ memmove (p + 4, p + 8, len - (p + 8 - buf));
|
||||
+ h = dlopen (buf, RTLD_LAZY);
|
||||
+ if (h == NULL)
|
||||
+ {
|
||||
+ len = progname - save_argv[0];
|
||||
+ memcpy (buf, save_argv[0], len);
|
||||
+ strcpy (buf + len, "libcloog.so.0");
|
||||
+ }
|
||||
+ }
|
||||
+ if (h == NULL)
|
||||
+ h = dlopen (buf, RTLD_LAZY);
|
||||
+ cloog_pointers.h = h;
|
||||
+ if (h == NULL)
|
||||
+ return false;
|
||||
+#define DYNSYM(x) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ union { __typeof (cloog_pointers.p_##x) p; void *q; } u; \
|
||||
+ u.q = dlsym (h, #x); \
|
||||
+ if (u.q == NULL) \
|
||||
+ return false; \
|
||||
+ cloog_pointers.p_##x = u.p; \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+ DYNSYMS
|
||||
+#undef DYNSYM
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static VEC (scop_p, heap) *current_scops;
|
||||
|
||||
/* Converts a GMP constant V to a tree and returns it. */
|
||||
@@ -4019,10 +4151,10 @@ clast_get_body_of_loop (struct clast_stm
|
||||
STMT. */
|
||||
|
||||
static tree
|
||||
-gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_for)
|
||||
+gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_fora)
|
||||
{
|
||||
- struct clast_user_stmt *stmt = clast_get_body_of_loop ((struct clast_stmt *) stmt_for);
|
||||
- const char *cloog_iv = stmt_for->iterator;
|
||||
+ struct clast_user_stmt *stmt = clast_get_body_of_loop ((struct clast_stmt *) stmt_fora);
|
||||
+ const char *cloog_iv = stmt_fora->iterator;
|
||||
CloogStatement *cs = stmt->statement;
|
||||
graphite_bb_p gbb = (graphite_bb_p) cloog_statement_usr (cs);
|
||||
|
||||
@@ -6061,6 +6193,12 @@ graphite_transform_loops (void)
|
||||
if (number_of_loops () <= 1)
|
||||
return;
|
||||
|
||||
+ if (!init_cloog_pointers ())
|
||||
+ {
|
||||
+ sorry ("Graphite loop optimizations cannot be used");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
current_scops = VEC_alloc (scop_p, heap, 3);
|
||||
recompute_all_dominators ();
|
||||
|
||||
353
gcc44-diff.patch
Normal file
353
gcc44-diff.patch
Normal file
@ -0,0 +1,353 @@
|
||||
--- gcc/DATESTAMP (revision 144236)
|
||||
+++ gcc/DATESTAMP (revision 144237)
|
||||
@@ -1 +1 @@
|
||||
-20090216
|
||||
+20090217
|
||||
--- gcc/ChangeLog (revision 144236)
|
||||
+++ gcc/ChangeLog (revision 144237)
|
||||
@@ -1,3 +1,36 @@
|
||||
+2009-02-17 Richard Guenther <rguenther@suse.de>
|
||||
+
|
||||
+ PR tree-optimization/39202
|
||||
+ * tree-ssa-structalias.c (do_structure_copy): Before collapsing
|
||||
+ a var make sure to follow existing collapses.
|
||||
+
|
||||
+2009-02-17 Richard Guenther <rguenther@suse.de>
|
||||
+
|
||||
+ PR middle-end/39214
|
||||
+ * langhooks.c (lhd_print_error_function): Check for NULL block.
|
||||
+
|
||||
+2009-02-17 Richard Guenther <rguenther@suse.de>
|
||||
+
|
||||
+ PR tree-optimization/39204
|
||||
+ * tree-ssa-pre.c (phi_translate_1): Lookup the value-number
|
||||
+ of the PHI arg.
|
||||
+
|
||||
+2009-02-17 Uros Bizjak <ubizjak@gmail.com>
|
||||
+
|
||||
+ * config/soft-fp/double.h: Update from glibc CVS.
|
||||
+
|
||||
+2009-02-17 Richard Guenther <rguenther@suse.de>
|
||||
+
|
||||
+ PR tree-optimization/39207
|
||||
+ * tree-ssa-structalias.c (find_what_p_points_to): Do not emit
|
||||
+ strict-aliasing warnings for pointers pointing to NULL.
|
||||
+
|
||||
+2009-02-16 Joseph Myers <joseph@codesourcery.com>
|
||||
+
|
||||
+ PR c/35446
|
||||
+ * c-parser.c (c_parser_braced_init): Call pop_init_level when
|
||||
+ skipping until next close brace.
|
||||
+
|
||||
2009-02-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/37049
|
||||
--- gcc/testsuite/gcc.c-torture/compile/pr39202.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/compile/pr39202.c (revision 144237)
|
||||
@@ -0,0 +1,33 @@
|
||||
+typedef struct
|
||||
+{
|
||||
+ union
|
||||
+ {
|
||||
+ int * aaa;
|
||||
+ } u;
|
||||
+} t_a;
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ unsigned bbb : 1;
|
||||
+} t_b;
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ int ccc;
|
||||
+ t_a ddd;
|
||||
+ t_b eee;
|
||||
+ int fff;
|
||||
+} t_c;
|
||||
+
|
||||
+typedef struct t_d
|
||||
+{
|
||||
+ t_c f1;
|
||||
+ t_c f2;
|
||||
+} t_d;
|
||||
+
|
||||
+void foo (void)
|
||||
+{
|
||||
+ t_d ggg;
|
||||
+ ggg.f1 = ggg.f2;
|
||||
+}
|
||||
+
|
||||
--- gcc/testsuite/gcc.dg/torture/pr39204.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/torture/pr39204.c (revision 144237)
|
||||
@@ -0,0 +1,131 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-w" } */
|
||||
+
|
||||
+typedef unsigned int size_t;
|
||||
+typedef unsigned char __u_char;
|
||||
+typedef unsigned short int __u_short;
|
||||
+typedef unsigned int __u_int;
|
||||
+typedef unsigned long int __u_long;
|
||||
+typedef signed char __int8_t;
|
||||
+typedef unsigned char __uint8_t;
|
||||
+typedef signed short int __int16_t;
|
||||
+typedef unsigned short int __uint16_t;
|
||||
+typedef signed int __int32_t;
|
||||
+typedef unsigned int __uint32_t;
|
||||
+__extension__ typedef signed long long int __int64_t;
|
||||
+__extension__ typedef unsigned long long int __uint64_t;
|
||||
+__extension__ typedef long long int __quad_t;
|
||||
+__extension__ typedef unsigned long long int __u_quad_t;
|
||||
+__extension__ typedef __u_quad_t __dev_t;
|
||||
+__extension__ typedef unsigned int __uid_t;
|
||||
+__extension__ typedef unsigned int __gid_t;
|
||||
+__extension__ typedef unsigned long int __ino_t;
|
||||
+__extension__ typedef __u_quad_t __ino64_t;
|
||||
+__extension__ typedef unsigned int __mode_t;
|
||||
+__extension__ typedef unsigned int __nlink_t;
|
||||
+__extension__ typedef long int __off_t;
|
||||
+__extension__ typedef __quad_t __off64_t;
|
||||
+__extension__ typedef int __pid_t;
|
||||
+__extension__ typedef struct {
|
||||
+ int __val[2];
|
||||
+} __fsid_t;
|
||||
+__extension__ typedef long int __clock_t;
|
||||
+__extension__ typedef unsigned int __id_t;
|
||||
+typedef struct _IO_FILE FILE;
|
||||
+typedef struct _IO_FILE __FILE;
|
||||
+typedef struct {
|
||||
+ int __count;
|
||||
+ union {
|
||||
+ unsigned int __wch;
|
||||
+ char __wchb[4];
|
||||
+ }
|
||||
+ __value;
|
||||
+} __mbstate_t;
|
||||
+typedef struct {
|
||||
+ __off_t __pos;
|
||||
+ __mbstate_t __state;
|
||||
+} _G_fpos_t;
|
||||
+typedef struct {
|
||||
+ __off64_t __pos;
|
||||
+ __mbstate_t __state;
|
||||
+} _G_fpos64_t;
|
||||
+typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
|
||||
+typedef struct _IO_FILE _IO_FILE;
|
||||
+extern struct _IO_FILE_plus _IO_2_1_stderr_;
|
||||
+extern int fputs (__const char *__restrict __s, FILE * __restrict __stream);
|
||||
+extern char *strstr (__const char *__haystack, __const char *__needle)
|
||||
+ __attribute__ ((__nonnull__ (1, 2)));
|
||||
+ extern char *rindex (__const char *__s, int __c) __attribute__ ((__nonnull__ (1)));
|
||||
+extern size_t strlen (__const char *__s) __attribute__ ((__nothrow__))
|
||||
+ __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
|
||||
+ char *mystrlwr (char *string);
|
||||
+ char *m_replace_filename (const char *path, const char *filename);
|
||||
+ typedef struct LINE {
|
||||
+ char *text;
|
||||
+ struct LINE *next;
|
||||
+ int flags;
|
||||
+ } LINE;
|
||||
+typedef struct TOC {
|
||||
+ char *text;
|
||||
+ char *alt;
|
||||
+ struct TOC *next;
|
||||
+ int root;
|
||||
+ int texinfoable;
|
||||
+ int htmlable;
|
||||
+ int otherfile;
|
||||
+} TOC;
|
||||
+static int _empty_count;
|
||||
+extern char *_word_substitution[256];
|
||||
+static void _output_sorted_nested_toc (TOC ** list, unsigned int num_items);
|
||||
+static char *_do_text_substitution (char *input);
|
||||
+static int _toc_scmp (const void *e1, const void *e2)
|
||||
+{
|
||||
+ TOC *t1 = *((TOC **) e1);
|
||||
+ TOC *t2 = *((TOC **) e2);
|
||||
+ return mystricmp (t1->text, t2->text);
|
||||
+}
|
||||
+static void _output_buffered_text (void) { if (_empty_count) ; }
|
||||
+void _post_process_filename (char *filename)
|
||||
+{
|
||||
+ int code_scanning = 0;
|
||||
+ char *new_filename, *p;
|
||||
+ char *line;
|
||||
+ FILE *f1 = 0, *f2 = 0;
|
||||
+ if (!new_filename || strlen (new_filename) < 2)
|
||||
+ new_filename[strlen (filename) - 1] = 'x';
|
||||
+ if (!f1 || !f2)
|
||||
+ while ((line = m_fgets (f1)))
|
||||
+ {
|
||||
+ line = _do_text_substitution (line);
|
||||
+ fputs (line, f2);
|
||||
+ }
|
||||
+ if (remove (filename))
|
||||
+ cancel:
|
||||
+ if (f1)
|
||||
+ if (f2)
|
||||
+ if (new_filename)
|
||||
+ ;
|
||||
+}
|
||||
+static void _close_html_file (FILE * file)
|
||||
+{
|
||||
+ int f;
|
||||
+ for (f = 0; _word_substitution[f]; f++)
|
||||
+ ;
|
||||
+}
|
||||
+static __attribute__((always_inline))
|
||||
+char * _do_text_substitution (char *input)
|
||||
+{
|
||||
+ int start, end, middle, f;
|
||||
+ char *temp, *found, *reader;
|
||||
+ for (f = 0; _word_substitution[f]; f++)
|
||||
+ {
|
||||
+ reader = input;
|
||||
+ while ((found = strstr (reader, _word_substitution[f])))
|
||||
+ {
|
||||
+ start = found - input;
|
||||
+ input = temp;
|
||||
+ reader = temp + start + middle;
|
||||
+ }
|
||||
+ }
|
||||
+ return input;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.dg/noncompile/init-5.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/noncompile/init-5.c (revision 144237)
|
||||
@@ -0,0 +1,4 @@
|
||||
+/* Test for ICE after syntax error in initializer with range
|
||||
+ designator: PR 35446. */
|
||||
+
|
||||
+int a[2][2] = { [0 ... 1] = { ; } }; /* { dg-error "expected expression" } */
|
||||
--- gcc/testsuite/gcc.dg/init-bad-4.c (revision 144236)
|
||||
+++ gcc/testsuite/gcc.dg/init-bad-4.c (revision 144237)
|
||||
@@ -2,4 +2,4 @@
|
||||
/* Origin: Richard Guenther <rguenth@gcc.gnu.org> */
|
||||
/* { dg-do compile } */
|
||||
|
||||
-struct A { } a = (struct A) {{ (X)0 }}; /* { dg-error "no members|extra brace|near|undeclared|constant|compound" } */
|
||||
+struct A { } a = (struct A) {{ (X)0 }}; /* { dg-error "no members|extra brace|near|undeclared|constant|compound|excess" } */
|
||||
--- gcc/testsuite/gcc.dg/vect/vect-outer-5.c (revision 144236)
|
||||
+++ gcc/testsuite/gcc.dg/vect/vect-outer-5.c (revision 144237)
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* { dg-require-effective-target vect_int } */
|
||||
+/* { dg-require-effective-target vect_float } */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
--- gcc/testsuite/gcc.dg/vect/vect-outer-6.c (revision 144236)
|
||||
+++ gcc/testsuite/gcc.dg/vect/vect-outer-6.c (revision 144237)
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* { dg-require-effective-target vect_int } */
|
||||
+/* { dg-require-effective-target vect_float } */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <signal.h>
|
||||
--- gcc/testsuite/ChangeLog (revision 144236)
|
||||
+++ gcc/testsuite/ChangeLog (revision 144237)
|
||||
@@ -1,3 +1,24 @@
|
||||
+2009-02-17 Richard Guenther <rguenther@suse.de>
|
||||
+
|
||||
+ PR tree-optimization/39202
|
||||
+ * gcc.c-torture/compile/pr39202.c: New testcase.
|
||||
+
|
||||
+2009-02-17 Richard Guenther <rguenther@suse.de>
|
||||
+
|
||||
+ PR tree-optimization/39204
|
||||
+ * gcc.dg/torture/pr39204.c: New testcase.
|
||||
+
|
||||
+2009-02-17 Bingfeng Mei <bmei@broadcom.com>
|
||||
+
|
||||
+ * gcc.dg/vect/vect-outer-5.c: Require vect_float support.
|
||||
+ * gcc.dg/vect/vect-outer-6.c: Ditto.
|
||||
+
|
||||
+2009-02-16 Joseph Myers <joseph@codesourcery.com>
|
||||
+
|
||||
+ PR c/35446
|
||||
+ * gcc.dg/noncompile/init-5.c: New test.
|
||||
+ * gcc.dg/init-bad-4.c: Adjust expected errors.
|
||||
+
|
||||
2009-02-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/37049
|
||||
--- gcc/langhooks.c (revision 144236)
|
||||
+++ gcc/langhooks.c (revision 144237)
|
||||
@@ -437,7 +437,7 @@ lhd_print_error_function (diagnostic_con
|
||||
while (block && TREE_CODE (block) == BLOCK)
|
||||
block = BLOCK_SUPERCONTEXT (block);
|
||||
|
||||
- if (TREE_CODE (block) == FUNCTION_DECL)
|
||||
+ if (block && TREE_CODE (block) == FUNCTION_DECL)
|
||||
fndecl = block;
|
||||
abstract_origin = NULL;
|
||||
}
|
||||
--- gcc/tree-ssa-pre.c (revision 144236)
|
||||
+++ gcc/tree-ssa-pre.c (revision 144237)
|
||||
@@ -1707,6 +1707,9 @@ phi_translate_1 (pre_expr expr, bitmap_s
|
||||
tree def = PHI_ARG_DEF (phi, e->dest_idx);
|
||||
pre_expr newexpr;
|
||||
|
||||
+ if (TREE_CODE (def) == SSA_NAME)
|
||||
+ def = VN_INFO (def)->valnum;
|
||||
+
|
||||
/* Handle constant. */
|
||||
if (is_gimple_min_invariant (def))
|
||||
return get_or_alloc_expr_for_constant (def);
|
||||
--- gcc/tree-ssa-structalias.c (revision 144236)
|
||||
+++ gcc/tree-ssa-structalias.c (revision 144237)
|
||||
@@ -3405,8 +3405,8 @@ do_structure_copy (tree lhsop, tree rhso
|
||||
{
|
||||
if (!do_simple_structure_copy (lhs, rhs, MIN (lhssize, rhssize)))
|
||||
{
|
||||
- lhs.var = collapse_rest_of_var (lhs.var);
|
||||
- rhs.var = collapse_rest_of_var (rhs.var);
|
||||
+ lhs.var = collapse_rest_of_var (get_varinfo_fc (lhs.var)->id);
|
||||
+ rhs.var = collapse_rest_of_var (get_varinfo_fc (rhs.var)->id);
|
||||
lhs.offset = 0;
|
||||
rhs.offset = 0;
|
||||
lhs.type = SCALAR;
|
||||
@@ -4935,6 +4935,7 @@ find_what_p_points_to (tree p)
|
||||
{
|
||||
pi->pt_vars = NULL;
|
||||
if (pruned > 0
|
||||
+ && !pi->pt_null
|
||||
&& pi->is_dereferenced
|
||||
&& warn_strict_aliasing > 0
|
||||
&& !SSA_NAME_IS_DEFAULT_DEF (p))
|
||||
--- gcc/c-parser.c (revision 144236)
|
||||
+++ gcc/c-parser.c (revision 144237)
|
||||
@@ -3036,6 +3036,7 @@ c_parser_braced_init (c_parser *parser,
|
||||
ret.value = error_mark_node;
|
||||
ret.original_code = ERROR_MARK;
|
||||
c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, "expected %<}%>");
|
||||
+ pop_init_level (0);
|
||||
return ret;
|
||||
}
|
||||
c_parser_consume_token (parser);
|
||||
--- gcc/config/soft-fp/double.h (revision 144236)
|
||||
+++ gcc/config/soft-fp/double.h (revision 144237)
|
||||
@@ -1,6 +1,7 @@
|
||||
/* Software floating-point emulation.
|
||||
Definitions for IEEE Double Precision
|
||||
- Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1997, 1998, 1999, 2006, 2007, 2008, 2009
|
||||
+ Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com),
|
||||
Jakub Jelinek (jj@ultra.linux.cz),
|
||||
@@ -203,13 +204,13 @@ union _FP_UNION_D
|
||||
|
||||
#define FP_UNPACK_SEMIRAW_D(X,val) \
|
||||
do { \
|
||||
- _FP_UNPACK_RAW_2(1,X,val); \
|
||||
+ _FP_UNPACK_RAW_1(D,X,val); \
|
||||
_FP_UNPACK_SEMIRAW(D,1,X); \
|
||||
} while (0)
|
||||
|
||||
#define FP_UNPACK_SEMIRAW_DP(X,val) \
|
||||
do { \
|
||||
- _FP_UNPACK_RAW_2_P(1,X,val); \
|
||||
+ _FP_UNPACK_RAW_1_P(D,X,val); \
|
||||
_FP_UNPACK_SEMIRAW(D,1,X); \
|
||||
} while (0)
|
||||
|
||||
64
gcc44-hack.patch
Normal file
64
gcc44-hack.patch
Normal file
@ -0,0 +1,64 @@
|
||||
--- libada/Makefile.in.jj 2009-01-14 12:07:35.000000000 +0100
|
||||
+++ libada/Makefile.in 2009-01-15 14:25:33.000000000 +0100
|
||||
@@ -66,17 +66,39 @@ target_noncanonical:=@target_noncanonica
|
||||
version := $(shell cat $(srcdir)/../gcc/BASE-VER)
|
||||
libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
|
||||
|
||||
+DEFAULTMULTIFLAGS :=
|
||||
+ifeq ($(MULTISUBDIR),)
|
||||
+targ:=$(subst -, ,$(target))
|
||||
+arch:=$(word 1,$(targ))
|
||||
+ifeq ($(words $(targ)),2)
|
||||
+osys:=$(word 2,$(targ))
|
||||
+else
|
||||
+osys:=$(word 3,$(targ))
|
||||
+endif
|
||||
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
|
||||
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
|
||||
+DEFAULTMULTIFLAGS := -m64
|
||||
+else
|
||||
+ifeq ($(strip $(filter-out s390%, $(arch))),)
|
||||
+DEFAULTMULTIFLAGS := -m31
|
||||
+else
|
||||
+DEFAULTMULTIFLAGS := -m32
|
||||
+endif
|
||||
+endif
|
||||
+endif
|
||||
+endif
|
||||
+
|
||||
# exeext should not be used because it's the *host* exeext. We're building
|
||||
# a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
|
||||
# definitions just in case something slips through the safety net provided
|
||||
# by recursive make invocations in gcc/ada/Makefile.in
|
||||
LIBADA_FLAGS_TO_PASS = \
|
||||
"MAKEOVERRIDES=" \
|
||||
- "LDFLAGS=$(LDFLAGS)" \
|
||||
+ "LDFLAGS=$(strip $(LDFLAGS) $(DEFAULTMULTIFLAGS))" \
|
||||
"LN_S=$(LN_S)" \
|
||||
"SHELL=$(SHELL)" \
|
||||
- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
|
||||
- "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
|
||||
+ "GNATLIBFLAGS=$(strip $(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \
|
||||
+ "GNATLIBCFLAGS=$(strip $(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \
|
||||
"TARGET_LIBGCC2_CFLAGS=$(TARGET_LIBGCC2_CFLAGS)" \
|
||||
"THREAD_KIND=$(THREAD_KIND)" \
|
||||
"TRACE=$(TRACE)" \
|
||||
@@ -87,7 +109,7 @@ LIBADA_FLAGS_TO_PASS = \
|
||||
"exeext=.exeext.should.not.be.used " \
|
||||
'CC=the.host.compiler.should.not.be.needed' \
|
||||
"GCC_FOR_TARGET=$(CC)" \
|
||||
- "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
|
||||
+ "CFLAGS=$(strip $(CFLAGS) $(DEFAULTMULTIFLAGS) $(WARN_CFLAGS))"
|
||||
|
||||
# Rules to build gnatlib.
|
||||
.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons
|
||||
--- gcc/ada/make.adb 2008-11-07 23:00:32.000000000 +0100
|
||||
+++ gcc/ada/make.adb 2009-01-16 17:55:02.000000000 +0100
|
||||
@@ -8039,6 +8039,7 @@ package body Make is
|
||||
or else Argv (2 .. Argv'Last) = "pg"
|
||||
or else (Argv (2) = 'm' and then Argv'Last > 2)
|
||||
or else (Argv (2) = 'f' and then Argv'Last > 2)
|
||||
+ or else (Argv'Last >= 8 and then Argv (2 .. 8) = "-param=")
|
||||
then
|
||||
Add_Switch (Argv, Compiler, And_Save => And_Save);
|
||||
Add_Switch (Argv, Linker, And_Save => And_Save);
|
||||
61
gcc44-i386-libgomp.patch
Normal file
61
gcc44-i386-libgomp.patch
Normal file
@ -0,0 +1,61 @@
|
||||
Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
|
||||
hardware isn't supported because NPTL doesn't support it anyway.
|
||||
|
||||
--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
|
||||
+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
|
||||
@@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then
|
||||
;;
|
||||
|
||||
# Note that bare i386 is not included here. We need cmpxchg.
|
||||
- i[456]86-*-linux*)
|
||||
+ i[3456]86-*-linux*)
|
||||
config_path="linux/x86 linux posix"
|
||||
case " ${CC} ${CFLAGS} " in
|
||||
*" -m64 "*)
|
||||
;;
|
||||
*)
|
||||
if test -z "$with_arch"; then
|
||||
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
||||
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
|
||||
fi
|
||||
esac
|
||||
;;
|
||||
@@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then
|
||||
config_path="linux/x86 linux posix"
|
||||
case " ${CC} ${CFLAGS} " in
|
||||
*" -m32 "*)
|
||||
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
|
||||
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
--- libstdc++-v3/libsupc++/guard.cc.jj 2008-03-01 00:58:24.000000000 +0100
|
||||
+++ libstdc++-v3/libsupc++/guard.cc 2008-03-27 14:08:44.000000000 +0100
|
||||
@@ -35,6 +35,27 @@
|
||||
#include <new>
|
||||
#include <ext/atomicity.h>
|
||||
#include <ext/concurrence.h>
|
||||
+#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS_4
|
||||
+# define _GLIBCXX_ATOMIC_BUILTINS_4 1
|
||||
+# define __sync_val_compare_and_swap(a, b, c) \
|
||||
+ ({ \
|
||||
+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
|
||||
+ int sltas; \
|
||||
+ __asm __volatile ("lock; cmpxchgl %3, (%1)" \
|
||||
+ : "=a" (sltas) \
|
||||
+ : "r" (a), "0" (b), "r" (c) : "memory"); \
|
||||
+ sltas; \
|
||||
+ })
|
||||
+# define __sync_lock_test_and_set(a, b) \
|
||||
+ ({ \
|
||||
+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
|
||||
+ int sltas; \
|
||||
+ __asm __volatile ("xchgl (%1), %0" \
|
||||
+ : "=r" (sltas) \
|
||||
+ : "r" (a), "0" (b) : "memory"); \
|
||||
+ sltas; \
|
||||
+ })
|
||||
+#endif
|
||||
#if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
|
||||
&& defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
|
||||
# include <climits>
|
||||
538
gcc44-ia64-libunwind.patch
Normal file
538
gcc44-ia64-libunwind.patch
Normal file
@ -0,0 +1,538 @@
|
||||
2004-11-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config.gcc (ia64*-*-linux*): If native and libelf is installed,
|
||||
use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
|
||||
fragments.
|
||||
* config/ia64/t-glibc-no-libunwind: New file.
|
||||
* config/ia64/change-symver.c: New file.
|
||||
* config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
|
||||
define _Unwind_* to __symverglobal_Unwind_*.
|
||||
(alias): Undefine.
|
||||
(symverglobal): Define. Use it on _Unwind_*.
|
||||
* config/ia64/mkmap-symver-multi.awk: New file.
|
||||
* config/ia64/libgcc-ia64-no-libunwind.ver: New file.
|
||||
|
||||
--- gcc/config.gcc.jj 2004-10-04 08:55:44.000000000 -0400
|
||||
+++ gcc/config.gcc 2004-11-13 05:23:50.000000000 -0500
|
||||
@@ -1185,9 +1185,16 @@ ia64*-*-freebsd*)
|
||||
;;
|
||||
ia64*-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
|
||||
- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
|
||||
- if test x$with_system_libunwind != xyes ; then
|
||||
- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
|
||||
+ tmake_file="${tmake_file} ia64/t-ia64"
|
||||
+ if test x${target} = x${host} && test x${target} = x${build} \
|
||||
+ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
|
||||
+ && test -f /usr/lib/libelf.so; then
|
||||
+ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
|
||||
+ else
|
||||
+ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
|
||||
+ if test x$with_system_libunwind != xyes ; then
|
||||
+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
|
||||
+ fi
|
||||
fi
|
||||
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
|
||||
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
|
||||
--- gcc/config/ia64/t-glibc-no-libunwind.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/t-glibc-no-libunwind 2004-11-15 09:56:33.000000000 -0500
|
||||
@@ -0,0 +1,30 @@
|
||||
+# Don't use system libunwind library on IA-64 GLIBC based system,
|
||||
+# but make _Unwind_* symbols unversioned, so that created programs
|
||||
+# are usable even when libgcc_s uses libunwind.
|
||||
+LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
|
||||
+SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
|
||||
+SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
|
||||
+
|
||||
+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
|
||||
+ -Wl,--soname=$(SHLIB_SONAME) \
|
||||
+ -Wl,--version-script=$(SHLIB_MAP) \
|
||||
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
|
||||
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
|
||||
+ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
|
||||
+ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
|
||||
+ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
|
||||
+ else true; fi && \
|
||||
+ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
|
||||
+ $$(gcc_srcdir)/config/ia64/change-symver.c -lelf && \
|
||||
+ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
|
||||
+ GCC_3.4.2 _GLOBAL_ \
|
||||
+ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
|
||||
+ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
|
||||
+ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
|
||||
+ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
|
||||
+ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
|
||||
+ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
|
||||
+ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
|
||||
+ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
|
||||
+
|
||||
+TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
|
||||
--- gcc/config/ia64/change-symver.c.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/change-symver.c 2004-11-13 05:23:50.000000000 -0500
|
||||
@@ -0,0 +1,211 @@
|
||||
+#define _GNU_SOURCE 1
|
||||
+#define _FILE_OFFSET_BITS 64
|
||||
+#include <endian.h>
|
||||
+#include <errno.h>
|
||||
+#include <error.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <fnmatch.h>
|
||||
+#include <gelf.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int
|
||||
+compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
|
||||
+{
|
||||
+ if (strcmp (name, "_GLOBAL_") == 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ int cnt;
|
||||
+ size_t offset = 0;
|
||||
+ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
|
||||
+ {
|
||||
+ GElf_Verdef defmem;
|
||||
+ GElf_Verdef *def;
|
||||
+ GElf_Verdaux auxmem;
|
||||
+ GElf_Verdaux *aux;
|
||||
+ unsigned int auxoffset;
|
||||
+
|
||||
+ /* Get the data at the next offset. */
|
||||
+ def = gelf_getverdef (verd, offset, &defmem);
|
||||
+ if (def == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ auxoffset = offset + def->vd_aux;
|
||||
+ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
|
||||
+ if (aux == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
|
||||
+ aux->vda_name)) == 0)
|
||||
+ return def->vd_ndx;
|
||||
+
|
||||
+ /* Find the next offset. */
|
||||
+ offset += def->vd_next;
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ if (argc < 4)
|
||||
+ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
|
||||
+
|
||||
+ const char *fname = argv[1];
|
||||
+
|
||||
+ /* Open the file. */
|
||||
+ int fd;
|
||||
+ fd = open (fname, O_RDWR);
|
||||
+ if (fd == -1)
|
||||
+ error (1, errno, fname);
|
||||
+
|
||||
+ elf_version (EV_CURRENT);
|
||||
+
|
||||
+ /* Now get the ELF descriptor. */
|
||||
+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
|
||||
+ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
|
||||
+ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ size_t shstrndx;
|
||||
+ /* Get the section header string table index. */
|
||||
+ if (elf_getshstrndx (elf, &shstrndx) < 0)
|
||||
+ error (1, 0, "cannot get shstrndx from %s", fname);
|
||||
+
|
||||
+ GElf_Ehdr ehdr_mem;
|
||||
+ GElf_Ehdr *ehdr;
|
||||
+
|
||||
+ /* We need the ELF header in a few places. */
|
||||
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
|
||||
+ if (ehdr == NULL)
|
||||
+ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ Elf_Scn *scn = NULL;
|
||||
+ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
|
||||
+ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
|
||||
+
|
||||
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
|
||||
+ {
|
||||
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
|
||||
+
|
||||
+ if (shdr == NULL)
|
||||
+ error (1, 0, "couldn't get shdr from %s", fname);
|
||||
+
|
||||
+ if ((shdr->sh_flags & SHF_ALLOC) != 0)
|
||||
+ {
|
||||
+ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
|
||||
+ Elf_Data **p;
|
||||
+
|
||||
+ if (strcmp (name, ".gnu.version") == 0)
|
||||
+ {
|
||||
+ p = &ver;
|
||||
+ ver_shdr = *shdr;
|
||||
+ }
|
||||
+ else if (strcmp (name, ".gnu.version_d") == 0)
|
||||
+ {
|
||||
+ p = &verd;
|
||||
+ verd_shdr = *shdr;
|
||||
+ }
|
||||
+ else if (strcmp (name, ".dynsym") == 0)
|
||||
+ {
|
||||
+ p = &dynsym;
|
||||
+ dynsym_shdr = *shdr;
|
||||
+ }
|
||||
+ else
|
||||
+ continue;
|
||||
+
|
||||
+ if (*p != NULL)
|
||||
+ error (1, 0, "Two %s sections in %s", name, fname);
|
||||
+ *p = elf_getdata (scn, NULL);
|
||||
+ if (*p == NULL || elf_getdata (scn, *p) != NULL)
|
||||
+ error (1, 0, "No data or non-contiguous data in %s section in %s",
|
||||
+ name, fname);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (ver == NULL || verd == NULL || dynsym == NULL)
|
||||
+ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
|
||||
+
|
||||
+ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
|
||||
+ if (from_idx == -1)
|
||||
+ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
|
||||
+
|
||||
+ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
|
||||
+ if (to_idx == -1)
|
||||
+ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
|
||||
+
|
||||
+ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
|
||||
+ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
|
||||
+ || ver_shdr.sh_entsize != 2
|
||||
+ || (ver_shdr.sh_size & 1)
|
||||
+ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
|
||||
+ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
|
||||
+
|
||||
+ size_t nentries = ver_shdr.sh_size / 2;
|
||||
+ size_t cnt;
|
||||
+ GElf_Versym array[nentries];
|
||||
+ for (cnt = 0; cnt < nentries; ++cnt)
|
||||
+ {
|
||||
+ GElf_Versym vsymmem;
|
||||
+ GElf_Versym *vsym;
|
||||
+
|
||||
+ vsym = gelf_getversym (ver, cnt, &vsymmem);
|
||||
+ if (vsym == NULL)
|
||||
+ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ array[cnt] = *vsym;
|
||||
+ if (*vsym != from_idx)
|
||||
+ continue;
|
||||
+
|
||||
+ GElf_Sym sym_mem;
|
||||
+ GElf_Sym *sym;
|
||||
+ sym = gelf_getsym (dynsym, cnt, &sym_mem);
|
||||
+ if (sym == NULL)
|
||||
+ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
|
||||
+
|
||||
+ int argn;
|
||||
+ for (argn = 4; argn < argc; ++argn)
|
||||
+ if (fnmatch (argv[argn], name, 0) == 0)
|
||||
+ {
|
||||
+ array[cnt] = to_idx;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (sizeof (array[0]) != 2)
|
||||
+ abort ();
|
||||
+
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
|
||||
+ ;
|
||||
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
|
||||
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
|
||||
+ ;
|
||||
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
|
||||
+#else
|
||||
+# error Unsupported endianity
|
||||
+#endif
|
||||
+ {
|
||||
+ for (cnt = 0; cnt < nentries; ++cnt)
|
||||
+ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
|
||||
+ }
|
||||
+ else
|
||||
+ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
|
||||
+
|
||||
+ if (elf_end (elf) != 0)
|
||||
+ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
|
||||
+ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
|
||||
+ fname);
|
||||
+
|
||||
+ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
|
||||
+ error (1, 0, "failed to write .gnu.version section into %s", fname);
|
||||
+
|
||||
+ close (fd);
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/config/ia64/unwind-ia64.c.jj 2004-10-04 08:55:57.000000000 -0400
|
||||
+++ gcc/config/ia64/unwind-ia64.c 2004-11-15 09:07:45.000000000 -0500
|
||||
@@ -51,6 +51,51 @@
|
||||
#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
|
||||
#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
|
||||
|
||||
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
|
||||
+ (_Unwind_Trace_Fn, void *);
|
||||
+extern void __symverglobal_Unwind_DeleteException
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
|
||||
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetCFA
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetBSP
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetGR
|
||||
+ (struct _Unwind_Context *, int );
|
||||
+extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
|
||||
+extern void *__symverglobal_Unwind_GetLanguageSpecificData
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void __symverglobal_Unwind_SetGR
|
||||
+ (struct _Unwind_Context *, int, _Unwind_Word);
|
||||
+extern void __symverglobal_Unwind_SetIP
|
||||
+ (struct _Unwind_Context *, _Unwind_Ptr);
|
||||
+#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
|
||||
+#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
|
||||
+#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
|
||||
+#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
|
||||
+#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
|
||||
+#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
|
||||
+#define _Unwind_GetGR __symverglobal_Unwind_GetGR
|
||||
+#define _Unwind_GetIP __symverglobal_Unwind_GetIP
|
||||
+#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
|
||||
+#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
|
||||
+#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
|
||||
+#define _Unwind_Resume __symverglobal_Unwind_Resume
|
||||
+#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
|
||||
+#define _Unwind_SetGR __symverglobal_Unwind_SetGR
|
||||
+#define _Unwind_SetIP __symverglobal_Unwind_SetIP
|
||||
+#endif
|
||||
+
|
||||
enum unw_application_register
|
||||
{
|
||||
UNW_AR_BSP,
|
||||
@@ -2402,4 +2447,44 @@ alias (_Unwind_SetGR);
|
||||
alias (_Unwind_SetIP);
|
||||
#endif
|
||||
|
||||
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
|
||||
+#undef alias
|
||||
+#define symverglobal(name, version) \
|
||||
+__typeof (__symverglobal##name) __symverlocal##name \
|
||||
+ __attribute__ ((alias ("__symverglobal" #name))); \
|
||||
+__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
|
||||
+__asm__ (".symver __symverlocal" #name"," #name "@" #version)
|
||||
+
|
||||
+#undef _Unwind_Backtrace
|
||||
+#undef _Unwind_DeleteException
|
||||
+#undef _Unwind_FindEnclosingFunction
|
||||
+#undef _Unwind_ForcedUnwind
|
||||
+#undef _Unwind_GetBSP
|
||||
+#undef _Unwind_GetCFA
|
||||
+#undef _Unwind_GetGR
|
||||
+#undef _Unwind_GetIP
|
||||
+#undef _Unwind_GetLanguageSpecificData
|
||||
+#undef _Unwind_GetRegionStart
|
||||
+#undef _Unwind_RaiseException
|
||||
+#undef _Unwind_Resume
|
||||
+#undef _Unwind_Resume_or_Rethrow
|
||||
+#undef _Unwind_SetGR
|
||||
+#undef _Unwind_SetIP
|
||||
+symverglobal (_Unwind_Backtrace, GCC_3.3);
|
||||
+symverglobal (_Unwind_DeleteException, GCC_3.0);
|
||||
+symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
|
||||
+symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetBSP, GCC_3.3.2);
|
||||
+symverglobal (_Unwind_GetCFA, GCC_3.3);
|
||||
+symverglobal (_Unwind_GetGR, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetIP, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetRegionStart, GCC_3.0);
|
||||
+symverglobal (_Unwind_RaiseException, GCC_3.0);
|
||||
+symverglobal (_Unwind_Resume, GCC_3.0);
|
||||
+symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
|
||||
+symverglobal (_Unwind_SetGR, GCC_3.0);
|
||||
+symverglobal (_Unwind_SetIP, GCC_3.0);
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
--- gcc/config/ia64/mkmap-symver-multi.awk.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/mkmap-symver-multi.awk 2004-11-15 09:46:50.000000000 -0500
|
||||
@@ -0,0 +1,133 @@
|
||||
+# Generate an ELF symbol version map a-la Solaris and GNU ld.
|
||||
+# Contributed by Richard Henderson <rth@cygnus.com>
|
||||
+#
|
||||
+# 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.
|
||||
+#
|
||||
+# 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.
|
||||
+
|
||||
+BEGIN {
|
||||
+ state = "nm";
|
||||
+ sawsymbol = 0;
|
||||
+}
|
||||
+
|
||||
+# Remove comment and blank lines.
|
||||
+/^ *#/ || /^ *$/ {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+# We begin with nm input. Collect the set of symbols that are present
|
||||
+# so that we can not emit them into the final version script -- Solaris
|
||||
+# complains at us if we do.
|
||||
+
|
||||
+state == "nm" && /^%%/ {
|
||||
+ state = "ver";
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" && ($1 == "U" || $2 == "U") {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" && NF == 3 {
|
||||
+ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
|
||||
+ def[$3] = 1
|
||||
+ tl=$3
|
||||
+ sub(/^.*@/,"",tl)
|
||||
+ ver[$3] = tl
|
||||
+ } else {
|
||||
+ sub(/@@?GCC_[0-9.]*$/,"",$3)
|
||||
+ def[$3] = 1;
|
||||
+ }
|
||||
+ sawsymbol = 1;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+# Now we process a simplified variant of the Solaris symbol version
|
||||
+# script. We have one symbol per line, no semicolons, simple markers
|
||||
+# for beginning and ending each section, and %inherit markers for
|
||||
+# describing version inheritence. A symbol may appear in more than
|
||||
+# one symbol version, and the last seen takes effect.
|
||||
+
|
||||
+NF == 3 && $1 == "%inherit" {
|
||||
+ inherit[$2] = $3;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+NF == 2 && $2 == "{" {
|
||||
+ libs[$1] = 1;
|
||||
+ thislib = $1;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+$1 == "}" {
|
||||
+ thislib = "";
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+{
|
||||
+ ver[$1] = thislib;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+END {
|
||||
+ if (!sawsymbol)
|
||||
+ {
|
||||
+ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
|
||||
+ exit 1;
|
||||
+ }
|
||||
+ for (l in libs)
|
||||
+ output(l);
|
||||
+}
|
||||
+
|
||||
+function output(lib) {
|
||||
+ if (done[lib])
|
||||
+ return;
|
||||
+ done[lib] = 1;
|
||||
+ if (inherit[lib])
|
||||
+ output(inherit[lib]);
|
||||
+
|
||||
+ empty=1
|
||||
+ for (sym in ver)
|
||||
+ if ((ver[sym] == lib) && (sym in def))
|
||||
+ {
|
||||
+ if (empty)
|
||||
+ {
|
||||
+ printf("%s {\n", lib);
|
||||
+ printf(" global:\n");
|
||||
+ empty = 0;
|
||||
+ }
|
||||
+ symp = sym;
|
||||
+ sub(/@GCC_[0-9.]*$/,"",symp);
|
||||
+ printf("\t%s;\n", symp);
|
||||
+ if (dotsyms)
|
||||
+ printf("\t.%s;\n", symp);
|
||||
+ }
|
||||
+
|
||||
+ if (empty)
|
||||
+ {
|
||||
+ for (l in libs)
|
||||
+ if (inherit[l] == lib)
|
||||
+ inherit[l] = inherit[lib];
|
||||
+ }
|
||||
+ else if (inherit[lib])
|
||||
+ printf("} %s;\n", inherit[lib]);
|
||||
+ else
|
||||
+ printf ("\n local:\n\t*;\n};\n");
|
||||
+}
|
||||
--- gcc/config/ia64/libgcc-ia64-no-libunwind.ver.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2004-11-15 09:19:56.000000000 -0500
|
||||
@@ -0,0 +1,17 @@
|
||||
+GCC_3.4.2 {
|
||||
+ _Unwind_GetGR
|
||||
+ _Unwind_RaiseException
|
||||
+ _Unwind_GetRegionStart
|
||||
+ _Unwind_SetIP
|
||||
+ _Unwind_GetIP
|
||||
+ _Unwind_GetLanguageSpecificData
|
||||
+ _Unwind_Resume
|
||||
+ _Unwind_DeleteException
|
||||
+ _Unwind_SetGR
|
||||
+ _Unwind_ForcedUnwind
|
||||
+ _Unwind_Backtrace
|
||||
+ _Unwind_FindEnclosingFunction
|
||||
+ _Unwind_GetCFA
|
||||
+ _Unwind_Resume_or_Rethrow
|
||||
+ _Unwind_GetBSP
|
||||
+}
|
||||
17
gcc44-java-debug-iface-type.patch
Normal file
17
gcc44-java-debug-iface-type.patch
Normal file
@ -0,0 +1,17 @@
|
||||
2008-01-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* lang.c (java_classify_record): Revert 2007-12-20 change.
|
||||
|
||||
--- gcc/java/lang.c 2007-12-27 09:09:49.000000000 +0100
|
||||
+++ gcc/java/lang.c 2008-01-25 17:43:57.000000000 +0100
|
||||
@@ -965,9 +965,7 @@ java_classify_record (tree type)
|
||||
if (! CLASS_P (type))
|
||||
return RECORD_IS_STRUCT;
|
||||
|
||||
- /* ??? GDB does not support DW_TAG_interface_type as of December,
|
||||
- 2007. Re-enable this at a later time. */
|
||||
- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
|
||||
+ if (CLASS_INTERFACE (TYPE_NAME (type)))
|
||||
return RECORD_IS_INTERFACE;
|
||||
|
||||
return RECORD_IS_CLASS;
|
||||
44
gcc44-java-nomulti.patch
Normal file
44
gcc44-java-nomulti.patch
Normal file
@ -0,0 +1,44 @@
|
||||
--- libjava/configure.ac.jj 2007-12-07 17:55:50.000000000 +0100
|
||||
+++ libjava/configure.ac 2007-12-07 18:36:56.000000000 +0100
|
||||
@@ -82,6 +82,13 @@ AC_ARG_ENABLE(java-maintainer-mode,
|
||||
[allow rebuilding of .class and .h files]))
|
||||
AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
|
||||
|
||||
+AC_ARG_ENABLE(libjava-multilib,
|
||||
+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
|
||||
+if test "$enable_libjava_multilib" = no; then
|
||||
+ multilib=no
|
||||
+ ac_configure_args="$ac_configure_args --disable-multilib"
|
||||
+fi
|
||||
+
|
||||
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
|
||||
GCC_NO_EXECUTABLES
|
||||
|
||||
--- libjava/configure.jj 2007-12-07 17:55:50.000000000 +0100
|
||||
+++ libjava/configure 2007-12-07 18:39:58.000000000 +0100
|
||||
@@ -1021,6 +1021,8 @@ Optional Features:
|
||||
default=yes
|
||||
--enable-java-maintainer-mode
|
||||
allow rebuilding of .class and .h files
|
||||
+ --enable-libjava-multilib
|
||||
+ build libjava as multilib
|
||||
--disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors
|
||||
--enable-maintainer-mode enable make rules and dependencies not useful
|
||||
@@ -1973,6 +1975,16 @@ else
|
||||
fi
|
||||
|
||||
|
||||
+# Check whether --enable-libjava-multilib was given.
|
||||
+if test "${enable_libjava_multilib+set}" = set; then
|
||||
+ enableval=$enable_libjava_multilib;
|
||||
+fi
|
||||
+
|
||||
+if test "$enable_libjava_multilib" = no; then
|
||||
+ multilib=no
|
||||
+ ac_configure_args="$ac_configure_args --disable-multilib"
|
||||
+fi
|
||||
+
|
||||
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
|
||||
|
||||
|
||||
17
gcc44-libgomp-omp_h-multilib.patch
Normal file
17
gcc44-libgomp-omp_h-multilib.patch
Normal file
@ -0,0 +1,17 @@
|
||||
2008-06-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs.
|
||||
|
||||
--- libgomp/omp.h.in.jj 2008-06-09 13:34:05.000000000 +0200
|
||||
+++ libgomp/omp.h.in 2008-06-09 13:34:48.000000000 +0200
|
||||
@@ -42,8 +42,8 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
- unsigned char _x[@OMP_NEST_LOCK_SIZE@]
|
||||
- __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@)));
|
||||
+ unsigned char _x[8 + sizeof (void *)]
|
||||
+ __attribute__((__aligned__(sizeof (void *))));
|
||||
} omp_nest_lock_t;
|
||||
#endif
|
||||
|
||||
27
gcc44-libtool-no-rpath.patch
Normal file
27
gcc44-libtool-no-rpath.patch
Normal file
@ -0,0 +1,27 @@
|
||||
libtool sucks.
|
||||
--- ltmain.sh.jj 2007-12-07 14:53:21.000000000 +0100
|
||||
+++ ltmain.sh 2008-09-05 21:51:48.000000000 +0200
|
||||
@@ -5394,6 +5394,7 @@ EOF
|
||||
rpath="$finalize_rpath"
|
||||
test "$mode" != relink && rpath="$compile_rpath$rpath"
|
||||
for libdir in $rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -6071,6 +6072,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $compile_rpath $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -6120,6 +6122,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
86
gcc44-ppc32-retaddr.patch
Normal file
86
gcc44-ppc32-retaddr.patch
Normal file
@ -0,0 +1,86 @@
|
||||
2005-11-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
|
||||
read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
|
||||
instead of doing an extran indirection from frame_pointer_rtx.
|
||||
|
||||
* gcc.dg/20051128-1.c: New test.
|
||||
|
||||
--- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100
|
||||
+++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100
|
||||
@@ -13166,17 +13166,22 @@ rs6000_return_addr (int count, rtx frame
|
||||
don't try to be too clever here. */
|
||||
if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
|
||||
{
|
||||
+ rtx x;
|
||||
cfun->machine->ra_needs_full_frame = 1;
|
||||
|
||||
- return
|
||||
- gen_rtx_MEM
|
||||
- (Pmode,
|
||||
- memory_address
|
||||
- (Pmode,
|
||||
- plus_constant (copy_to_reg
|
||||
- (gen_rtx_MEM (Pmode,
|
||||
- memory_address (Pmode, frame))),
|
||||
- RETURN_ADDRESS_OFFSET)));
|
||||
+ if (count == 0)
|
||||
+ {
|
||||
+ gcc_assert (frame == frame_pointer_rtx);
|
||||
+ x = arg_pointer_rtx;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ x = memory_address (Pmode, frame);
|
||||
+ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
|
||||
+ }
|
||||
+
|
||||
+ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
|
||||
+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
|
||||
}
|
||||
|
||||
cfun->machine->ra_need_lr = 1;
|
||||
--- gcc/testsuite/gcc.dg/20051128-1.c.jj 2005-10-10 11:21:41.096999000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/20051128-1.c 2005-11-28 12:30:57.000000000 +0100
|
||||
@@ -0,0 +1,41 @@
|
||||
+/* { dg-do run } */
|
||||
+/* { dg-options "-O2 -fpic" } */
|
||||
+
|
||||
+extern void exit (int);
|
||||
+extern void abort (void);
|
||||
+
|
||||
+int b;
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ void *pad[147];
|
||||
+ void *ra, *h;
|
||||
+ long o;
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+__attribute__((noinline))
|
||||
+foo (struct A *a, void *x)
|
||||
+{
|
||||
+ __builtin_memset (a, 0, sizeof (a));
|
||||
+ if (!b)
|
||||
+ exit (0);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+__attribute__((noinline))
|
||||
+bar (void)
|
||||
+{
|
||||
+ struct A a;
|
||||
+
|
||||
+ __builtin_unwind_init ();
|
||||
+ foo (&a, __builtin_return_address (0));
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ bar ();
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
||||
16
gcc44-pr27898.patch
Normal file
16
gcc44-pr27898.patch
Normal file
@ -0,0 +1,16 @@
|
||||
2006-08-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/27898
|
||||
* gcc.dg/pr27898.c: New test.
|
||||
|
||||
--- gcc/testsuite/gcc.dg/pr27898.c.jj 2006-08-18 09:19:33.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/pr27898.c 2006-08-18 09:19:27.000000000 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+/* PR c/27898 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "--combine" } */
|
||||
+/* { dg-additional-sources "pr27898.c" } */
|
||||
+
|
||||
+union u { struct { int i; }; };
|
||||
+
|
||||
+extern int foo (union u *);
|
||||
19
gcc44-pr32139.patch
Normal file
19
gcc44-pr32139.patch
Normal file
@ -0,0 +1,19 @@
|
||||
2007-06-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/32139
|
||||
* gcc.c-torture/compile/20070531-1.c: New test.
|
||||
|
||||
--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* PR tree-optimization/32139 */
|
||||
+int foo (void);
|
||||
+int bar (void) __attribute__ ((const));
|
||||
+
|
||||
+int
|
||||
+test (int x)
|
||||
+{
|
||||
+ int a = (x == 10000 ? foo : bar) ();
|
||||
+ int b = (x == 10000 ? foo : bar) ();
|
||||
+ return a + b;
|
||||
+}
|
||||
153
gcc44-pr33763.patch
Normal file
153
gcc44-pr33763.patch
Normal file
@ -0,0 +1,153 @@
|
||||
2007-11-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33763
|
||||
* gcc.dg/pr33763.c: New test.
|
||||
* g++.dg/opt/inline13.C: New test.
|
||||
|
||||
2007-11-06 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR tree-optimization/33763
|
||||
* tree-inline.c (expand_call_inline): Silently ignore always_inline
|
||||
attribute for redefined extern inline functions.
|
||||
|
||||
--- gcc/tree-inline.c.jj 2007-11-06 09:29:04.000000000 +0100
|
||||
+++ gcc/tree-inline.c 2007-11-06 16:19:12.000000000 +0100
|
||||
@@ -3157,6 +3157,12 @@ expand_call_inline (basic_block bb, gimp
|
||||
goto egress;
|
||||
|
||||
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
|
||||
+ /* For extern inline functions that get redefined we always
|
||||
+ silently ignored alway_inline flag. Better behaviour would
|
||||
+ be to be able to keep both bodies and use extern inline body
|
||||
+ for inlining, but we can't do that because frontends overwrite
|
||||
+ the body. */
|
||||
+ && !cg_edge->callee->local.redefined_extern_inline
|
||||
/* Avoid warnings during early inline pass. */
|
||||
&& cgraph_global_info_ready)
|
||||
{
|
||||
--- gcc/testsuite/gcc.dg/pr33763.c.jj 2007-11-06 16:19:12.000000000 +0100
|
||||
+++ gcc/testsuite/gcc.dg/pr33763.c 2007-11-06 16:19:12.000000000 +0100
|
||||
@@ -0,0 +1,60 @@
|
||||
+/* PR tree-optimization/33763 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ void *a;
|
||||
+ void *b;
|
||||
+} T;
|
||||
+extern void *foo (const char *, const char *);
|
||||
+extern void *bar (void *, const char *, T);
|
||||
+extern int baz (const char *, int);
|
||||
+
|
||||
+extern inline __attribute__ ((always_inline, gnu_inline)) int
|
||||
+baz (const char *x, int y)
|
||||
+{
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+baz (const char *x, int y)
|
||||
+{
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int xa, xb;
|
||||
+
|
||||
+static void *
|
||||
+inl (const char *x, const char *y)
|
||||
+{
|
||||
+ T t = { &xa, &xb };
|
||||
+ int *f = (int *) __builtin_malloc (sizeof (int));
|
||||
+ const char *z;
|
||||
+ int o = 0;
|
||||
+ void *r = 0;
|
||||
+
|
||||
+ for (z = y; *z; z++)
|
||||
+ {
|
||||
+ if (*z == 'r')
|
||||
+ o |= 1;
|
||||
+ if (*z == 'w')
|
||||
+ o |= 2;
|
||||
+ }
|
||||
+ if (o == 1)
|
||||
+ *f = baz (x, 0);
|
||||
+ if (o == 2)
|
||||
+ *f = baz (x, 1);
|
||||
+ if (o == 3)
|
||||
+ *f = baz (x, 2);
|
||||
+
|
||||
+ if (o && *f > 0)
|
||||
+ r = bar (f, "w", t);
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+foo (const char *x, const char *y)
|
||||
+{
|
||||
+ return inl (x, y);
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/opt/inline13.C.jj 2007-11-06 16:20:20.000000000 +0100
|
||||
+++ gcc/testsuite/g++.dg/opt/inline13.C 2007-11-06 16:21:30.000000000 +0100
|
||||
@@ -0,0 +1,60 @@
|
||||
+// PR tree-optimization/33763
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2" }
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ void *a;
|
||||
+ void *b;
|
||||
+} T;
|
||||
+extern void *foo (const char *, const char *);
|
||||
+extern void *bar (void *, const char *, T);
|
||||
+extern int baz (const char *, int);
|
||||
+
|
||||
+extern inline __attribute__ ((always_inline, gnu_inline)) int
|
||||
+baz (const char *x, int y)
|
||||
+{
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+baz (const char *x, int y)
|
||||
+{
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int xa, xb;
|
||||
+
|
||||
+static void *
|
||||
+inl (const char *x, const char *y)
|
||||
+{
|
||||
+ T t = { &xa, &xb };
|
||||
+ int *f = (int *) __builtin_malloc (sizeof (int));
|
||||
+ const char *z;
|
||||
+ int o = 0;
|
||||
+ void *r = 0;
|
||||
+
|
||||
+ for (z = y; *z; z++)
|
||||
+ {
|
||||
+ if (*z == 'r')
|
||||
+ o |= 1;
|
||||
+ if (*z == 'w')
|
||||
+ o |= 2;
|
||||
+ }
|
||||
+ if (o == 1)
|
||||
+ *f = baz (x, 0);
|
||||
+ if (o == 2)
|
||||
+ *f = baz (x, 1);
|
||||
+ if (o == 3)
|
||||
+ *f = baz (x, 2);
|
||||
+
|
||||
+ if (o && *f > 0)
|
||||
+ r = bar (f, "w", t);
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+foo (const char *x, const char *y)
|
||||
+{
|
||||
+ return inl (x, y);
|
||||
+}
|
||||
133
gcc44-pr39175.patch
Normal file
133
gcc44-pr39175.patch
Normal file
@ -0,0 +1,133 @@
|
||||
2009-02-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/39175
|
||||
* c-common.c (c_determine_visibility): If visibility changed and
|
||||
DECL_RTL has been already set, call make_decl_rtl to update symbol
|
||||
flags.
|
||||
|
||||
* decl2.c (determine_visibility): If visibility changed and
|
||||
DECL_RTL has been already set, call make_decl_rtl to update symbol
|
||||
flags.
|
||||
|
||||
* gcc.dg/visibility-20.c: New test.
|
||||
* g++.dg/ext/visibility/visibility-11.C: New test.
|
||||
|
||||
--- gcc/c-common.c.jj 2009-02-09 23:07:06.000000000 +0100
|
||||
+++ gcc/c-common.c 2009-02-13 12:05:41.000000000 +0100
|
||||
@@ -1,6 +1,7 @@
|
||||
/* Subroutines shared by all languages that are variants of C.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
+ Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
@@ -6249,8 +6250,18 @@ c_determine_visibility (tree decl)
|
||||
visibility_specified depending on #pragma GCC visibility. */
|
||||
if (!DECL_VISIBILITY_SPECIFIED (decl))
|
||||
{
|
||||
- DECL_VISIBILITY (decl) = default_visibility;
|
||||
- DECL_VISIBILITY_SPECIFIED (decl) = visibility_options.inpragma;
|
||||
+ if (visibility_options.inpragma
|
||||
+ || DECL_VISIBILITY (decl) != default_visibility)
|
||||
+ {
|
||||
+ DECL_VISIBILITY (decl) = default_visibility;
|
||||
+ DECL_VISIBILITY_SPECIFIED (decl) = visibility_options.inpragma;
|
||||
+ /* If visibility changed and DECL already has DECL_RTL, ensure
|
||||
+ symbol flags are updated. */
|
||||
+ if (((TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl))
|
||||
+ || TREE_CODE (decl) == FUNCTION_DECL)
|
||||
+ && DECL_RTL_SET_P (decl))
|
||||
+ make_decl_rtl (decl);
|
||||
+ }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
--- gcc/cp/decl2.c.jj 2009-01-26 15:24:39.000000000 +0100
|
||||
+++ gcc/cp/decl2.c 2009-02-13 12:10:53.000000000 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Process declarations and variables for C++ compiler.
|
||||
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
|
||||
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
|
||||
Free Software Foundation, Inc.
|
||||
Hacked by Michael Tiemann (tiemann@cygnus.com)
|
||||
|
||||
@@ -1921,6 +1921,8 @@ determine_visibility (tree decl)
|
||||
{
|
||||
tree class_type = NULL_TREE;
|
||||
bool use_template;
|
||||
+ bool orig_visibility_specified;
|
||||
+ enum symbol_visibility orig_visibility;
|
||||
|
||||
/* Remember that all decls get VISIBILITY_DEFAULT when built. */
|
||||
|
||||
@@ -1933,6 +1935,9 @@ determine_visibility (tree decl)
|
||||
maybe_clone_body. */
|
||||
gcc_assert (!DECL_CLONED_FUNCTION_P (decl));
|
||||
|
||||
+ orig_visibility_specified = DECL_VISIBILITY_SPECIFIED (decl);
|
||||
+ orig_visibility = DECL_VISIBILITY (decl);
|
||||
+
|
||||
if (TREE_CODE (decl) == TYPE_DECL)
|
||||
{
|
||||
if (CLASS_TYPE_P (TREE_TYPE (decl)))
|
||||
@@ -2061,6 +2066,15 @@ determine_visibility (tree decl)
|
||||
|| ! DECL_VISIBILITY_SPECIFIED (decl))
|
||||
constrain_visibility (decl, tvis);
|
||||
}
|
||||
+
|
||||
+ /* If visibility changed and DECL already has DECL_RTL, ensure
|
||||
+ symbol flags are updated. */
|
||||
+ if ((DECL_VISIBILITY (decl) != orig_visibility
|
||||
+ || DECL_VISIBILITY_SPECIFIED (decl) != orig_visibility_specified)
|
||||
+ && ((TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl))
|
||||
+ || TREE_CODE (decl) == FUNCTION_DECL)
|
||||
+ && DECL_RTL_SET_P (decl))
|
||||
+ make_decl_rtl (decl);
|
||||
}
|
||||
|
||||
/* By default, static data members and function members receive
|
||||
--- gcc/testsuite/gcc.dg/visibility-20.c.jj 2009-02-13 12:24:42.000000000 +0100
|
||||
+++ gcc/testsuite/gcc.dg/visibility-20.c 2009-02-13 12:27:00.000000000 +0100
|
||||
@@ -0,0 +1,18 @@
|
||||
+/* PR target/39175 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-require-visibility "" } */
|
||||
+/* { dg-options "-O2 -fvisibility=hidden -fpic" { target fpic } } */
|
||||
+
|
||||
+__attribute__((noinline)) int
|
||||
+foo (int x)
|
||||
+{
|
||||
+ return x;
|
||||
+}
|
||||
+
|
||||
+int foo (int x);
|
||||
+
|
||||
+int
|
||||
+bar (int x)
|
||||
+{
|
||||
+ return foo (x);
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/ext/visibility/visibility-11.C.jj 2009-02-13 12:25:19.000000000 +0100
|
||||
+++ gcc/testsuite/g++.dg/ext/visibility/visibility-11.C 2009-02-13 12:27:09.000000000 +0100
|
||||
@@ -0,0 +1,18 @@
|
||||
+// PR target/39175
|
||||
+// { dg-do compile }
|
||||
+// { dg-require-visibility "" }
|
||||
+// { dg-options "-O2 -fvisibility=hidden -fpic" { target fpic } }
|
||||
+
|
||||
+__attribute__((noinline)) int
|
||||
+foo (int x)
|
||||
+{
|
||||
+ return x;
|
||||
+}
|
||||
+
|
||||
+int foo (int x);
|
||||
+
|
||||
+int
|
||||
+bar (int x)
|
||||
+{
|
||||
+ return foo (x);
|
||||
+}
|
||||
1492
gcc44-raw-string.patch
Normal file
1492
gcc44-raw-string.patch
Normal file
File diff suppressed because it is too large
Load Diff
34
gcc44-rh330771.patch
Normal file
34
gcc44-rh330771.patch
Normal file
@ -0,0 +1,34 @@
|
||||
2007-10-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* Makefile.am (libgcj_tools_la_LIBADD): Add.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
--- libjava/Makefile.am.jj 2007-03-17 09:20:30.000000000 +0100
|
||||
+++ libjava/Makefile.am 2007-10-16 15:45:14.000000000 +0200
|
||||
@@ -277,6 +277,8 @@ EXTRA_libgcj_la_SOURCES = java/lang/Obje
|
||||
|
||||
libgcj_tools_la_SOURCES = classpath/tools/tools.zip
|
||||
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
|
||||
+## See jv_convert_LDADD.
|
||||
+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
|
||||
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
|
||||
--- libjava/Makefile.in.jj 2007-07-04 21:11:11.000000000 +0200
|
||||
+++ libjava/Makefile.in 2007-10-16 15:56:07.000000000 +0200
|
||||
@@ -153,7 +153,6 @@ am__objects_1 = gnu/gcj/xlib/lib_gnu_awt
|
||||
am_lib_gnu_awt_xlib_la_OBJECTS = $(am__objects_1)
|
||||
lib_gnu_awt_xlib_la_OBJECTS = $(am_lib_gnu_awt_xlib_la_OBJECTS)
|
||||
@XLIB_AWT_TRUE@am_lib_gnu_awt_xlib_la_rpath = -rpath $(toolexeclibdir)
|
||||
-libgcj_tools_la_LIBADD =
|
||||
am_libgcj_tools_la_OBJECTS = classpath/tools/libgcj_tools_la-tools.lo
|
||||
libgcj_tools_la_OBJECTS = $(am_libgcj_tools_la_OBJECTS)
|
||||
@INTERPRETER_TRUE@am__DEPENDENCIES_1 = gnu/classpath/jdwp.lo \
|
||||
@@ -941,6 +940,7 @@ libgcj_la_LINK = $(LIBLINK)
|
||||
EXTRA_libgcj_la_SOURCES = java/lang/Object.java
|
||||
libgcj_tools_la_SOURCES = classpath/tools/tools.zip
|
||||
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
|
||||
+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
|
||||
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
|
||||
28
gcc44-rh341221.patch
Normal file
28
gcc44-rh341221.patch
Normal file
@ -0,0 +1,28 @@
|
||||
2007-10-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* doc/Makefile.am (POD2MAN): Set date from cp-tools.texinfo
|
||||
timestamp rather than from current date.
|
||||
* doc/Makefile.in: Regenerated.
|
||||
|
||||
--- libjava/classpath/doc/Makefile.am.jj 2007-12-07 17:55:00.000000000 +0100
|
||||
+++ libjava/classpath/doc/Makefile.am 2007-12-07 18:55:28.000000000 +0100
|
||||
@@ -31,7 +31,7 @@ TOOLS_MANFILES = \
|
||||
gtnameserv.1 \
|
||||
gjdoc.1
|
||||
|
||||
-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
|
||||
+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
|
||||
TEXI2POD = perl $(srcdir)/texi2pod.pl
|
||||
STAMP = echo timestamp >
|
||||
|
||||
--- libjava/classpath/doc/Makefile.in.jj 2007-12-07 17:55:00.000000000 +0100
|
||||
+++ libjava/classpath/doc/Makefile.in 2007-12-07 18:55:43.000000000 +0100
|
||||
@@ -382,7 +382,7 @@ TOOLS_MANFILES = \
|
||||
gtnameserv.1 \
|
||||
gjdoc.1
|
||||
|
||||
-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
|
||||
+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
|
||||
TEXI2POD = perl $(srcdir)/texi2pod.pl
|
||||
STAMP = echo timestamp >
|
||||
@GENINSRC_FALSE@STAMP_GENINSRC =
|
||||
40
gcc44-sparc-config-detection.patch
Normal file
40
gcc44-sparc-config-detection.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- gcc/config.gcc.jj 2008-04-24 15:42:46.000000000 -0500
|
||||
+++ gcc/config.gcc 2008-04-24 15:44:51.000000000 -0500
|
||||
@@ -2175,7 +2175,7 @@ sparc-*-elf*)
|
||||
tmake_file="sparc/t-elf sparc/t-crtfm"
|
||||
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
|
||||
;;
|
||||
-sparc-*-linux*) # SPARC's running GNU/Linux, libc6
|
||||
+sparc-*-linux* | sparcv9*-*-linux*) # SPARC's running GNU/Linux, libc6
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h"
|
||||
extra_options="${extra_options} sparc/long-double-switch.opt"
|
||||
tmake_file="${tmake_file} sparc/t-linux"
|
||||
@@ -2287,7 +2287,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
|
||||
*) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
|
||||
esac
|
||||
;;
|
||||
-sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
|
||||
+sparc64*-*-linux*) # 64-bit SPARC's running GNU/Linux
|
||||
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h sparc/linux64.h"
|
||||
extra_options="${extra_options} sparc/long-double-switch.opt"
|
||||
tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
|
||||
--- libgcc/config.host.jj 2008-04-24 15:46:19.000000000 -0500
|
||||
+++ libgcc/config.host 2008-04-24 15:46:49.000000000 -0500
|
||||
@@ -572,7 +572,7 @@ sparc64-*-openbsd*)
|
||||
;;
|
||||
sparc-*-elf*)
|
||||
;;
|
||||
-sparc-*-linux*) # SPARC's running GNU/Linux, libc6
|
||||
+sparc-*-linux* | sparcv9*-*-linux*) # SPARC's running GNU/Linux, libc6
|
||||
extra_parts="$extra_parts crtfastmath.o"
|
||||
tmake_file="${tmake_file} sparc/t-crtfm"
|
||||
;;
|
||||
@@ -590,7 +590,7 @@ sparc-wrs-vxworks)
|
||||
;;
|
||||
sparc64-*-freebsd*|ultrasparc-*-freebsd*)
|
||||
;;
|
||||
-sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
|
||||
+sparc64*-*-linux*) # 64-bit SPARC's running GNU/Linux
|
||||
extra_parts="$extra_parts crtfastmath.o"
|
||||
tmake_file="${tmake_file} sparc/t-crtfm"
|
||||
;;
|
||||
483
libgcc_post_upgrade.c
Normal file
483
libgcc_post_upgrade.c
Normal file
@ -0,0 +1,483 @@
|
||||
#ifdef __sparc__
|
||||
register void *__thread_self __asm ("g7");
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <syscall.h>
|
||||
|
||||
#if defined __i386__
|
||||
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
({ \
|
||||
register unsigned int resultvar; \
|
||||
asm volatile ( \
|
||||
"movl %1, %%eax\n\t" \
|
||||
"int $0x80\n\t" \
|
||||
: "=a" (resultvar) \
|
||||
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
|
||||
(int) resultvar; })
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned int) (val) >= 0xfffff001u)
|
||||
# define ASMFMT_0()
|
||||
# define ASMFMT_1(arg1) \
|
||||
, "b" (arg1)
|
||||
# define ASMFMT_2(arg1, arg2) \
|
||||
, "b" (arg1), "c" (arg2)
|
||||
# define ASMFMT_3(arg1, arg2, arg3) \
|
||||
, "b" (arg1), "c" (arg2), "d" (arg3)
|
||||
#elif defined __x86_64__
|
||||
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
|
||||
({ \
|
||||
unsigned long resultvar; \
|
||||
LOAD_ARGS_##nr (args) \
|
||||
LOAD_REGS_##nr \
|
||||
asm volatile ( \
|
||||
"syscall\n\t" \
|
||||
: "=a" (resultvar) \
|
||||
: "0" (name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx"); \
|
||||
(long) resultvar; })
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned long) (val) >= -4095L)
|
||||
# define LOAD_ARGS_0()
|
||||
# define LOAD_REGS_0
|
||||
# define ASM_ARGS_0
|
||||
# define LOAD_ARGS_1(a1) \
|
||||
long int __arg1 = (long) (a1); \
|
||||
LOAD_ARGS_0 ()
|
||||
# define LOAD_REGS_1 \
|
||||
register long int _a1 asm ("rdi") = __arg1; \
|
||||
LOAD_REGS_0
|
||||
# define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1)
|
||||
# define LOAD_ARGS_2(a1, a2) \
|
||||
long int __arg2 = (long) (a2); \
|
||||
LOAD_ARGS_1 (a1)
|
||||
# define LOAD_REGS_2 \
|
||||
register long int _a2 asm ("rsi") = __arg2; \
|
||||
LOAD_REGS_1
|
||||
# define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2)
|
||||
# define LOAD_ARGS_3(a1, a2, a3) \
|
||||
long int __arg3 = (long) (a3); \
|
||||
LOAD_ARGS_2 (a1, a2)
|
||||
# define LOAD_REGS_3 \
|
||||
register long int _a3 asm ("rdx") = __arg3; \
|
||||
LOAD_REGS_2
|
||||
# define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3)
|
||||
#elif defined __powerpc__
|
||||
# define INTERNAL_SYSCALL_DECL(err) long int err
|
||||
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
|
||||
({ \
|
||||
register long int r0 __asm__ ("r0"); \
|
||||
register long int r3 __asm__ ("r3"); \
|
||||
register long int r4 __asm__ ("r4"); \
|
||||
register long int r5 __asm__ ("r5"); \
|
||||
register long int r6 __asm__ ("r6"); \
|
||||
register long int r7 __asm__ ("r7"); \
|
||||
register long int r8 __asm__ ("r8"); \
|
||||
LOADARGS_##nr(name, args); \
|
||||
__asm__ __volatile__ \
|
||||
("sc\n\t" \
|
||||
"mfcr %0\n\t" \
|
||||
: "=&r" (r0), \
|
||||
"=&r" (r3), "=&r" (r4), "=&r" (r5), \
|
||||
"=&r" (r6), "=&r" (r7), "=&r" (r8) \
|
||||
: ASM_INPUT_##nr \
|
||||
: "r9", "r10", "r11", "r12", \
|
||||
"cr0", "ctr", "memory"); \
|
||||
err = r0; \
|
||||
(int) r3; \
|
||||
})
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((void) (val), __builtin_expect ((err) & (1 << 28), 0))
|
||||
# define LOADARGS_0(name, dummy) \
|
||||
r0 = name
|
||||
# define LOADARGS_1(name, __arg1) \
|
||||
long int arg1 = (long int) (__arg1); \
|
||||
LOADARGS_0(name, 0); \
|
||||
r3 = arg1
|
||||
# define LOADARGS_2(name, __arg1, __arg2) \
|
||||
long int arg2 = (long int) (__arg2); \
|
||||
LOADARGS_1(name, __arg1); \
|
||||
r4 = arg2
|
||||
# define LOADARGS_3(name, __arg1, __arg2, __arg3) \
|
||||
long int arg3 = (long int) (__arg3); \
|
||||
LOADARGS_2(name, __arg1, __arg2); \
|
||||
r5 = arg3
|
||||
# define ASM_INPUT_0 "0" (r0)
|
||||
# define ASM_INPUT_1 ASM_INPUT_0, "1" (r3)
|
||||
# define ASM_INPUT_2 ASM_INPUT_1, "2" (r4)
|
||||
# define ASM_INPUT_3 ASM_INPUT_2, "3" (r5)
|
||||
#elif defined __ia64__
|
||||
# define DO_INLINE_SYSCALL_NCS(name, nr, args...) \
|
||||
LOAD_ARGS_##nr (args) \
|
||||
register long _r8 asm ("r8"); \
|
||||
register long _r10 asm ("r10"); \
|
||||
register long _r15 asm ("r15") = name; \
|
||||
long _retval; \
|
||||
LOAD_REGS_##nr \
|
||||
__asm __volatile ("break 0x100000;;" \
|
||||
: "=r" (_r8), "=r" (_r10), "=r" (_r15) \
|
||||
ASM_OUTARGS_##nr \
|
||||
: "2" (_r15) ASM_ARGS_##nr \
|
||||
: "memory" ASM_CLOBBERS_##nr); \
|
||||
_retval = _r8;
|
||||
# define INTERNAL_SYSCALL_DECL(err) long int err
|
||||
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
|
||||
({ \
|
||||
DO_INLINE_SYSCALL_NCS (name, nr, args) \
|
||||
err = _r10; \
|
||||
_retval; })
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) (err == -1)
|
||||
# define LOAD_ARGS_0()
|
||||
# define LOAD_REGS_0
|
||||
# define LOAD_ARGS_1(a1) \
|
||||
long _arg1 = (long) (a1); \
|
||||
LOAD_ARGS_0 ()
|
||||
# define LOAD_REGS_1 \
|
||||
register long _out0 asm ("out0") = _arg1; \
|
||||
LOAD_REGS_0
|
||||
# define LOAD_ARGS_2(a1, a2) \
|
||||
long _arg2 = (long) (a2); \
|
||||
LOAD_ARGS_1 (a1)
|
||||
# define LOAD_REGS_2 \
|
||||
register long _out1 asm ("out1") = _arg2; \
|
||||
LOAD_REGS_1
|
||||
# define LOAD_ARGS_3(a1, a2, a3) \
|
||||
long _arg3 = (long) (a3); \
|
||||
LOAD_ARGS_2 (a1, a2)
|
||||
# define LOAD_REGS_3 \
|
||||
register long _out2 asm ("out2") = _arg3; \
|
||||
LOAD_REGS_2
|
||||
# define ASM_OUTARGS_0
|
||||
# define ASM_OUTARGS_1 ASM_OUTARGS_0, "=r" (_out0)
|
||||
# define ASM_OUTARGS_2 ASM_OUTARGS_1, "=r" (_out1)
|
||||
# define ASM_OUTARGS_3 ASM_OUTARGS_2, "=r" (_out2)
|
||||
# define ASM_ARGS_0
|
||||
# define ASM_ARGS_1 ASM_ARGS_0, "3" (_out0)
|
||||
# define ASM_ARGS_2 ASM_ARGS_1, "4" (_out1)
|
||||
# define ASM_ARGS_3 ASM_ARGS_2, "5" (_out2)
|
||||
# define ASM_CLOBBERS_0 ASM_CLOBBERS_1, "out0"
|
||||
# define ASM_CLOBBERS_1 ASM_CLOBBERS_2, "out1"
|
||||
# define ASM_CLOBBERS_2 ASM_CLOBBERS_3, "out2"
|
||||
# define ASM_CLOBBERS_3 ASM_CLOBBERS_4, "out3"
|
||||
# define ASM_CLOBBERS_4 ASM_CLOBBERS_5, "out4"
|
||||
# define ASM_CLOBBERS_5 ASM_CLOBBERS_6, "out5"
|
||||
# define ASM_CLOBBERS_6_COMMON , "out6", "out7", \
|
||||
/* Non-stacked integer registers, minus r8, r10, r15. */ \
|
||||
"r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18", \
|
||||
"r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", \
|
||||
"r28", "r29", "r30", "r31", \
|
||||
/* Predicate registers. */ \
|
||||
"p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \
|
||||
/* Non-rotating fp registers. */ \
|
||||
"f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
|
||||
/* Branch registers. */ \
|
||||
"b6"
|
||||
# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON , "b7"
|
||||
#elif defined __s390__
|
||||
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
# define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...) \
|
||||
({ \
|
||||
DECLARGS_##nr(args) \
|
||||
register long _ret asm("2"); \
|
||||
asm volatile ( \
|
||||
"svc %b1\n\t" \
|
||||
: "=d" (_ret) \
|
||||
: "i" (__NR_##name) ASMFMT_##nr \
|
||||
: "memory" ); \
|
||||
_ret; })
|
||||
# define INTERNAL_SYSCALL_SVC0(name, err, nr, args...) \
|
||||
({ \
|
||||
DECLARGS_##nr(args) \
|
||||
register unsigned long _nr asm("1") = (unsigned long)(__NR_##name); \
|
||||
register long _ret asm("2"); \
|
||||
asm volatile ( \
|
||||
"svc 0\n\t" \
|
||||
: "=d" (_ret) \
|
||||
: "d" (_nr) ASMFMT_##nr \
|
||||
: "memory" ); \
|
||||
_ret; })
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
(((__NR_##name) < 256) ? \
|
||||
INTERNAL_SYSCALL_DIRECT(name, err, nr, args) : \
|
||||
INTERNAL_SYSCALL_SVC0(name, err,nr, args))
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned long) (val) >= -4095UL)
|
||||
# define DECLARGS_0()
|
||||
# define DECLARGS_1(arg1) \
|
||||
register unsigned long gpr2 asm ("2") = (unsigned long)(arg1);
|
||||
# define DECLARGS_2(arg1, arg2) \
|
||||
DECLARGS_1(arg1) \
|
||||
register unsigned long gpr3 asm ("3") = (unsigned long)(arg2);
|
||||
# define DECLARGS_3(arg1, arg2, arg3) \
|
||||
DECLARGS_2(arg1, arg2) \
|
||||
register unsigned long gpr4 asm ("4") = (unsigned long)(arg3);
|
||||
# define ASMFMT_0
|
||||
# define ASMFMT_1 , "0" (gpr2)
|
||||
# define ASMFMT_2 , "0" (gpr2), "d" (gpr3)
|
||||
# define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
|
||||
#elif defined __sparc__
|
||||
# ifndef __arch64__
|
||||
# define __INTERNAL_SYSCALL_STRING \
|
||||
"ta 0x10;" \
|
||||
"bcs,a 1f;" \
|
||||
" sub %%g0, %%o0, %%o0;" \
|
||||
"1:"
|
||||
# define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g6", \
|
||||
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
|
||||
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
|
||||
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
|
||||
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
|
||||
"cc", "memory"
|
||||
# else
|
||||
# define __INTERNAL_SYSCALL_STRING \
|
||||
"ta 0x6d;" \
|
||||
"bcs,a,pt %%xcc, 1f;" \
|
||||
" sub %%g0, %%o0, %%o0;" \
|
||||
"1:"
|
||||
# define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g6", \
|
||||
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
|
||||
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
|
||||
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
|
||||
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
|
||||
"f32", "f34", "f36", "f38", "f40", "f42", "f44", "f46", \
|
||||
"f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62", \
|
||||
"cc", "memory"
|
||||
# endif
|
||||
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
#define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
inline_syscall##nr(__INTERNAL_SYSCALL_STRING, __NR_##name, args)
|
||||
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned long) (val) >= -515L)
|
||||
# define inline_syscall0(string,name,dummy...) \
|
||||
({ \
|
||||
register long __o0 __asm__ ("o0"); \
|
||||
register long __g1 __asm__ ("g1") = name; \
|
||||
__asm __volatile (string : "=r" (__g1), "=r" (__o0) : \
|
||||
"0" (__g1) : \
|
||||
__SYSCALL_CLOBBERS); \
|
||||
__o0; \
|
||||
})
|
||||
# define inline_syscall1(string,name,arg1) \
|
||||
({ \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __g1 __asm__ ("g1") = name; \
|
||||
__asm __volatile (string : "=r" (__g1), "=r" (__o0) : \
|
||||
"0" (__g1), "1" (__o0) : \
|
||||
__SYSCALL_CLOBBERS); \
|
||||
__o0; \
|
||||
})
|
||||
# define inline_syscall2(string,name,arg1,arg2) \
|
||||
({ \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __o1 __asm__ ("o1") = (long)(arg2); \
|
||||
register long __g1 __asm__ ("g1") = name; \
|
||||
__asm __volatile (string : "=r" (__g1), "=r" (__o0) : \
|
||||
"0" (__g1), "1" (__o0), "r" (__o1) : \
|
||||
__SYSCALL_CLOBBERS); \
|
||||
__o0; \
|
||||
})
|
||||
# define inline_syscall3(string,name,arg1,arg2,arg3) \
|
||||
({ \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __o1 __asm__ ("o1") = (long)(arg2); \
|
||||
register long __o2 __asm__ ("o2") = (long)(arg3); \
|
||||
register long __g1 __asm__ ("g1") = name; \
|
||||
__asm __volatile (string : "=r" (__g1), "=r" (__o0) : \
|
||||
"0" (__g1), "1" (__o0), "r" (__o1), \
|
||||
"r" (__o2) : \
|
||||
__SYSCALL_CLOBBERS); \
|
||||
__o0; \
|
||||
})
|
||||
#elif defined __alpha__
|
||||
# define INTERNAL_SYSCALL(name, err_out, nr, args...) \
|
||||
INTERNAL_SYSCALL1(name, err_out, nr, args)
|
||||
# define INTERNAL_SYSCALL1(name, err_out, nr, args...) \
|
||||
INTERNAL_SYSCALL_NCS(__NR_##name, err_out, nr, args)
|
||||
# define INTERNAL_SYSCALL_NCS(name, err_out, nr, args...) \
|
||||
({ \
|
||||
long _sc_ret, _sc_err; \
|
||||
inline_syscall##nr(name, args); \
|
||||
err_out = _sc_err; \
|
||||
_sc_ret; \
|
||||
})
|
||||
# define INTERNAL_SYSCALL_DECL(err) long int err
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) err
|
||||
# define inline_syscall_clobbers \
|
||||
"$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
|
||||
"$22", "$23", "$24", "$25", "$27", "$28", "memory"
|
||||
# define inline_syscall_r0_asm
|
||||
# define inline_syscall_r0_out_constraint "=v"
|
||||
# define inline_syscall0(name, args...) \
|
||||
{ \
|
||||
register long _sc_0 inline_syscall_r0_asm; \
|
||||
register long _sc_19 __asm__("$19"); \
|
||||
\
|
||||
_sc_0 = name; \
|
||||
__asm__ __volatile__ \
|
||||
("callsys # %0 %1 <= %2" \
|
||||
: inline_syscall_r0_out_constraint (_sc_0), \
|
||||
"=r"(_sc_19) \
|
||||
: "0"(_sc_0) \
|
||||
: inline_syscall_clobbers, \
|
||||
"$16", "$17", "$18", "$20", "$21"); \
|
||||
_sc_ret = _sc_0, _sc_err = _sc_19; \
|
||||
}
|
||||
# define inline_syscall1(name,arg1) \
|
||||
{ \
|
||||
register long _sc_0 inline_syscall_r0_asm; \
|
||||
register long _sc_16 __asm__("$16"); \
|
||||
register long _sc_19 __asm__("$19"); \
|
||||
\
|
||||
_sc_0 = name; \
|
||||
_sc_16 = (long) (arg1); \
|
||||
__asm__ __volatile__ \
|
||||
("callsys # %0 %1 <= %2 %3" \
|
||||
: inline_syscall_r0_out_constraint (_sc_0), \
|
||||
"=r"(_sc_19), "=r"(_sc_16) \
|
||||
: "0"(_sc_0), "2"(_sc_16) \
|
||||
: inline_syscall_clobbers, \
|
||||
"$17", "$18", "$20", "$21"); \
|
||||
_sc_ret = _sc_0, _sc_err = _sc_19; \
|
||||
}
|
||||
# define inline_syscall2(name,arg1,arg2) \
|
||||
{ \
|
||||
register long _sc_0 inline_syscall_r0_asm; \
|
||||
register long _sc_16 __asm__("$16"); \
|
||||
register long _sc_17 __asm__("$17"); \
|
||||
register long _sc_19 __asm__("$19"); \
|
||||
\
|
||||
_sc_0 = name; \
|
||||
_sc_16 = (long) (arg1); \
|
||||
_sc_17 = (long) (arg2); \
|
||||
__asm__ __volatile__ \
|
||||
("callsys # %0 %1 <= %2 %3 %4" \
|
||||
: inline_syscall_r0_out_constraint (_sc_0), \
|
||||
"=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \
|
||||
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
|
||||
: inline_syscall_clobbers, \
|
||||
"$18", "$20", "$21"); \
|
||||
_sc_ret = _sc_0, _sc_err = _sc_19; \
|
||||
}
|
||||
# define inline_syscall3(name,arg1,arg2,arg3) \
|
||||
{ \
|
||||
register long _sc_0 inline_syscall_r0_asm; \
|
||||
register long _sc_16 __asm__("$16"); \
|
||||
register long _sc_17 __asm__("$17"); \
|
||||
register long _sc_18 __asm__("$18"); \
|
||||
register long _sc_19 __asm__("$19"); \
|
||||
\
|
||||
_sc_0 = name; \
|
||||
_sc_16 = (long) (arg1); \
|
||||
_sc_17 = (long) (arg2); \
|
||||
_sc_18 = (long) (arg3); \
|
||||
__asm__ __volatile__ \
|
||||
("callsys # %0 %1 <= %2 %3 %4 %5" \
|
||||
: inline_syscall_r0_out_constraint (_sc_0), \
|
||||
"=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
|
||||
"=r"(_sc_18) \
|
||||
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
|
||||
"4"(_sc_18) \
|
||||
: inline_syscall_clobbers, "$20", "$21"); \
|
||||
_sc_ret = _sc_0, _sc_err = _sc_19; \
|
||||
}
|
||||
#elif defined __arm__ && defined __ARM_EABI__
|
||||
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
({ \
|
||||
register int _r0 __asm__("r0"); \
|
||||
register int _nr __asm__("r7"); \
|
||||
LOAD_ARGS_##nr(args) \
|
||||
_nr = __NR_##name; \
|
||||
asm volatile ("swi\t0\t@ syscall " #name "\n\t" \
|
||||
: "=r" (_r0) \
|
||||
: "r" (_nr) ASM_ARGS_##nr \
|
||||
: "memory"); \
|
||||
_r0; })
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned int) (val) >= 0xfffff001u)
|
||||
# define ASM_ARGS_0
|
||||
# define ASM_ARGS_1 , "r" (_r0)
|
||||
# define ASM_ARGS_2 , "r" (_r0), "r" (_r1)
|
||||
# define ASM_ARGS_3 , "r" (_r0), "r" (_r1), "r" (_r2)
|
||||
# define LOAD_ARGS_0()
|
||||
# define LOAD_ARGS_1(r0) \
|
||||
_r0 = (int)r0;
|
||||
# define LOAD_ARGS_2(r0, r1) \
|
||||
_r0 = (int)r0; \
|
||||
register int _r1 __asm__("r1") = (int)r1;
|
||||
# define LOAD_ARGS_3(r0, r1, r2) \
|
||||
_r0 = (int)r0; \
|
||||
register int _r1 __asm__("r1") = (int)r1; \
|
||||
register int _r2 __asm__("r2") = (int)r2;
|
||||
#endif
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
const char *arg[] = { "/sbin/ldconfig", 0 };
|
||||
long ret;
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
ret = INTERNAL_SYSCALL (access, err, 2, arg[0], X_OK);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (ret, err))
|
||||
INTERNAL_SYSCALL (exit, err, 1, 0);
|
||||
INTERNAL_SYSCALL (execve, err, 3, arg[0], arg, &argv[argc + 1]);
|
||||
INTERNAL_SYSCALL (exit, err, 1, 110);
|
||||
return 110;
|
||||
}
|
||||
|
||||
int __libc_multiple_threads __attribute__((nocommon));
|
||||
int __libc_enable_asynccancel (void) { return 0; }
|
||||
void __libc_disable_asynccancel (int x) { }
|
||||
void __libc_csu_init (void) { }
|
||||
void __libc_csu_fini (void) { }
|
||||
pid_t __fork (void) { return -1; }
|
||||
char thr_buf[65536];
|
||||
|
||||
#ifndef __powerpc__
|
||||
int __libc_start_main (int (*main) (int argc, char **argv),
|
||||
int argc, char **argv,
|
||||
void (*init) (void), void (*fini) (void),
|
||||
void (*rtld_fini) (void), void * stack_end)
|
||||
#else
|
||||
struct startup_info
|
||||
{
|
||||
void *sda_base;
|
||||
int (*main) (int, char **, char **, void *);
|
||||
int (*init) (int, char **, char **, void *);
|
||||
void (*fini) (void);
|
||||
};
|
||||
|
||||
int __libc_start_main (int argc, char **argv, char **ev,
|
||||
void *auxvec, void (*rtld_fini) (void),
|
||||
struct startup_info *stinfo,
|
||||
char **stack_on_entry)
|
||||
#endif
|
||||
{
|
||||
#if defined __ia64__ || defined __powerpc64__
|
||||
register void *r13 __asm ("r13") = thr_buf + 32768;
|
||||
__asm ("" : : "r" (r13));
|
||||
#elif defined __sparc__
|
||||
register void *g6 __asm ("g6") = thr_buf + 32768;
|
||||
__thread_self = thr_buf + 32768;
|
||||
__asm ("" : : "r" (g6), "r" (__thread_self));
|
||||
#elif defined __s390__ && !defined __s390x__
|
||||
__asm ("sar %%a0,%0" : : "d" (thr_buf + 32768));
|
||||
#elif defined __s390x__
|
||||
__asm ("sar %%a1,%0; srlg 0,%0,32; sar %%a0,0" : : "d" (thr_buf + 32768) : "0");
|
||||
#elif defined __powerpc__ && !defined __powerpc64__
|
||||
register void *r2 __asm ("r2") = thr_buf + 32768;
|
||||
__asm ("" : : "r" (r2));
|
||||
#endif
|
||||
#ifdef __powerpc__
|
||||
argc = (long)*stack_on_entry;
|
||||
argv = stack_on_entry + 1;
|
||||
#endif
|
||||
main (argc, argv);
|
||||
return 110;
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
diff -rup mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.c mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c
|
||||
--- mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.c 2008-04-24 13:59:01.000000000 -0400
|
||||
+++ mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c 2008-09-02 07:31:12.000000000 -0400
|
||||
@@ -536,7 +536,7 @@ read_integral_parameter (const char *p,
|
||||
for floor_log2 and exact_log2; see toplev.h. That construct, however,
|
||||
conflicts with the ISO C++ One Definition Rule. */
|
||||
|
||||
-#if GCC_VERSION < 3004 || !defined (__cplusplus)
|
||||
+#if GCC_VERSION < 3004
|
||||
|
||||
/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
|
||||
If X is 0, return -1. */
|
||||
diff -rup mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.h mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h
|
||||
--- mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.h 2007-09-23 15:18:27.000000000 -0400
|
||||
+++ mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h 2008-09-03 07:08:46.000000000 -0400
|
||||
@@ -154,12 +154,6 @@ extern void decode_d_option (const char
|
||||
/* Return true iff flags are set as if -ffast-math. */
|
||||
extern bool fast_math_flags_set_p (void);
|
||||
|
||||
-/* Return log2, or -1 if not exact. */
|
||||
-extern int exact_log2 (unsigned HOST_WIDE_INT);
|
||||
-
|
||||
-/* Return floor of log2, with -1 for zero. */
|
||||
-extern int floor_log2 (unsigned HOST_WIDE_INT);
|
||||
-
|
||||
/* Inline versions of the above for speed. */
|
||||
#if GCC_VERSION >= 3004
|
||||
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
|
||||
@@ -173,17 +167,23 @@ extern int floor_log2 (
|
||||
# define CTZ_HWI __builtin_ctz
|
||||
# endif
|
||||
|
||||
-extern inline int
|
||||
+static inline int
|
||||
floor_log2 (unsigned HOST_WIDE_INT x)
|
||||
{
|
||||
return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
|
||||
}
|
||||
|
||||
-extern inline int
|
||||
+static inline int
|
||||
exact_log2 (unsigned HOST_WIDE_INT x)
|
||||
{
|
||||
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
|
||||
}
|
||||
+#else
|
||||
+/* Return log2, or -1 if not exact. */
|
||||
+extern int exact_log2 (unsigned HOST_WIDE_INT);
|
||||
+
|
||||
+/* Return floor of log2, with -1 for zero. */
|
||||
+extern int floor_log2 (unsigned HOST_WIDE_INT);
|
||||
#endif /* GCC_VERSION >= 3004 */
|
||||
|
||||
/* Functions used to get and set GCC's notion of in what directory
|
||||
184
mingw32-gcc.spec
184
mingw32-gcc.spec
@ -1,43 +1,77 @@
|
||||
%define __os_install_post /usr/lib/rpm/brp-compress %{nil}
|
||||
|
||||
%define DATE 20090216
|
||||
%define SVNREV 144214
|
||||
|
||||
Name: mingw32-gcc
|
||||
Version: 4.3.2
|
||||
Release: 12%{?dist}
|
||||
Version: 4.4.0
|
||||
Release: 0.4%{?dist}
|
||||
Summary: MinGW Windows cross-compiler (GCC) for C
|
||||
|
||||
License: GPLv2+
|
||||
License: GPLv3+ and GPLv2+ with exceptions
|
||||
Group: Development/Languages
|
||||
URL: http://www.mingw.org/
|
||||
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-core-%{version}.tar.bz2
|
||||
Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-g++-%{version}.tar.bz2
|
||||
Patch1: %{name}-build.patch
|
||||
|
||||
# We use the same source as Fedora's native gcc.
|
||||
URL: http://gcc.gnu.org
|
||||
Source0: gcc-%{version}-%{DATE}.tar.bz2
|
||||
Source1: libgcc_post_upgrade.c
|
||||
Source2: README.libgcjwebplugin.so
|
||||
Source3: protoize.1
|
||||
Source5: ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.tar.gz
|
||||
|
||||
# Patches from Fedora's native gcc.
|
||||
Patch0: gcc44-hack.patch
|
||||
Patch1: gcc44-build-id.patch
|
||||
Patch2: gcc44-c++-builtin-redecl.patch
|
||||
Patch3: gcc44-ia64-libunwind.patch
|
||||
Patch4: gcc44-java-nomulti.patch
|
||||
Patch5: gcc44-ppc32-retaddr.patch
|
||||
Patch7: gcc44-pr27898.patch
|
||||
Patch8: gcc44-pr32139.patch
|
||||
Patch9: gcc44-pr33763.patch
|
||||
Patch10: gcc44-rh330771.patch
|
||||
Patch11: gcc44-rh341221.patch
|
||||
Patch12: gcc44-java-debug-iface-type.patch
|
||||
Patch13: gcc44-i386-libgomp.patch
|
||||
Patch15: gcc44-sparc-config-detection.patch
|
||||
Patch16: gcc44-libgomp-omp_h-multilib.patch
|
||||
Patch20: gcc44-libtool-no-rpath.patch
|
||||
Patch21: gcc44-cloog-dl.patch
|
||||
Patch22: gcc44-raw-string.patch
|
||||
Patch23: gcc44-pr39175.patch
|
||||
Patch24: gcc44-diff.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: texinfo
|
||||
BuildRequires: mingw32-filesystem >= 39-3
|
||||
BuildRequires: mingw32-filesystem >= 49
|
||||
BuildRequires: mingw32-binutils
|
||||
BuildRequires: mingw32-runtime
|
||||
BuildRequires: mingw32-w32api
|
||||
BuildRequires: gmp-devel
|
||||
%if 0%{?fedora} >= 9
|
||||
BuildRequires: mpfr-devel
|
||||
%endif
|
||||
BuildRequires: libgomp
|
||||
BuildRequires: flex
|
||||
|
||||
# NB: Explicit mingw32-filesystem dependency is REQUIRED here.
|
||||
Requires: mingw32-filesystem >= 39-3
|
||||
Requires: mingw32-filesystem >= 48
|
||||
|
||||
Requires: mingw32-binutils
|
||||
Requires: mingw32-runtime
|
||||
Requires: mingw32-w32api
|
||||
Requires: mingw32-cpp
|
||||
|
||||
# We don't run the automatic dependency scripts which would
|
||||
# normally detect and provide the following DLL:
|
||||
Provides: mingw32(libgcc_s_sjlj-1.dll)
|
||||
|
||||
|
||||
%description
|
||||
MinGW Windows cross-compiler (GCC) for C
|
||||
MinGW Windows cross-compiler (GCC) for C.
|
||||
|
||||
|
||||
%package -n mingw32-cpp
|
||||
Summary: MinGW Windows cross-C Preprocessor.
|
||||
Summary: MinGW Windows cross-C Preprocessor
|
||||
Group: Development/Languages
|
||||
|
||||
%description -n mingw32-cpp
|
||||
@ -47,24 +81,72 @@ MinGW Windows cross-C Preprocessor
|
||||
%package c++
|
||||
Summary: MinGW Windows cross-compiler for C++
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description c++
|
||||
MinGW Windows cross-compiler for C++
|
||||
MinGW Windows cross-compiler for C++.
|
||||
|
||||
|
||||
%package objc
|
||||
Summary: MinGW Windows cross-compiler support for Objective C
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: mingw32-libobjc = %{version}-%{release}
|
||||
|
||||
%description objc
|
||||
MinGW Windows cross-compiler support for Objective C.
|
||||
|
||||
|
||||
%package objc++
|
||||
Summary: MinGW Windows cross-compiler support for Objective C++
|
||||
Group: Development/Languages
|
||||
Requires: %{name}-g++ = %{version}-%{release}
|
||||
Requires: %{name}-objc = %{version}-%{release}
|
||||
|
||||
%description objc++
|
||||
MinGW Windows cross-compiler support for Objective C++.
|
||||
|
||||
|
||||
%package gfortran
|
||||
Summary: MinGW Windows cross-compiler for FORTRAN
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description gfortran
|
||||
MinGW Windows cross-compiler for FORTRAN.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -c
|
||||
%setup -q -D -T -a1
|
||||
%patch1 -p1
|
||||
%setup -q -n gcc-%{version}-%{DATE}
|
||||
%patch0 -p0 -b .hack~
|
||||
%patch1 -p0 -b .build-id~
|
||||
%patch2 -p0 -b .c++-builtin-redecl~
|
||||
%patch3 -p0 -b .ia64-libunwind~
|
||||
%patch4 -p0 -b .java-nomulti~
|
||||
%patch5 -p0 -b .ppc32-retaddr~
|
||||
%patch7 -p0 -b .pr27898~
|
||||
%patch8 -p0 -b .pr32139~
|
||||
%patch9 -p0 -b .pr33763~
|
||||
%patch10 -p0 -b .rh330771~
|
||||
%patch11 -p0 -b .rh341221~
|
||||
%patch12 -p0 -b .java-debug-iface-type~
|
||||
%patch13 -p0 -b .i386-libgomp~
|
||||
%patch15 -p0 -b .sparc-config-detection~
|
||||
%patch16 -p0 -b .libgomp-omp_h-multilib~
|
||||
%patch20 -p0 -b .libtool-no-rpath~
|
||||
%patch21 -p0 -b .cloog-dl~
|
||||
%patch22 -p0 -b .raw-string~
|
||||
%patch23 -p0 -b .pr39175~
|
||||
%patch24 -p0 -b .diff~
|
||||
|
||||
|
||||
%build
|
||||
cd gcc-%{version}
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
pushd build
|
||||
|
||||
languages="c,c++"
|
||||
# GNAT is required to build Ada. Don't build GCJ.
|
||||
#languages="c,c++,objc,obj-c++,java,fortran,ada"
|
||||
languages="c,c++,objc,obj-c++,fortran"
|
||||
|
||||
CC="%{__cc} ${RPM_OPT_FLAGS}" \
|
||||
../configure \
|
||||
@ -85,16 +167,18 @@ CC="%{__cc} ${RPM_OPT_FLAGS}" \
|
||||
--disable-win32-registry \
|
||||
--enable-version-specific-runtime-libs \
|
||||
--with-sysroot=%{_mingw32_sysroot} \
|
||||
--enable-languages="$languages" $optargs
|
||||
--enable-languages="$languages" \
|
||||
--with-bugurl=http://bugzilla.redhat.com/bugzilla
|
||||
|
||||
make all
|
||||
|
||||
popd
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
cd gcc-%{version}
|
||||
cd build
|
||||
pushd build
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
# These files conflict with existing installed files.
|
||||
@ -106,6 +190,18 @@ mkdir -p $RPM_BUILD_ROOT/lib
|
||||
ln -sf ..%{_prefix}/bin/i686-pc-mingw32-cpp \
|
||||
$RPM_BUILD_ROOT/lib/i686-pc-mingw32-cpp
|
||||
|
||||
# Not sure why gcc puts this DLL into _bindir, but surely better if
|
||||
# it goes into _mingw32_bindir.
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/libgcc_s_sjlj-1.dll \
|
||||
$RPM_BUILD_ROOT%{_mingw32_bindir}
|
||||
|
||||
# Don't want the *.la files.
|
||||
find $RPM_BUILD_ROOT -name '*.la' -delete
|
||||
|
||||
popd
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
@ -123,11 +219,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/crtend.o
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/crtfastmath.o
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc_eh.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc_s.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcov.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.la
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp_nonshared.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp_nonshared.la
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.dll.a
|
||||
%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include
|
||||
%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include-fixed
|
||||
%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include/ssp
|
||||
@ -137,8 +234,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/ssp/*.h
|
||||
%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/install-tools
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/install-tools/*
|
||||
%dir %{_libdir}/gcc/i686-pc-mingw32/bin/
|
||||
%{_libdir}/gcc/i686-pc-mingw32/bin/libssp-0.dll
|
||||
%dir %{_libexecdir}/gcc/i686-pc-mingw32/%{version}/install-tools
|
||||
%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/install-tools/*
|
||||
%{_mingw32_bindir}/libgcc_s_sjlj-1.dll
|
||||
%{_mandir}/man1/i686-pc-mingw32-gcc.1*
|
||||
%{_mandir}/man1/i686-pc-mingw32-gcov.1*
|
||||
|
||||
@ -160,14 +260,42 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/i686-pc-mingw32-g++.1*
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/c++/
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libstdc++.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libstdc++.la
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libsupc++.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libsupc++.la
|
||||
%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/cc1plus
|
||||
%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/collect2
|
||||
|
||||
|
||||
%files objc
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/objc/
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libobjc.a
|
||||
%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/cc1obj
|
||||
|
||||
|
||||
%files objc++
|
||||
%defattr(-,root,root)
|
||||
%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/cc1objplus
|
||||
|
||||
|
||||
%files gfortran
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/i686-pc-mingw32-gfortran
|
||||
%{_mandir}/man1/i686-pc-mingw32-gfortran.1*
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgfortran.a
|
||||
%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgfortranbegin.a
|
||||
%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/f951
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 4.4.0-0.4
|
||||
- Rebuild for mingw32-gcc 4.4
|
||||
|
||||
* Thu Feb 19 2009 Richard W.M. Jones <rjones@redhat.com> - 4.4.0-0.2
|
||||
- Move to upstream version 4.4.0-20090216 (same as Fedora native version).
|
||||
- Added FORTRAN support.
|
||||
- Added Objective C support.
|
||||
- Added Objective C++ support.
|
||||
|
||||
* Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-12
|
||||
- Rebuild against latest filesystem package.
|
||||
|
||||
|
||||
291
protoize.1
Normal file
291
protoize.1
Normal file
@ -0,0 +1,291 @@
|
||||
.\" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
|
||||
.\" See section COPYING for conditions for redistribution
|
||||
.\"
|
||||
.TH protoize 1 "8 December 2006" "GCC" "GNU"
|
||||
.SH NAME
|
||||
protoize, unprotoize \- automatically add or remove function prototypes
|
||||
.SH SYNOPSIS
|
||||
.HP 7
|
||||
\fBprotoize\fR [\-CfgklNnqv] [\-B \fIDIRECTORY\fR] [\-c \fICOMPILATION-OPTIONS\fR] [\-d \fIDIRECTORY\fR] [\-i \fISTRING\fR] [\-p \fIPROGRAM\fR] [\-x \fIFILE\fR] [\fIFILE\fR...]
|
||||
.HP 7
|
||||
\fBunprotoize\fR [\-fkNnqv] [\-c \fICOMPILATION-OPTIONS\fR] [\-d \fIDIRECTORY\fR] [\-i \fISTRING\fR] [\-p \fIPROGRAM\fR] [\-x \fIFILE\fR] [\fIFILE\fR...]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBprotoize\fR is an optional part of GCC.
|
||||
You can use it to add prototypes to a program,
|
||||
thus converting the program to ANSI C in one respect.
|
||||
The companion program
|
||||
\fBunprotoize\fR does the reverse: it removes argument types from any prototypes that are found.
|
||||
.PP
|
||||
When you run these programs, you must specify a set of source files
|
||||
as command line arguments.
|
||||
The conversion programs start out by compiling these files
|
||||
to see what functions they define.
|
||||
The information gathered about a file
|
||||
\fIFOO\fR is saved in a file named \fIFOO.X\fR.
|
||||
.PP
|
||||
After scanning comes the actual conversion.
|
||||
The specified files are all eligible to be converted;
|
||||
any files they include (whether sources or just headers) are eligible as well.
|
||||
.PP
|
||||
But not all the eligible files are converted.
|
||||
By default,
|
||||
\fBprotoize\fR and \fBunprotoize\fR
|
||||
convert only source and header files in the current directory.
|
||||
You can specify additional directories whose files
|
||||
should be converted with the
|
||||
\fB\-d\fR \fIDIRECTORY\fR option.
|
||||
You can also specify particular files to exclude with the
|
||||
\fB\-x\fR \fIFILE\fR option.
|
||||
A file is converted if it is eligible, its directory name matches one of the
|
||||
specified directory names, and its name within the directory has not
|
||||
been excluded.
|
||||
.PP
|
||||
Basic conversion with
|
||||
\fBprotoize\fR consists of rewriting most function definitions and function declarations
|
||||
to specify the types of the arguments.
|
||||
The only ones not rewritten are those for varargs functions.
|
||||
.PP
|
||||
\fBprotoize\fR optionally inserts prototype declarations at the beginning of the source file,
|
||||
to make them available for any calls that precede the function's definition.
|
||||
Or it can insert prototype declarations with block scope
|
||||
in the blocks where undeclared functions are called.
|
||||
.PP
|
||||
Basic conversion with
|
||||
\fBunprotoize\fR
|
||||
consists of rewriting most function declarations to remove any argument types,
|
||||
and rewriting function definitions to the old-style pre-ANSI form.
|
||||
.PP
|
||||
Both conversion programs print a warning for any function
|
||||
declaration or definition that they can't convert.
|
||||
You can suppress these warnings with the
|
||||
\fB\-q\fR option.
|
||||
.PP
|
||||
The output from
|
||||
\fBprotoize\fR or \fBunprotoize\fR
|
||||
replaces the original source file.
|
||||
The original file is renamed to a name ending with
|
||||
\fI.save\fR.
|
||||
If the \fI.save\fR file already exists, then the source file is simply discarded.
|
||||
.PP
|
||||
\fBprotoize\fR and \fBunprotoize\fR both depend on
|
||||
\fBgcc\fR\|(1) to scan the program and collect information about the functions it uses.
|
||||
.PP
|
||||
The options are as follows:
|
||||
.TP
|
||||
\fB\-B\fR \fIDIRECTORY\fR
|
||||
Look for the file
|
||||
\fISYSCALLS.c.X\fR in \fIdirectory\fR,
|
||||
instead of the usual directory (normally \fI/usr/local/lib\fR).
|
||||
This file contains prototype information about standard system functions.
|
||||
This option applies only to \fBprotoize\fR.
|
||||
.TP
|
||||
\fB\-C\fR
|
||||
Rename files to end in
|
||||
\fI.C\fR instead of \fI.c\fR.
|
||||
This is convenient if you are converting a C program to C++.
|
||||
This option applies only to
|
||||
\fBprotoize\fR.
|
||||
.TP
|
||||
\fB\-c\fR \fICOMPILATION-OPTIONS\fR
|
||||
Use \fICOMPILATION-OPTIONS\fR as the options when running \fBgcc\fR\|(1) to produce the
|
||||
\fI.X\fR files.
|
||||
The special option \fB\-aux-info\fR is always passed in addition, to tell gcc to write a
|
||||
\fI.X\fR file.
|
||||
Note that the compilation options must be given as a single argument to
|
||||
\fBprotoize\fR or \fBunprotoize\fR.
|
||||
If you want to specify several gcc options, you must quote the entire set of
|
||||
compilation options to make them a single word in the shell.
|
||||
There are certain gcc arguments that you cannot use, because they
|
||||
would produce the wrong kind of output.
|
||||
These include
|
||||
\fB\-g\fR, \fB\-O\fR, \fB\-c\fR, \fB\-S\fR,\fB\-o\fR.
|
||||
If you include these in the \fICOMPILATION-OPTIONS\fR, they are ignored.
|
||||
.TP
|
||||
\fB\-d\fR \fIDIRECTORY\fR
|
||||
Specify additional directories whose files should be converted.
|
||||
.TP
|
||||
\fB\-g\fR
|
||||
Add explicit global declarations.
|
||||
This means inserting explicit declarations at the beginning of each
|
||||
source file for each function that is called in the file and was not declared.
|
||||
These declarations precede the first function definition that contains a
|
||||
call to an undeclared function.
|
||||
This option applies only to
|
||||
.\fBprotoize\fR.
|
||||
.TP
|
||||
\fB\-i\fR \fISTRING\fR
|
||||
Indent old-style parameter declarations with the string
|
||||
\fISTRING\fR.
|
||||
This option applies only to
|
||||
\fBprotoize\fR.
|
||||
\fBunprotoize\fR converts prototyped function definitions to old-style
|
||||
function definitions, where the arguments are declared between the
|
||||
argument list and the initial
|
||||
\fB{\fR.
|
||||
By default,
|
||||
\fBunprotoize\fR uses five spaces as the indentation.
|
||||
If you want to indent with just one space instead, use
|
||||
\fB\-i " "\fR.
|
||||
.TP
|
||||
\fB\-k\fR
|
||||
Keep the
|
||||
\fI.X\fR files.
|
||||
Normally, they are deleted after conversion is finished.
|
||||
.TP
|
||||
\fB\-l\fR
|
||||
Add explicit local declarations.
|
||||
\fBprotoize\fR with
|
||||
\fB\-l\fR inserts a prototype declaration for each function in each block which calls
|
||||
the function without any declaration.
|
||||
This option applies only to
|
||||
\fBprotoize\fR.
|
||||
.TP
|
||||
\fB\-N\fR
|
||||
Make no \fI.save\fR files.
|
||||
The original files are simply deleted.
|
||||
Use this option with caution.
|
||||
.TP
|
||||
\fB\-n\fR
|
||||
Make no real changes.
|
||||
This mode just prints information about the conversions
|
||||
that would have been done without
|
||||
\fB\-n\fR.
|
||||
.TP
|
||||
\fB\-p\fR \fIPROGRAM\fR
|
||||
Use the program
|
||||
\fBPROGRAM\fR as the compiler.
|
||||
Normally, the name
|
||||
\fBgcc\fR is used.
|
||||
.TP
|
||||
\fB\-q\fR
|
||||
Work quietly.
|
||||
Most warnings are suppressed.
|
||||
.TP
|
||||
\fB\-v\fR
|
||||
Print the version number, just like
|
||||
\fB\-v\fR for gcc.
|
||||
.TP
|
||||
\fB\-x\fR \fBFILE\fR
|
||||
List of files to exclude from the conversion process.
|
||||
.PP
|
||||
If you need special compiler options to compile one of your program's
|
||||
source files, then you should generate that file's
|
||||
\fI.X\fR file specially, by running gcc on that source file with
|
||||
the appropriate options and the option
|
||||
\fB\-aux-info\fR.
|
||||
Then run
|
||||
\fBprotoize\fR on the entire set of files.
|
||||
\fBprotoize\fR will use the existing
|
||||
\fI.X\fR file because it is newer than the source file.
|
||||
For example:
|
||||
.PP
|
||||
.DL $ gcc -Dfoo=bar file1.c -aux-info
|
||||
.DL $ protoize *.c
|
||||
.PP
|
||||
You need to include the special files along with the rest in the
|
||||
\fBprotoize\fR command, even though their
|
||||
\fI.X\fR files already exist, because otherwise they won't get converted.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
\fBgcc\fR\|(1), and the Info entry for \fBgcc\fR, particularly
|
||||
\fBRunning protoize\fR section.
|
||||
.SH HISTORY
|
||||
Ron Guilmette implemented the
|
||||
\fBprotoize\fR and \fBunprotoize\fR tools.
|
||||
.SH AUTHORS
|
||||
See the GCC manual for the contributors to GCC.
|
||||
.SH CAVEATS
|
||||
The conversion programs \fBprotoize\fR and \fBunprotoize\fR
|
||||
can sometimes change a source file in a way that won't work
|
||||
unless you rearrange it.
|
||||
.PP
|
||||
\fBprotoize\fR can insert references to a type name or type tag before
|
||||
the definition, or in a file where they are not defined.
|
||||
.PP
|
||||
If this happens, compiler error messages should indicate where the
|
||||
new references are, so fixing the file by hand is straightforward.
|
||||
.PP
|
||||
There are some C constructs which \fBprotoize\fR
|
||||
cannot figure out.
|
||||
For example, it can't determine argument types for declaring a
|
||||
pointer-to-function variable; this must be done by hand. \fBprotoize\fR
|
||||
inserts a comment containing \fB???\fR each time it finds such a variable;
|
||||
all such variables can be found by searching for this string.
|
||||
ANSI C does not require declaring the argument types of
|
||||
pointer-to-function types.
|
||||
.PP
|
||||
Using \fBunprotoize\fR can easily introduce bugs.
|
||||
If the program relied on prototypes to bring about conversion of arguments,
|
||||
these conversions will not take place in the program without prototypes.
|
||||
One case in which you can be sure \fBunprotoize\fR
|
||||
is safe is when you are removing prototypes that were made with
|
||||
\fBprotoize\fR; if the program worked before without any prototypes,
|
||||
it will work again without them.
|
||||
.PP
|
||||
You can find all the places where this problem might occur by
|
||||
compiling the program with the \fB\-Wconversion\fR option.
|
||||
It prints a warning whenever an argument is converted.
|
||||
.PP
|
||||
Both conversion programs can be confused if there are macro calls
|
||||
in and around the text to be converted.
|
||||
In other words, the standard syntax for a declaration or definition
|
||||
must not result from expanding a macro.
|
||||
This problem is inherent in the design of C and cannot be fixed.
|
||||
If only a few functions have confusing macro calls,
|
||||
you can easily convert them manually.
|
||||
.PP
|
||||
\fBprotoize\fR cannot get the argument types for a function whose definition was not
|
||||
actually compiled due to preprocessing conditionals.
|
||||
When this happens, \fBprotoize\fR changes nothing in regard to such a function.
|
||||
\fBprotoize\fR tries to detect such instances and warn about them.
|
||||
.PP
|
||||
You can generally work around this problem by using
|
||||
\fBprotoize\fR step by step, each time specifying a different set of
|
||||
\fB\-D\fR options for compilation, until all of the functions have been converted.
|
||||
There is no automatic way to verify that you have got them all, however.
|
||||
.PP
|
||||
Confusion may result if there is an occasion to convert a function
|
||||
declaration or definition in a region of source code where there
|
||||
is more than one formal parameter list present.
|
||||
Thus, attempts to convert code containing multiple (conditionally compiled)
|
||||
versions of a single function header (in the same vicinity)
|
||||
may not produce the desired (or expected) results.
|
||||
.PP
|
||||
If you plan on converting source files which contain such code,
|
||||
it is recommended that you first make sure that each conditionally
|
||||
compiled region of source code which contains an alternative
|
||||
function header also contains at least one additional follower
|
||||
token (past the final right parenthesis of the function header).
|
||||
This should circumvent the problem.
|
||||
.PP
|
||||
\fBunprotoize\fR can become confused when trying to convert a function
|
||||
definition or declaration which contains a declaration for a
|
||||
pointer-to-function formal argument which has the same name as the
|
||||
function being defined or declared.
|
||||
We recommand you avoid such choices of formal parameter names.
|
||||
.PP
|
||||
It might be necessary to correct some of the indentation by hand and
|
||||
break long lines.
|
||||
(The conversion programs don't write lines longer than eighty characters
|
||||
in any case.)
|
||||
.SH BUGS
|
||||
For instructions on reporting bugs, see the GCC manual.
|
||||
.SH COPYING
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
.PP
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
are preserved on all copies.
|
||||
.PP
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
.PP
|
||||
Permission is granted to copy and distribute translations of this
|
||||
manual into another language, under the above conditions for modified
|
||||
versions, except that this permission notice may be included in
|
||||
translations approved by the Free Software Foundation instead of in
|
||||
the original English.
|
||||
5
sources
5
sources
@ -1,2 +1,3 @@
|
||||
dd8048b43d3d4e5595bcade47b9144c6 gcc-core-4.3.2.tar.bz2
|
||||
bfdf8d19e1b85f522f8b8d48d25e7aaa gcc-g++-4.3.2.tar.bz2
|
||||
2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz
|
||||
0f5cb535b5450a8d61b14f690700a54c gcc-4.4.0-20090216.tar.bz2
|
||||
716b7a0823f96c9d02c1703a9c47d387 cloog-ppl-0.15.tar.gz
|
||||
|
||||
Loading…
Reference in New Issue
Block a user