Ian Lance Taylor <i...@google.com> writes:

> On Tue, Sep 18, 2012 at 1:32 AM, Rainer Orth
> <r...@cebitec.uni-bielefeld.de> wrote:
>> The libbacktrace integration broke Solaris 10 and 11 bootstrap when
>> using gcc 4.4 (any version of gcc without __sync_* support actually):
>
> The patch is fine and should fix the problem, but GCC 4.4 does have

Indeed, thanks.

> __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.

>> Unfortunately, Solaris 10 (and certainly Solaris 9, too) bootstrap is still
>> broken:
>>
>> /vol/gcc/src/hg/trunk/local/libbacktrace/dwarf.c:652: error: implicit
>> declaration of function 'strnlen'
>> make[1]: *** [dwarf.lo] Error 1
>>
>> Both completely lack strnlen().  I haven't done anything about this yet.
>
> This should be fixed now.

The strnlen part is (i386-pc-solaris2.1[01] and sparc-sun-solaris2.11
bootstraps currently running the testsuite), but a new problem turned up
on i386-pc-solaris2.9, which lacks stdint.h.

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?

Thanks.
        Rainer


2012-09-19  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * configure.ac (GCC_HEADER_STDINT): Invoke.
        * aclocal.m4: Regenerate.
        * configure: Regenerate.
        * backtrace.h: Include gstdint.h instead of <stdint.h>.
        * btest.c: Don't include <stdint.h>.
        * dwarf.c: Likewise.

# 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>
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to