From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20782 invoked by alias); 6 Nov 2010 15:51:48 -0000 Received: (qmail 20771 invoked by uid 22791); 6 Nov 2010 15:51:46 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_CX,TW_SF X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 06 Nov 2010 15:51:40 +0000 From: "jay.krell at cornell dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jay.krell at cornell dot edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 06 Nov 2010 15:51:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-11/txt/msg00744.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46333 Summary: problems with configure -enable-build-with-cxx -disable-bootstrap Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned@gcc.gnu.org ReportedBy: jay.krell@cornell.edu Hi..so, I'm using configure -enable-build-with-cxx, with 4.5.1. One person's machine has g++ 3.3. Another's g++ produces executables that don't run, can't find libstdc++. So autoconf decides sizeof(int) == 0. On that machine, I'm instead trying /usr/bin/CC which is SunStudio 12. Here are some of the problem. I'm going to try to patch them all, but I don't have FSF papers. g++ 3.3 doesn't like ATTRIBUTE_UNUSED after parameters, as ansidecl.h says. But ARG_UNUSED isn't used much. So: /* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the identifier name. ATTRIBUTE_UNUSED is frequently used instead of ARG_UNUSED. */ #ifndef ATTRIBUTE_UNUSED #if ! defined(__cplusplus) || (GCC_VERSION >= 3004) #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define ATTRIBUTE_UNUSED /* nothing */ #endif #endif #define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED ENUM_BITFIELD mixes integers and enums. Fix: #if (GCC_VERSION > 2000) #define ENUM_BITFIELD(TYPE, NAME, SIZE) __extension__ enum TYPE NAME : SIZE #elif defined(__cplusplus) #define ENUM_BITFIELD(TYPE, NAME, SIZE) enum TYPE NAME #else #define ENUM_BITFIELD(TYPE, NAME, SIZE) unsigned int #endif (in two copies of system.h) but that breaks gengtype! So I put in: "ENUM_BITFIELD"{WS}?"("{WS}?{ID}{WS}?,{WS}?{ID}{WS}?,{WS}?[_0-9A-Z]+{WS}?");" { /* do nothing */ } not sure that is right! some problem with obstack_free, I didn't investigate. Maybe substraction involving void* NULL or 0? Fix, obstack.h before: Before: # define obstack_free(h,obj) \ ( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ After, add cast to char*: # define obstack_free(h,obj) \ ( (h)->temp = (char *) ((char*)(obj)) - (char *) (h)->chunk, \ ambiguity passing WIDE_INT to abs. fix: in hwint.h define wide_abs to labs, llabs, or _abs64 and use wide_abs There are also problems then compiling gmp in tree. I had to remove its #include on Solaris because that pulled in locale and there was some problem. Maybe due to local hacks? I removed all the locale stuff from my gcc/gmp. gmp also had using std::FILE which failed, I removed it. oh, and I'm using a bit of C++. gengtype doesn't like typedef vector foo_t or destructors. I worked around like so: #include using namespace std; #define typedef_vector typedef vector /* hack for gengtype */ and then typedef_vector foo_t; and #define DESTRUCTOR ~ /* hack for gengtype */ struct bar_t { bar_t() { } virtual DESTRUCTOR bar_t() { }