Mercurial > gub
changeset 5802:d78b1cea11f7
gcc-2-95: -D_IO_MTSAFE_IO -fixes. Makes x86_64-built gcc work.
Notably, libc-lock.h fixes wrt extern "C" fixing undefined weak symbols
_pthread_cleanup_push_defer
_pthread_cleanup_pop_restore
in libstdc++.so.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Wed, 14 Oct 2009 22:13:03 +0200 |
parents | e9eeee726538 |
children | f4201cde90d0 |
files | gub/specs/cross/gcc-2-95.py |
diffstat | 1 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/specs/cross/gcc-2-95.py Wed Oct 14 15:48:49 2009 +0200 +++ b/gub/specs/cross/gcc-2-95.py Wed Oct 14 22:13:03 2009 +0200 @@ -80,6 +80,10 @@ #define LLL_MUTEX_LOCK_INITIALIZER (0) #define LLL_MUTEX_LOCK_INITIALIZER_LOCKED (1) +/* Initializers for lock. */ +#define LLL_LOCK_INITIALIZER (0) +#define LLL_LOCK_INITIALIZER_LOCKED (1) + ''', '%(srcdir)s/libio/lowlevellock.h') for i in ['%(srcdir)s/libio/config/mtsafe.mt', '%(srcdir)s/libstdc++/config/linux.mt']: @@ -87,9 +91,22 @@ # MT_CFLAGS seems to be only way to get flags into build? self.dump (''' # This builds, but does not run any iostream stuff -- possibly because of including from /usr? -- retry -MT_CFLAGS='-D__extern_inline=extern inline' -D__extension__= -## MT_CFLAGS = -D_IO_MTSAFE_IO '-D__extern_inline=extern inline' -D__extension__= +##MT_CFLAGS='-D__extern_inline=extern inline' -D__extension__= +MT_CFLAGS = -D_IO_MTSAFE_IO '-D__extern_inline=extern inline' -D__extension__= ''', i) + self.system ('mkdir -p %(srcdir)s/libio/bits') + self.dump (''' +#ifdef __cplusplus +extern "C" { +#endif +#include_next <bits/libc-lock.h> +asm (".weak _pthread_cleanup_pop_restore"); +asm (".weak _pthread_cleanup_push_defer"); +#ifdef __cplusplus +} +#endif +''', + '%(srcdir)s/libio/bits/libc-lock.h') # PROMOTEME: gcc_do_not_look_in_slash_lib_usr self.file_sub ([ ('([ *]standard_(startfile|exec)_prefix_.*= ")(/lib|/usr)', r'\1%(system_root)s\3')],