diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-03-22 10:17:46 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-03-22 10:17:46 +0000 |
commit | a0f46309637779ccc141ec531e9b128596a5bba0 (patch) | |
tree | cce93e60f0c21b080953865641b0f749cd15ac5c | |
parent | e20b29d0c1ebd529cc147e9fa507540e3e57917c (diff) | |
download | haskell-a0f46309637779ccc141ec531e9b128596a5bba0.tar.gz |
fix for gcc 4.1.x
We need to use GNUC3_ATTRIBUTE(used) to force gcc to keep the
definition of StgRunIsImplementedInAssembler() around. In some cases
we had already made this function external rather than static to get
around the problem, but GNUC3_ATTRIBUTE(used) is a better fix.
-rw-r--r-- | ghc/rts/StgCRun.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ghc/rts/StgCRun.c b/ghc/rts/StgCRun.c index b1e27249ed..29d4efe82b 100644 --- a/ghc/rts/StgCRun.c +++ b/ghc/rts/StgCRun.c @@ -203,8 +203,8 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { extern StgRegTable * StgRun(StgFunPtr f, StgRegTable *basereg); -void StgRunIsImplementedInAssembler(void); -void StgRunIsImplementedInAssembler(void) +static void GNUC3_ATTRIBUTE(used) +StgRunIsImplementedInAssembler(void) { __asm__ volatile ( /* @@ -591,7 +591,8 @@ StgRun(StgFunPtr f, StgRegTable *basereg) extern StgRegTable * StgRun(StgFunPtr f, StgRegTable *basereg); #ifdef darwin_HOST_OS -void StgRunIsImplementedInAssembler(void) +static void GNUC3_ATTRIBUTE(used) +StgRunIsImplementedInAssembler(void) { #if HAVE_SUBSECTIONS_VIA_SYMBOLS // if the toolchain supports deadstripping, we have to @@ -629,7 +630,8 @@ void StgRunIsImplementedInAssembler(void) // *) The Link Register is saved to a different offset in the caller's stack frame // (Linux: 4(r1), Darwin 8(r1)) -static void StgRunIsImplementedInAssembler(void) +static void GNUC3_ATTRIBUTE(used) +StgRunIsImplementedInAssembler(void) { __asm__ volatile ( "\t.globl StgRun\n" @@ -708,7 +710,8 @@ static void StgRunIsImplementedInAssembler(void) #ifdef linux_HOST_OS extern StgRegTable * StgRun(StgFunPtr f, StgRegTable *basereg); -static void StgRunIsImplementedInAssembler(void) +static void GNUC3_ATTRIBUTE(used) +StgRunIsImplementedInAssembler(void) { // r0 volatile // r1 stack pointer @@ -858,7 +861,8 @@ static void StgRunIsImplementedInAssembler(void) #define LOCALS 31 #endif -static void StgRunIsImplementedInAssembler(void) +static void GNUC3_ATTRIBUTE(used) +StgRunIsImplementedInAssembler(void) { __asm__ volatile( ".global StgRun\n" |