aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/interix.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2002-01-10 22:03:06 +0000
committerZack Weinberg <zack@gcc.gnu.org>2002-01-10 22:03:06 +0000
commit5dd8a9b1c23a2a5f2f63e1cfeae46efa8cee25f4 (patch)
tree4eb6e594f21c9524151f70228618def02304bcb0 /gcc/config/interix.h
parentd10dd44c1935b180847ecfa3da34e2cc589b2b33 (diff)
downloadgcc-5dd8a9b1c23a2a5f2f63e1cfeae46efa8cee25f4.zip
gcc-5dd8a9b1c23a2a5f2f63e1cfeae46efa8cee25f4.tar.gz
gcc-5dd8a9b1c23a2a5f2f63e1cfeae46efa8cee25f4.tar.bz2
configure.in: Set stage1_cflags for powerpc-*-darwin*.
* configure.in: Set stage1_cflags for powerpc-*-darwin*. * configure: Regenerate. * config/interix.h: Set DO_GLOBAL_CTORS_BODY and DO_GLOBAL_DTORS_BODY here, not in xm-interix.h. * config/alpha/vms.h: Set INCLUDE_DEFAULTS here, not in alpha/xm-vms.h. * config/m68k/t-next: Set OTHER_FIXINCLUDES_DIRS and LIMITS_H_TEST here, not in m68k/x-next. * config/rs6000/beos.h: Set STANDARD_INCLUDE_DIR and SYSTEM_INCLUDE_DIR here, not in rs6000/xm-beos.h. * config/x-interix: Don't set RANLIB, RANLIB_TEST, SHELL, LIBGCC2_INCLUDES, or SYSTEM_HEADER_DIR. * config/alpha/x-vms: Don't set USE_COLLECT2. Add comments. * config/i386/x-djgpp: Renamed i386/t-djgpp. * config/m88k/x-dolph: Renamed m88k/t-dolph. * config/m88k/x-texXD88: Renamed m88k/t-texXD88. * config/pa/x-pa-mpeix: Renamed pa/t-mpeix. Update for replacement of quadlib.asm with quadlib.c. * config/x-interix3, config/xm-interix.h, config/i386/x-beos, config/i386/xm-osf1elf.h, config/rs6000/x-darwin, config/rs6000/xm-beos.h: Delete file. * config.gcc: Update to match above changes. From-SVN: r48757
Diffstat (limited to 'gcc/config/interix.h')
-rw-r--r--gcc/config/interix.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/gcc/config/interix.h b/gcc/config/interix.h
index 0f203f3..a815ab1 100644
--- a/gcc/config/interix.h
+++ b/gcc/config/interix.h
@@ -1,6 +1,6 @@
/* Operating system specific defines to be used when targeting GCC for
Interix
- Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1999, 2002 Free Software Foundation, Inc.
Donn Terry, Softway Systems, Inc. (donn@softway.com)
Modified from code
Contributed by Douglas B. Rupp (drupp@cs.washington.edu).
@@ -104,3 +104,37 @@ for windows/multi thread */
#define WCHAR_UNSIGNED 1
#define WCHAR_TYPE "short unsigned int"
#define WCHAR_TYPE_SIZE 16
+
+/* Our strategy for finding global constructors is a bit different, although
+ not a lot. */
+#define DO_GLOBAL_CTORS_BODY \
+do { \
+ int i; \
+ unsigned long nptrs; \
+ func_ptr *p; \
+ asm( \
+ " .section .ctor_head, \"rw\"\n" \
+ "1:\n" \
+ " .text \n" \
+ ASM_LOAD_ADDR(1b,%0) \
+ : "=r" (p) : : "cc"); \
+ for (nptrs = 0; p[nptrs] != 0; nptrs++); \
+ for (i = nptrs-1; i >= 0; i--) \
+ p[i] (); \
+} while (0)
+
+#define DO_GLOBAL_DTORS_BODY \
+do { \
+ func_ptr *p; \
+ asm( \
+ " .section .dtor_head, \"rw\"\n" \
+ "1:\n" \
+ " .text \n" \
+ ASM_LOAD_ADDR(1b,%0) \
+ : "=r" (p) : : "cc"); \
+ while (*p) \
+ { \
+ p++; \
+ (*(p-1)) (); \
+ } \
+} while (0)