diff options
-rwxr-xr-x | configure | 21 | ||||
-rw-r--r-- | src/stdio/__stdio_exit.c | 2 | ||||
-rw-r--r-- | src/stdio/fflush.c | 2 | ||||
-rw-r--r-- | src/stdio/stderr.c | 2 | ||||
-rw-r--r-- | src/stdio/stdin.c | 2 | ||||
-rw-r--r-- | src/stdio/stdout.c | 2 | ||||
-rw-r--r-- | src/thread/pthread_create.c | 6 | ||||
-rw-r--r-- | src/thread/pthread_key_create.c | 2 |
8 files changed, 9 insertions, 30 deletions
@@ -495,27 +495,6 @@ printf "no\n" fail "$0: error: unsupported long double type" fi -# -# Check for known bug in GCC 4.9.0 that results in a broken libc. -# -if test "$cc_is_gcc" = yes ; then -printf "checking for gcc constant folding bug with weak aliases... " -echo 'static int x = 0;' > "$tmpc" -echo 'extern int y __attribute__((__weak__, __alias__("x")));' >> "$tmpc" -echo 'extern int should_appear;' >> "$tmpc" -echo 'int foo() { return y ? should_appear : 0; }' >> "$tmpc" -case "$($CC $CFLAGS_C99FSE -I./arch/$ARCH -I./include \ - $CPPFLAGS $CFLAGS_AUTO $CFLAGS -S -o - "$tmpc" 2>/dev/null)" in -*should_appear*) -printf "no\n" -;; -*) -printf "yes\n" -fail "$0: error: broken compiler; try CFLAGS=-fno-toplevel-reorder" -;; -esac -fi - printf "creating config.mak... " cmdline=$(quote "$0") diff --git a/src/stdio/__stdio_exit.c b/src/stdio/__stdio_exit.c index e4380aaf..716e5f73 100644 --- a/src/stdio/__stdio_exit.c +++ b/src/stdio/__stdio_exit.c @@ -1,6 +1,6 @@ #include "stdio_impl.h" -static FILE *const dummy_file = 0; +static FILE *volatile dummy_file = 0; weak_alias(dummy_file, __stdin_used); weak_alias(dummy_file, __stdout_used); weak_alias(dummy_file, __stderr_used); diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c index af709503..7bf862a6 100644 --- a/src/stdio/fflush.c +++ b/src/stdio/fflush.c @@ -19,7 +19,7 @@ static int __fflush_unlocked(FILE *f) } /* stdout.c will override this if linked */ -static FILE *const dummy = 0; +static FILE *volatile dummy = 0; weak_alias(dummy, __stdout_used); int fflush(FILE *f) diff --git a/src/stdio/stderr.c b/src/stdio/stderr.c index 3fd8f81d..229c8651 100644 --- a/src/stdio/stderr.c +++ b/src/stdio/stderr.c @@ -13,4 +13,4 @@ static FILE f = { .lock = -1, }; FILE *const stderr = &f; -FILE *const __stderr_used = &f; +FILE *volatile __stderr_used = &f; diff --git a/src/stdio/stdin.c b/src/stdio/stdin.c index 476dc708..171ff22a 100644 --- a/src/stdio/stdin.c +++ b/src/stdio/stdin.c @@ -12,4 +12,4 @@ static FILE f = { .lock = -1, }; FILE *const stdin = &f; -FILE *const __stdin_used = &f; +FILE *volatile __stdin_used = &f; diff --git a/src/stdio/stdout.c b/src/stdio/stdout.c index 3855dd0b..6b188942 100644 --- a/src/stdio/stdout.c +++ b/src/stdio/stdout.c @@ -13,4 +13,4 @@ static FILE f = { .lock = -1, }; FILE *const stdout = &f; -FILE *const __stdout_used = &f; +FILE *volatile __stdout_used = &f; diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index 64151254..e77e54a5 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -116,12 +116,12 @@ static int start(void *p) #define ROUND(x) (((x)+PAGE_SIZE-1)&-PAGE_SIZE) /* pthread_key_create.c overrides this */ -static const size_t dummy = 0; +static volatile size_t dummy = 0; weak_alias(dummy, __pthread_tsd_size); -static void *const dummy_tsd[1] = { 0 }; +static void *dummy_tsd[1] = { 0 }; weak_alias(dummy_tsd, __pthread_tsd_main); -static FILE *const dummy_file = 0; +static FILE *volatile dummy_file = 0; weak_alias(dummy_file, __stdin_used); weak_alias(dummy_file, __stdout_used); weak_alias(dummy_file, __stderr_used); diff --git a/src/thread/pthread_key_create.c b/src/thread/pthread_key_create.c index ef8a755d..a9187f7b 100644 --- a/src/thread/pthread_key_create.c +++ b/src/thread/pthread_key_create.c @@ -1,6 +1,6 @@ #include "pthread_impl.h" -const size_t __pthread_tsd_size = sizeof(void *) * PTHREAD_KEYS_MAX; +volatile size_t __pthread_tsd_size = sizeof(void *) * PTHREAD_KEYS_MAX; void *__pthread_tsd_main[PTHREAD_KEYS_MAX] = { 0 }; static void (*keys[PTHREAD_KEYS_MAX])(void *); |