summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/dl-sysdep.c3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/sigaction.h3
-rw-r--r--sysdeps/unix/sysv/linux/init-first.c10
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/sigaction.h11
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/sigaction.h3
5 files changed, 20 insertions, 10 deletions
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index 120f362e75..4f2a2f6da3 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -41,6 +41,7 @@ extern size_t _dl_pagesize;
extern const char *_dl_platform;
extern unsigned long int _dl_hwcap;
extern size_t _dl_platformlen;
+extern fpu_control_t _dl_fpu_control;
extern void _end;
extern void ENTRY_POINT (void);
@@ -128,7 +129,7 @@ _dl_sysdep_start (void **start_argptr,
_dl_hwcap = av->a_un.a_val;
break;
case AT_FPUCW:
- __fpu_control = av->a_un.a_val;
+ _dl_fpu_control = av->a_un.a_val;
break;
}
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index 274531f270..ae1249af51 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -37,7 +37,7 @@ struct sigaction
/* Bits in `sa_flags'. */
#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-# define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
# define SA_NOMASK 0x00000008 /* Don't automatically block the signal
@@ -47,6 +47,7 @@ struct sigaction
/* Some aliases for the SA_ constants. */
# define SA_NODEFER SA_NOMASK
# define SA_RESETHAND SA_ONESHOT
+# define SA_STACK SA_ONSTACK
#endif
/* Values for the HOW argument to `sigprocmask'. */
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
index 4b7af46d78..01395baf75 100644
--- a/sysdeps/unix/sysv/linux/init-first.c
+++ b/sysdeps/unix/sysv/linux/init-first.c
@@ -34,6 +34,9 @@ static void init (int, char **, char **) __attribute__ ((unused));
extern int _dl_starting_up;
weak_extern (_dl_starting_up)
+extern fpu_control_t _dl_fpu_control;
+extern int _dl_fpu_control_set;
+
/* Set nonzero if we have to be prepared for more then one libc being
used in the process. Safe assumption if initializer never runs. */
int __libc_multiple_libcs = 1;
@@ -61,8 +64,11 @@ init (int argc, char **argv, char **envp)
__personality (PER_LINUX);
/* Set the FPU control word to the proper default value if the
- kernel would use a different value. */
- if (__fpu_control != _FPU_DEFAULT)
+ kernel would use a different value. (In a static program we
+ don't have this information.) */
+#ifdef PIC
+ if (__fpu_control != _dl_fpu_control)
+#endif
__setfpucw (__fpu_control);
}
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 71ca8846eb..7f72406e01 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -45,16 +45,17 @@ struct sigaction
/* Bits in `sa_flags'. */
#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-# define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
-# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
-# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x00000004 /* Restart syscall on signal return. */
+# define SA_INTERRUPT 0x00000000 /* Historical no-op. */
+# define SA_NODEFER 0x00000010 /* Don't automatically block the signal when
its handler is being executed. */
-# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */
/* Some aliases for the SA_ constants. */
# define SA_NOMASK SA_NODEFER
# define SA_ONESHOT SA_RESETHAND
+# define SA_STACK SA_ONSTACK
#endif
/* Values for the HOW argument to `sigprocmask'. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
index 3e4e855915..651b526a40 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
@@ -43,7 +43,7 @@ struct sigaction
#define SA_SIGINFO 0x00000200 /* Invoke signal-catching function with
three arguments instead of one. */
#ifdef __USE_MISC
-# define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
# define SA_INTERRUPT 0x00000010 /* Historical no-op. */
# define SA_NOMASK 0x00000020 /* Don't automatically block the signal when
@@ -53,6 +53,7 @@ struct sigaction
/* Some aliases for the SA_ constants. */
# define SA_NODEFER SA_NOMASK
# define SA_RESETHAND SA_ONESHOT
+# define SA_STACK SA_ONSTACK
#endif
/* Values for the HOW argument to `sigprocmask'. */