diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-10 22:03:06 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-10 22:03:06 +0000 |
commit | c070948eb28f25e9fd7e4921d97a034575c5d8da (patch) | |
tree | 4eb6e594f21c9524151f70228618def02304bcb0 /gcc/config/interix.h | |
parent | a53c9f037e03972c9ed416b7f267bf8a32b631c2 (diff) | |
download | gcc-c070948eb28f25e9fd7e4921d97a034575c5d8da.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48757 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/interix.h')
-rw-r--r-- | gcc/config/interix.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/gcc/config/interix.h b/gcc/config/interix.h index 0f203f3cf48..a815ab13eb0 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) |