Message ID | ydd627anyvg.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On Wed, Sep 19, 2012 at 2:30 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote: > Ian Lance Taylor <iant@google.com> writes: > >> __sync_* support. Might be worth looking into why the test failed. > > On i386-pc-solaris2.*, __sync_bool_compare_and_swap_4 is missing. > sparc-sun-solaris2.11 is fine, though. Ah, I see. __sync_bool_compare_and_swap only exists if compiling for 486 or above. I guess I'm not too worried about that. > The following patch fixes this for me (bootstrap currently into > stage2). I've removed the <stdint.h> includes in btest.c and dwarf.c > since that's already covered by backtrace.h. > > Ok for mainline if that passes? I don't particularly want backtrace.h, a public header file, to depend on gstdint.h, a file created at build time. This would mean that backtrace.h can not be easily installed (it's not installed right now, but I don't want to rule that out in the future). But I guess it's OK to have that dependency on ancient systems. I installed this slightly different patch instead. Thanks. Ian 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Ian Lance Taylor <iant@google.com> * configure.ac (GCC_HEADER_STDINT): Invoke. * backtrace.h: If we can't find <stdint.h>, use "gstdint.h". * btest.c: Don't include <stdint.h>. * dwarf.c: Likewise. * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
# HG changeset patch # Parent cbf27345ec507da8167eb50de6c21124cfd778c4 Provide stdint.h if missing diff --git a/libbacktrace/backtrace.h b/libbacktrace/backtrace.h --- a/libbacktrace/backtrace.h +++ b/libbacktrace/backtrace.h @@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE. */ #define BACKTRACE_H #include <stddef.h> -#include <stdint.h> +#include "gstdint.h" #include <stdio.h> #ifdef __cplusplus diff --git a/libbacktrace/btest.c b/libbacktrace/btest.c --- a/libbacktrace/btest.c +++ b/libbacktrace/btest.c @@ -34,7 +34,6 @@ POSSIBILITY OF SUCH DAMAGE. */ libbacktrace library. */ #include <assert.h> -#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac --- a/libbacktrace/configure.ac +++ b/libbacktrace/configure.ac @@ -168,6 +168,8 @@ if test "$backtrace_supported" = "yes"; fi AC_SUBST(BACKTRACE_SUPPORTED) +GCC_HEADER_STDINT(gstdint.h) + AC_CHECK_HEADERS(sys/mman.h) if test "$ac_cv_header_sys_mman_h" = "no"; then have_mmap=no diff --git a/libbacktrace/dwarf.c b/libbacktrace/dwarf.c --- a/libbacktrace/dwarf.c +++ b/libbacktrace/dwarf.c @@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #include <errno.h> -#include <stdint.h> #include <stdlib.h> #include <string.h> #include <sys/types.h>