From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2098 invoked by alias); 23 Jun 2009 18:52:46 -0000 Received: (qmail 2087 invoked by uid 22791); 23 Jun 2009 18:52:45 -0000 X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_22,J_CHICKENPOX_61,J_CHICKENPOX_93,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.251) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Jun 2009 18:52:39 +0000 Received: by an-out-0708.google.com with SMTP id b38so132366ana.3 for ; Tue, 23 Jun 2009 11:52:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.35.13 with SMTP id n13mr151184ibd.24.1245783156373; Tue, 23 Jun 2009 11:52:36 -0700 (PDT) In-Reply-To: References: <78A007A4A5EA470D9430D47221C004A6@ariga> <19c1b8a90906221344m431739f6l108f74a44e7106b7@mail.gmail.com> Date: Tue, 23 Jun 2009 18:52:00 -0000 Message-ID: <19c1b8a90906231152r7f4b13d6w2accaf70a6635093@mail.gmail.com> Subject: Re: Failed to make h8300 toolchain. From: Khem Raj To: ariga masahiro Cc: crossgcc@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00055.txt.bz2 On Mon, Jun 22, 2009 at 6:06 PM, ariga masahiro wrote: > Hello Khem and everyone, > > Thanks reply to my question. > I abandoned gcc-4.3.2 and decided to use the latest version gcc-4.4.0, > hoping that it resolved Segmentation error. > > As I expected it,it happend that Segmentation error never occurred, > but near the last moment(I hope),there occurred another error. > It says "error: no matching function for call to 'min(size_t&, int&)'". > Please refer to error log below. > > I conjecture that it is caused by size_t,since "H8's int" is 2 bytes > compared to normal 4 bytes. you could try this patch/workaround --- libstdc++-v3/./include/std/bitset.org 2009-06-23 11:48:50.000000000 -07= 00 +++ libstdc++-v3/./include/std/bitset 2009-06-23 11:49:58.000000000 -0700 @@ -1228,7 +1228,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL size_t __pos, size_t __n, _CharT __zero, _CharT __one) { reset(); - const size_t __nbits =3D std::min(_Nb, std::min(__n, __len - __pos)); + const size_t __tmp =3D __len - __pos; + const size_t __nbits =3D std::min(_Nb, std::min(__n, __tmp)); for (size_t __i =3D __nbits; __i > 0; --__i) { const _CharT __c =3D __s[__pos + __nbits - __i]; > gcc-4.4.0\fixincludes\tests\base\sys\types.h(20): typedef __SIZE_TYPE__ > size_t; > gcc-4.4.0\gcc\ginclude\stddef.h(208): #define __SIZE_TYPE__ long unsigned > int > Please teach me the cause of it and how to avoid it. > > -- Source -- binutils-2.19.1.tar.bz2 > gcc-4.4.0.tar.bz2 > newlib-1.17.0.tar.gz > > --- configure command > export TARGET=3Dh8300-elf > export PREFIX=3D/gnutools > /src/gcc-4.4.0/configure --target=3D$TARGET --prefix=3D$PREFIX > --enable-languages=3Dc,c++ > --with-gnu-as --with-gnu-ld --with-newlib > --with-ggxx-include-dir=3D/gnutools/sh-elf/include > -v =C2=A02>&1 | tee configgcc.out > make -w all install 2>&1 | tee makegcc.txt > > -- error > make[6]: Entering directory > `/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3' > make "AR_FLAGS=3Drc" "CC_FOR_BUILD=3Dgcc" > "CC_FOR_TARGET=3D/tmp/build/build_gcc/./gcc/xgcc -B/tmp/build/build_gcc/.= /gcc/ > -nost > dinc -B/tmp/build/build_gcc/h8300-elf/newlib/ -isystem > /tmp/build/build_gcc/h8300-elf/newlib/targ-include -isystem /src/ > gcc-4.4.0/newlib/libc/include -B/gnutools/h8300-elf/bin/ > -B/gnutools/h8300-elf/lib/ -isystem /gnutools/h8300-elf/include > -isystem /gnutools/h8300-elf/sys-include" "CFLAGS=3D-g -O2 =C2=A0 =C2=A0-= mh -mn -mint32" > "CXXFLAGS=3D-g -O2 =C2=A0 =C2=A0-mh -mn -mint32" "CFLA > GS_FOR_BUILD=3D-g -O2" "CFLAGS_FOR_TARGET=3D-g -O2" "INSTALL=3D/usr/bin/i= nstall > -c" "INSTALL_DATA=3D/usr/bin/install -c -m 644" > "INSTALL_PROGRAM=3D/usr/bin/install -c" "INSTALL_SCRIPT=3D/usr/bin/instal= l -c" > "LDFLAGS=3D-mh -mn -mint32" "LIBCFLAGS=3D-g -O2 > =C2=A0-mh -mn -mint32" "LIBCFLAGS_FOR_TARGET=3D-g -O2" "MAKE=3Dmake" > "MAKEINFO=3Dmakeinfo --split-size=3D5000000 --split-size=3D500000 > 0 =C2=A0 =C2=A0 " "PICFLAG=3D" "PICFLAG_FOR_TARGET=3D" "SHELL=3D/bin/sh" = "RUNTESTFLAGS=3D" > "exec_prefix=3D/gnutools" "infodir=3D/gnutools/info > " "libdir=3D/gnutools/lib" "includedir=3D/gnutools/include" "prefix=3D/gn= utools" > "tooldir=3D/gnutools/h8300-elf" "gxx_include_di > r=3D/gnutools/h8300-elf/include/c++/4.4.0" "AR=3D/gnutools/h8300-elf/bin/= ar" > "AS=3D/tmp/build/build_gcc/./gcc/as" "LD=3D/tmp/bui > ld/build_gcc/./gcc/collect-ld" "RANLIB=3D/gnutools/h8300-elf/bin/ranlib" > "NM=3D/tmp/build/build_gcc/./gcc/nm" "NM_FOR_BUILD=3D > " "NM_FOR_TARGET=3D/gnutools/h8300-elf/bin/nm" "DESTDIR=3D" "WERROR=3D" > all-recursive > make[7]: Entering directory > `/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3' > Making all in include > make[8]: Entering directory > `/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3/include' > mkdir -p ./h8300-elf/bits/stdc++.h.gch > /tmp/build/build_gcc/./gcc/xgcc -shared-libgcc -B/tmp/build/build_gcc/./g= cc > =C2=A0-nostdinc++ -L/tmp/build/build_gcc/h8300-elf > /h8300h/normal/int32/libstdc++-v3/src > -L/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3/src/.li= bs > -nostd > inc -B/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/newlib/ -isystem > /tmp/build/build_gcc/h8300-elf/h8300h/normal/i > nt32/newlib/targ-include -isystem /src/gcc-4.4.0/newlib/libc/include > -B/gnutools/h8300-elf/bin/ -B/gnutools/h8300-elf/li > b/ -isystem /gnutools/h8300-elf/include -isystem > /gnutools/h8300-elf/sys-include =C2=A0-mh -mn -mint32 -Winvalid-pch -x c+= +-h > eader -g -O2 =C2=A0 =C2=A0-mh -mn -mint32 > -I/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3/include= /h8300-elf > -I/t > mp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3/include > -I/src/gcc-4.4.0/libstdc++-v3/libsupc++ -O0 -g /sr > c/gcc-4.4.0/libstdc++-v3/include/precompiled/stdc++.h -o > h8300-elf/bits/stdc++.h.gch/O0g.gch > In file included from > /src/gcc-4.4.0/libstdc++-v3/include/precompiled/stdc++.h:64: > /tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3/include/b= itset: > In member function 'void std::bitset<_Nb>::_M_copy_from_ptr(const _CharT*, > size_t, size_t, size_t, _CharT, _CharT)': > /tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3/include/b= itset:1231: > error: no matching function for call to 'min(size_t&, int&)' > make[8]: *** [h8300-elf/bits/stdc++.h.gch/O0g.gch] Error 1 > make[8]: Leaving directory > `/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3/include' > make[7]: *** [all-recursive] Error 1 > make[7]: Leaving directory > `/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3' > make[6]: *** [all] Error 2 > make[6]: Leaving directory > `/tmp/build/build_gcc/h8300-elf/h8300h/normal/int32/libstdc++-v3' > make[5]: *** [multi-do] Error 1 > make[5]: Leaving directory `/tmp/build/build_gcc/h8300-elf/libstdc++-v3' > make[4]: *** [all-multi] Error 2 > make[4]: Leaving directory `/tmp/build/build_gcc/h8300-elf/libstdc++-v3' > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory `/tmp/build/build_gcc/h8300-elf/libstdc++-v3' > make[2]: *** [all] Error 2 > make[2]: Leaving directory `/tmp/build/build_gcc/h8300-elf/libstdc++-v3' > make[1]: *** [all-target-libstdc++-v3] Error 2 > make[1]: Leaving directory `/tmp/build/build_gcc' > make: *** [all] Error 2 > make: Leaving directory `/tmp/build/build_gcc' > > Masahiro Ariga > > > -- For unsubscribe information see http://sourceware.org/lists.html#faq