summaryrefslogtreecommitdiff
path: root/lang/gcc27/files/patch-libgcc2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lang/gcc27/files/patch-libgcc2.c')
-rw-r--r--lang/gcc27/files/patch-libgcc2.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/lang/gcc27/files/patch-libgcc2.c b/lang/gcc27/files/patch-libgcc2.c
new file mode 100644
index 000000000000..3445284f34d1
--- /dev/null
+++ b/lang/gcc27/files/patch-libgcc2.c
@@ -0,0 +1,31 @@
+--- libgcc2.c.orig Sun Nov 26 11:39:21 1995
++++ libgcc2.c Mon Mar 20 13:29:11 2000
+@@ -2106,9 +2106,7 @@
+ (*p++) ();
+ #endif
+ }
+-#endif
+
+-#ifndef INIT_SECTION_ASM_OP
+ /* Run all the global constructors on entry to the program. */
+
+ #ifndef ON_EXIT
+@@ -2128,9 +2126,7 @@
+ DO_GLOBAL_CTORS_BODY;
+ ON_EXIT (__do_global_dtors, 0);
+ }
+-#endif /* no INIT_SECTION_ASM_OP */
+
+-#if !defined (INIT_SECTION_ASM_OP) || defined (INVOKE__main)
+ /* Subroutine called automatically by `main'.
+ Compiling a global function named `main'
+ produces an automatic call to this function at the beginning.
+@@ -2165,7 +2161,7 @@
+
+ /* We declare the lists here with two elements each,
+ so that they are valid empty lists if no other definition is loaded. */
+-#if !defined(INIT_SECTION_ASM_OP) && !defined(CTOR_LISTS_DEFINED_EXTERNALLY)
++#if (!defined(INIT_SECTION_ASM_OP) || !defined(OBJECT_FORMAT_ELF)) && !defined(CTOR_LISTS_DEFINED_EXTERNALLY)
+ #if defined(__NeXT__) || defined(_AIX)
+ /* After 2.3, try this definition on all systems. */
+ func_ptr __CTOR_LIST__[2] = {0, 0};