diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2012-04-12 11:28:33 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2012-04-12 11:28:33 +0000 |
commit | 098f12f62443b0cb73ee4523a0b41e30d0a67b8f (patch) | |
tree | 2066d80e2a48a254672502574be4e738b67d5f1f /lib/csu/sh | |
parent | 7b50bf4910017a5e373ec67ddb1e27d65bbdef4f (diff) |
the fpu control symbol on sh (__fpscr_values) suddenly becomes local
instead of global with gcc4 and this ends up breaking things in hard
to debug ways. So move the definition to csu instead of libgcc.
ok miod@
Diffstat (limited to 'lib/csu/sh')
-rw-r--r-- | lib/csu/sh/crt0.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/csu/sh/crt0.c b/lib/csu/sh/crt0.c index 6e08127090d..24599a9e17f 100644 --- a/lib/csu/sh/crt0.c +++ b/lib/csu/sh/crt0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crt0.c,v 1.3 2007/03/13 21:42:33 miod Exp $ */ +/* $OpenBSD: crt0.c,v 1.4 2012/04/12 11:28:32 jsg Exp $ */ /* $NetBSD: crt0.c,v 1.10 2004/08/26 21:16:41 thorpej Exp $ */ /* @@ -51,6 +51,10 @@ char * __progname = ""; char __progname_storage[NAME_MAX+1]; +#if defined(__SH4__) && !defined(__SH4_NOFPU__) +unsigned int __fpscr_values[2]; +#endif + #ifdef MCRT0 extern void monstartup(u_long, u_long); extern void _mcleanup(void); @@ -79,7 +83,6 @@ ___start(int argc, char **argv, char **envp, void *ps_strings, #if defined(__SH4__) && !defined(__SH4_NOFPU__) extern void __set_fpscr(unsigned int); - extern unsigned int __fpscr_values[2]; __set_fpscr(0); __fpscr_values[0] |= FPSCR_DN; |