public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* on how to compile gcc-4.6 correctly?
@ 2010-09-06  3:17 Dennis
  2010-09-06  9:18 ` Justin P. Mattock
  2010-09-06 14:52 ` Kai Ruottu
  0 siblings, 2 replies; 13+ messages in thread
From: Dennis @ 2010-09-06  3:17 UTC (permalink / raw)
  To: gcc; +Cc: crquan

Hi, all,
  I'm using gentoo distribution (including gmp/mpfr/mpc) that could compile
gcc-4.5.0, 4.5.1, and many snapshots correctly, including the recent one gcc-4.5-20100902,
but when I tried to compile gcc-4.6, any snapshot version, even recent gcc-4.6-20100904,
it always failed, the recent one failure compiling is:

../../gcc-4.6-20100904/gcc/c-decl.c: In function 'grokdeclarator':
../../gcc-4.6-20100904/gcc/c-decl.c:5533: warning: format not a string literal and no format arguments
../../gcc-4.6-20100904/gcc/c-decl.c: In function 'grokparms':
../../gcc-4.6-20100904/gcc/c-decl.c:6194: warning: format not a string literal and no format arguments
../../gcc-4.6-20100904/gcc/c-decl.c:7025:64: error: macro "ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0
../../gcc-4.6-20100904/gcc/c-decl.c: In function 'finish_struct':
../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: 'ggc_alloc_cleared_lang_type' undeclared (first use in this function)
../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: (Each undeclared identifier is reported only once
../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: for each function it appears in.)
../../gcc-4.6-20100904/gcc/c-decl.c:7308:62: error: macro "ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0
../../gcc-4.6-20100904/gcc/c-decl.c: In function 'finish_enum':
../../gcc-4.6-20100904/gcc/c-decl.c:7308: error: 'ggc_alloc_cleared_lang_type' undeclared (first use in this function)
make: *** [c-decl.o] Error 1

I don't know what happened with that? When I search the 'ggc_alloc_cleared_lang_type' macro,
it really doesn't exist in the gcc-4.6-20100904 source, nor under /usr/include, so what is
that macro real dependency? the prerequisites page seems not help me,
http://gcc.gnu.org/install/prerequisites.html

Who have successfully build gcc-4.6 please help me, or have any clue, I have searched that ggc_alloc_cleared_lang_type
through google, but didn't find out any meaningful results,

please make sure have my email address on cc-list that I can receive your email, because I didn't subscribe such
high volume mailing list,

Thank you very much,

--
Dennis, from Singapore

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-06  3:17 on how to compile gcc-4.6 correctly? Dennis
@ 2010-09-06  9:18 ` Justin P. Mattock
  2010-09-06  9:54   ` Cheng Rk
  2010-09-06 14:52 ` Kai Ruottu
  1 sibling, 1 reply; 13+ messages in thread
From: Justin P. Mattock @ 2010-09-06  9:18 UTC (permalink / raw)
  To: Dennis; +Cc: gcc, crquan

On 09/05/2010 08:17 PM, Dennis wrote:
> Hi, all,
>    I'm using gentoo distribution (including gmp/mpfr/mpc) that could compile
> gcc-4.5.0, 4.5.1, and many snapshots correctly, including the recent one gcc-4.5-20100902,
> but when I tried to compile gcc-4.6, any snapshot version, even recent gcc-4.6-20100904,
> it always failed, the recent one failure compiling is:
>
> ../../gcc-4.6-20100904/gcc/c-decl.c: In function 'grokdeclarator':
> ../../gcc-4.6-20100904/gcc/c-decl.c:5533: warning: format not a string literal and no format arguments
> ../../gcc-4.6-20100904/gcc/c-decl.c: In function 'grokparms':
> ../../gcc-4.6-20100904/gcc/c-decl.c:6194: warning: format not a string literal and no format arguments
> ../../gcc-4.6-20100904/gcc/c-decl.c:7025:64: error: macro "ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0
> ../../gcc-4.6-20100904/gcc/c-decl.c: In function 'finish_struct':
> ../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: 'ggc_alloc_cleared_lang_type' undeclared (first use in this function)
> ../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: (Each undeclared identifier is reported only once
> ../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: for each function it appears in.)
> ../../gcc-4.6-20100904/gcc/c-decl.c:7308:62: error: macro "ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0
> ../../gcc-4.6-20100904/gcc/c-decl.c: In function 'finish_enum':
> ../../gcc-4.6-20100904/gcc/c-decl.c:7308: error: 'ggc_alloc_cleared_lang_type' undeclared (first use in this function)
> make: *** [c-decl.o] Error 1
>
> I don't know what happened with that? When I search the 'ggc_alloc_cleared_lang_type' macro,
> it really doesn't exist in the gcc-4.6-20100904 source, nor under /usr/include, so what is
> that macro real dependency? the prerequisites page seems not help me,
> http://gcc.gnu.org/install/prerequisites.html
>
> Who have successfully build gcc-4.6 please help me, or have any clue, I have searched that ggc_alloc_cleared_lang_type
> through google, but didn't find out any meaningful results,
>
> please make sure have my email address on cc-list that I can receive your email, because I didn't subscribe such
> high volume mailing list,
>
> Thank you very much,
>
> --
> Dennis, from Singapore
>


hm... an obvious question would be if you have your toolchain correct?
(but you probably do..(I used this to build 
4.6.0..:http://cross-lfs.org/view/svn/x86_64-64/))

in your case I see something with lang... maybe your CFLAGS are set 
wrong to the wrong machine?! over here my CFLAGS look like this:
CFLAGS="-m64 -mtune=core2 -march=core2 -O2 -pipe -fomit-frame-pointer 
-fstack-protector -w" CXXFLAGS="${CFLAGS}" MAKEOPTS="{-j3}"

keep in mind this is for a intel iMac... your system could be diff..

Justin P. Mattock

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-06  9:18 ` Justin P. Mattock
@ 2010-09-06  9:54   ` Cheng Rk
  2010-09-06 10:32     ` Justin Mattock
  0 siblings, 1 reply; 13+ messages in thread
From: Cheng Rk @ 2010-09-06  9:54 UTC (permalink / raw)
  To: Dennis, Justin P. Mattock; +Cc: gcc

--- On Mon, 6/9/10, Justin P. Mattock <justinmattock@gmail.com> wrote:
> From: Justin P. Mattock <justinmattock@gmail.com>
> Subject: Re: on how to compile gcc-4.6 correctly?
> To: "Dennis" <crquan@fedoraproject.org>
> Cc: gcc@gcc.gnu.org, crquan@ymail.com
> Date: Monday, 6 September, 2010, 9:18 AM
> On 09/05/2010 08:17 PM, Dennis
[...]
> hm... an obvious question would be if you have your
> toolchain correct?

Yes, I think the binutils/gmp/mpfr/mpc all dependencies are correct, otherwise why I can compile all gcc-4.5.x version correctly?
On the same system, gcc-4.5.x (4.5.0 and 4.5.1 and 4.5-20100902/... multiple snapshots) all can compile correctly, I install them into separate directories, and have verified those compilers can compile many source packages correctly;

> (but you probably do..(I used this to build 
> 4.6.0..:http://cross-lfs.org/view/svn/x86_64-64/))

but this still didn't explain what's the "ggc_alloc_cleared_lang_type" macro? all through gcc source it's only used by gcc/c-decl.c file, but it has no definition under gcc source header files, nor under /usr/include;

> 
> in your case I see something with lang... maybe your CFLAGS
> are set 
> wrong to the wrong machine?! over here my CFLAGS look like
> this:
> CFLAGS="-m64 -mtune=core2 -march=core2 -O2 -pipe
> -fomit-frame-pointer 
> -fstack-protector -w" CXXFLAGS="${CFLAGS}"
> MAKEOPTS="{-j3}"

I didn't use any special CFLAGS, when I try to compile gcc-4.5.x or this gcc-4.6 snapshot, I just use "../gcc-4.6-20100905/configure --with-arch-64=athlon64 --with-arch-32=i386", I tried to get a multilib compiler that could generate default athlon64 optimized code for 64bit and i386 code for 32bit;

The same "--with-arch-64=athlon64 --with-arch-32=i386" works well during compiling gcc-4.5.x but why not work on gcc-4.6 ???

> 
> keep in mind this is for a intel iMac... your system could
> be diff..
> 
> Justin P. Mattock
> 

Thanks a lot~


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-06  9:54   ` Cheng Rk
@ 2010-09-06 10:32     ` Justin Mattock
  0 siblings, 0 replies; 13+ messages in thread
From: Justin Mattock @ 2010-09-06 10:32 UTC (permalink / raw)
  To: Cheng Rk; +Cc: Dennis, gcc

On Mon, Sep 6, 2010 at 2:54 AM, Cheng Rk <crquan@ymail.com> wrote:
> --- On Mon, 6/9/10, Justin P. Mattock <justinmattock@gmail.com> wrote:
>> From: Justin P. Mattock <justinmattock@gmail.com>
>> Subject: Re: on how to compile gcc-4.6 correctly?
>> To: "Dennis" <crquan@fedoraproject.org>
>> Cc: gcc@gcc.gnu.org, crquan@ymail.com
>> Date: Monday, 6 September, 2010, 9:18 AM
>> On 09/05/2010 08:17 PM, Dennis
> [...]
>> hm... an obvious question would be if you have your
>> toolchain correct?
>
> Yes, I think the binutils/gmp/mpfr/mpc all dependencies are correct, otherwise why I can compile all gcc-4.5.x version correctly?
> On the same system, gcc-4.5.x (4.5.0 and 4.5.1 and 4.5-20100902/... multiple snapshots) all can compile correctly, I install them into separate directories, and have verified those compilers can compile many source packages correctly;
>
>> (but you probably do..(I used this to build
>> 4.6.0..:http://cross-lfs.org/view/svn/x86_64-64/))
>
> but this still didn't explain what's the "ggc_alloc_cleared_lang_type" macro? all through gcc source it's only used by gcc/c-decl.c file, but it has no definition under gcc source header files, nor under /usr/include;
>
>>
>> in your case I see something with lang... maybe your CFLAGS
>> are set
>> wrong to the wrong machine?! over here my CFLAGS look like
>> this:
>> CFLAGS="-m64 -mtune=core2 -march=core2 -O2 -pipe
>> -fomit-frame-pointer
>> -fstack-protector -w" CXXFLAGS="${CFLAGS}"
>> MAKEOPTS="{-j3}"
>
> I didn't use any special CFLAGS, when I try to compile gcc-4.5.x or this gcc-4.6 snapshot, I just use "../gcc-4.6-20100905/configure --with-arch-64=athlon64 --with-arch-32=i386", I tried to get a multilib compiler that could generate default athlon64 optimized code for 64bit and i386 code for 32bit;
>
> The same "--with-arch-64=athlon64 --with-arch-32=i386" works well during compiling gcc-4.5.x but why not work on gcc-4.6 ???
>
>>
>> keep in mind this is for a intel iMac... your system could
>> be diff..
>>
>> Justin P. Mattock
>>
>
> Thanks a lot~
>
>
>

ah... if gcc 4.5.0 builds right, but 4.6.0 does not then everything is
good(toolchain).. sounds like your going to have to file a bug with
gcc since 4.6.0 is so new..
(keep in mind it's late here so I might have left a few things out..).


-- 
Justin P. Mattock

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-06  3:17 on how to compile gcc-4.6 correctly? Dennis
  2010-09-06  9:18 ` Justin P. Mattock
@ 2010-09-06 14:52 ` Kai Ruottu
  2010-09-13 14:19   ` Dennis, CHENG Renquan
  1 sibling, 1 reply; 13+ messages in thread
From: Kai Ruottu @ 2010-09-06 14:52 UTC (permalink / raw)
  To: gcc; +Cc: crquan

6.9.2010 6:17, Dennis kirjoitti:

>    I'm using gentoo distribution (including gmp/mpfr/mpc) that could compile
> gcc-4.5.0, 4.5.1, and many snapshots correctly, including the recent one gcc-4.5-20100902,
> but when I tried to compile gcc-4.6, any snapshot version, even recent gcc-4.6-20100904,
> it always failed, the recent one failure compiling is:
>
> ../../gcc-4.6-20100904/gcc/c-decl.c: In function 'grokdeclarator':
> ../../gcc-4.6-20100904/gcc/c-decl.c:5533: warning: format not a string literal and no format arguments
> ../../gcc-4.6-20100904/gcc/c-decl.c: In function 'grokparms':
> ../../gcc-4.6-20100904/gcc/c-decl.c:6194: warning: format not a string literal and no format arguments
> ../../gcc-4.6-20100904/gcc/c-decl.c:7025:64: error: macro "ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0
> ../../gcc-4.6-20100904/gcc/c-decl.c: In function 'finish_struct':
> ../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: 'ggc_alloc_cleared_lang_type' undeclared (first use in this function)
> ../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: (Each undeclared identifier is reported only once
> ../../gcc-4.6-20100904/gcc/c-decl.c:7025: error: for each function it appears in.)
> ../../gcc-4.6-20100904/gcc/c-decl.c:7308:62: error: macro "ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0
> ../../gcc-4.6-20100904/gcc/c-decl.c: In function 'finish_enum':
> ../../gcc-4.6-20100904/gcc/c-decl.c:7308: error: 'ggc_alloc_cleared_lang_type' undeclared (first use in this function)
> make: *** [c-decl.o] Error 1
>
> I don't know what happened with that? When I search the 'ggc_alloc_cleared_lang_type' macro,
> it really doesn't exist in the gcc-4.6-20100904 source, nor under /usr/include, so what is
> that macro real dependency?
 >
 > Who have successfully build gcc-4.6 please help me, or have any clue, 
 > I have searched that ggc_alloc_cleared_lang_type
 > through google, but didn't find out any meaningful results,

This seems to be defined in a header generated during the build
into the $BUILD/gcc :

[root@localhost gcc]# grep ggc_alloc_cleared_lang_type *.h
gtype-desc.h:#define ggc_alloc_cleared_lang_type_u() ((union lang_type_u 
*)(ggc_internal_cleared_alloc_stat (sizeof (union lang_type_u) 
MEM_STAT_INFO)))

On CentOS 5.5/ia32 the build seemed to succeed for the
'x86_64-linux-gnu' target, using gcc-4.1.2 as the host
and build compiler.  Must check the Fedora 13/x86_64
host with its gcc-4.4.4 too but I wouldn't expect any
change with it...

So maybe the Gentoo distro has some problem...

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-06 14:52 ` Kai Ruottu
@ 2010-09-13 14:19   ` Dennis, CHENG Renquan
  2010-09-13 20:04     ` Kai Ruottu
  2010-09-13 20:15     ` Laurynas Biveinis
  0 siblings, 2 replies; 13+ messages in thread
From: Dennis, CHENG Renquan @ 2010-09-13 14:19 UTC (permalink / raw)
  To: Kai Ruottu; +Cc: gcc

On Mon, Sep 6, 2010 at 10:51 PM, Kai Ruottu <kai.ruottu@wippies.com> wrote:
> This seems to be defined in a header generated during the build
> into the $BUILD/gcc :
>
> [root@localhost gcc]# grep ggc_alloc_cleared_lang_type *.h
> gtype-desc.h:#define ggc_alloc_cleared_lang_type_u() ((union lang_type_u
> *)(ggc_internal_cleared_alloc_stat (sizeof (union lang_type_u)
> MEM_STAT_INFO)))
>
> On CentOS 5.5/ia32 the build seemed to succeed for the
> 'x86_64-linux-gnu' target, using gcc-4.1.2 as the host
> and build compiler.  Must check the Fedora 13/x86_64
> host with its gcc-4.4.4 too but I wouldn't expect any
> change with it...
>
> So maybe the Gentoo distro has some problem...

No, I've tried compiling gcc-4.6-20100911 on ubuntu 10.04, the same
problem also happened;

and I also found that macro was defined in a generated header file, in
the gcc build directory;

renquan@flyer-1-1:~/src/gcc-4.6-build$ grep -RsInw
ggc_alloc_cleared_lang_type gcc/
gcc/gtype-desc.h:2451:#define ggc_alloc_cleared_lang_type() ((struct
lang_type *)(ggc_internal_cleared_alloc_stat (sizeof (struct
lang_type) MEM_STAT_INFO)))

this definition just doesn't accept any arguments, but inside
gcc/c-decl.c:7028 and 7311:

        space = ggc_alloc_cleared_lang_type (sizeof (struct lang_type));

  lt = ggc_alloc_cleared_lang_type (sizeof (struct lang_type));

both passes 1 argument, so the compiler report error, so the problem
is how can you succeed compiling that?

renquan@flyer-1-1:~/src/gcc-4.6-build$ (cd gcc/; gcc -c
-DIN_GCC_FRONTEND -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition
-Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I.
-I../../gcc-4.6-20100911/gcc -I../../gcc-4.6-20100911/gcc/.
-I../../gcc-4.6-20100911/gcc/../include
-I../../gcc-4.6-20100911/gcc/../libcpp/include
-I/opt/gektop/usr/include
-I../../gcc-4.6-20100911/gcc/../libdecnumber
-I../../gcc-4.6-20100911/gcc/../libdecnumber/bid -I../libdecnumber
../../gcc-4.6-20100911/gcc/c-decl.c)
../../gcc-4.6-20100911/gcc/c-decl.c: In function ‘grokdeclarator’:
../../gcc-4.6-20100911/gcc/c-decl.c:5536: warning: format not a string
literal and no format arguments
../../gcc-4.6-20100911/gcc/c-decl.c: In function ‘grokparms’:
../../gcc-4.6-20100911/gcc/c-decl.c:6197: warning: format not a string
literal and no format arguments
../../gcc-4.6-20100911/gcc/c-decl.c:7028:64: error: macro
"ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0
../../gcc-4.6-20100911/gcc/c-decl.c: In function ‘finish_struct’:
../../gcc-4.6-20100911/gcc/c-decl.c:7028: error:
‘ggc_alloc_cleared_lang_type’ undeclared (first use in this function)
../../gcc-4.6-20100911/gcc/c-decl.c:7028: error: (Each undeclared
identifier is reported only once
../../gcc-4.6-20100911/gcc/c-decl.c:7028: error: for each function it
appears in.)
../../gcc-4.6-20100911/gcc/c-decl.c:7311:62: error: macro
"ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0
../../gcc-4.6-20100911/gcc/c-decl.c: In function ‘finish_enum’:
../../gcc-4.6-20100911/gcc/c-decl.c:7311: error:
‘ggc_alloc_cleared_lang_type’ undeclared (first use in this function)

Thanks,

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-13 14:19   ` Dennis, CHENG Renquan
@ 2010-09-13 20:04     ` Kai Ruottu
  2010-09-13 20:15     ` Laurynas Biveinis
  1 sibling, 0 replies; 13+ messages in thread
From: Kai Ruottu @ 2010-09-13 20:04 UTC (permalink / raw)
  To: Dennis, CHENG Renquan; +Cc: gcc

13.9.2010 10:39, Dennis, CHENG Renquan kirjoitti:

>> So maybe the Gentoo distro has some problem...
>
> No, I've tried compiling gcc-4.6-20100911 on ubuntu 10.04, the same
> problem also happened;
>
> and I also found that macro was defined in a generated header file, in
> the gcc build directory;
>
> renquan@flyer-1-1:~/src/gcc-4.6-build$ grep -RsInw
> ggc_alloc_cleared_lang_type gcc/
> gcc/gtype-desc.h:2451:#define ggc_alloc_cleared_lang_type() ((struct
> lang_type *)(ggc_internal_cleared_alloc_stat (sizeof (struct
> lang_type) MEM_STAT_INFO)))

In all stages during the native bootstrap this define was :

gtype-desc.h:#define ggc_alloc_cleared_lang_type(SIZE) ((struct 
lang_type *)(ggc_internal_cleared_alloc_stat (SIZE MEM_STAT_INFO)))

in Fedora 13 with the earlier gcc-4.6-20100904 snapshot...
>
> this definition just doesn't accept any arguments, but inside
> gcc/c-decl.c:7028 and 7311:
>
>          space = ggc_alloc_cleared_lang_type (sizeof (struct lang_type));
>
>    lt = ggc_alloc_cleared_lang_type (sizeof (struct lang_type));
>
> both passes 1 argument, so the compiler report error, so the problem
> is how can you succeed compiling that?

My RedHat-based systems (CentOS, Fedora) will generate a different
'#define' for this. Why the Gentoo and Ubuntu are working differently
is hard to say... Ok, I can try also Ubuntu 10.04 so let's see what
it does...

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-13 14:19   ` Dennis, CHENG Renquan
  2010-09-13 20:04     ` Kai Ruottu
@ 2010-09-13 20:15     ` Laurynas Biveinis
  2010-09-13 20:31       ` Dennis, CHENG Renquan
  1 sibling, 1 reply; 13+ messages in thread
From: Laurynas Biveinis @ 2010-09-13 20:15 UTC (permalink / raw)
  To: Dennis, CHENG Renquan; +Cc: Kai Ruottu, gcc

> renquan@flyer-1-1:~/src/gcc-4.6-build$ grep -RsInw
> ggc_alloc_cleared_lang_type gcc/
> gcc/gtype-desc.h:2451:#define ggc_alloc_cleared_lang_type() ((struct
> lang_type *)(ggc_internal_cleared_alloc_stat (sizeof (struct
> lang_type) MEM_STAT_INFO)))
>
> this definition just doesn't accept any arguments, but inside

I am the author of how these macros are generated, but somehow I have
missed this thread initially. Could you send me off-list that
gtype-desc.h file?

Thanks,
-- 
Laurynas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-13 20:15     ` Laurynas Biveinis
@ 2010-09-13 20:31       ` Dennis, CHENG Renquan
  2010-09-13 21:37         ` Laurynas Biveinis
  0 siblings, 1 reply; 13+ messages in thread
From: Dennis, CHENG Renquan @ 2010-09-13 20:31 UTC (permalink / raw)
  To: Laurynas Biveinis; +Cc: Kai Ruottu, gcc

On Mon, Sep 13, 2010 at 8:16 PM, Laurynas Biveinis
<laurynas.biveinis@gmail.com> wrote:
> I am the author of how these macros are generated, but somehow I have
> missed this thread initially. Could you send me off-list that
> gtype-desc.h file?

The problematic gtype-desc.h has been sent to Laurynas separately, I
was compiling only the gcc-core-4.6-20100911.tar.bz2 tarball, because
I only want a c compiler; I searched the macro
ggc_alloc_cleared_lang_type through out the source and build
directory, only one definition and two usage, with conflict arguments
passing:

../path/to/gcc-build$ grep -RsInw ggc_alloc_cleared_lang_type
../gcc-4.6-20100911/ gcc/
../gcc-4.6-20100911/gcc/c-decl.c:7027:  space =
ggc_alloc_cleared_lang_type (sizeof (struct lang_type));
../gcc-4.6-20100911/gcc/c-decl.c:7310:  lt =
ggc_alloc_cleared_lang_type (sizeof (struct lang_type));
gcc/gtype-desc.h:2451:#define ggc_alloc_cleared_lang_type() ((struct
lang_type *)(ggc_internal_cleared_alloc_stat (sizeof (struct
lang_type) MEM_STAT_INFO)))

and in fact, I'm interested why this Kai Ruottu got a
ggc_alloc_cleared_lang_type_u macro with 0 arguments in gtype-desc.h
while my gtype-desc.h doesn't have that macro? I'm not sure he could
get ggc_alloc_cleared_lang_type macro or not, so how can he succeed
his compilation;

On Mon, Sep 6, 2010 at 10:51 PM, Kai Ruottu <kai.ruottu@wippies.com> wrote:
> This seems to be defined in a header generated during the build
> into the $BUILD/gcc :
>
> [root@localhost gcc]# grep ggc_alloc_cleared_lang_type *.h
> gtype-desc.h:#define ggc_alloc_cleared_lang_type_u() ((union lang_type_u
> *)(ggc_internal_cleared_alloc_stat (sizeof (union lang_type_u)
> MEM_STAT_INFO)))

>
> Thanks,
> --
> Laurynas
>

--
Cheng, from Singapore

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-13 20:31       ` Dennis, CHENG Renquan
@ 2010-09-13 21:37         ` Laurynas Biveinis
  2010-09-13 21:42           ` Dennis, CHENG Renquan
  0 siblings, 1 reply; 13+ messages in thread
From: Laurynas Biveinis @ 2010-09-13 21:37 UTC (permalink / raw)
  To: Dennis, CHENG Renquan; +Cc: Kai Ruottu, gcc

2010/9/13 Dennis, CHENG Renquan <crquan@fedoraproject.org>:
> On Mon, Sep 13, 2010 at 8:16 PM, Laurynas Biveinis
> <laurynas.biveinis@gmail.com> wrote:
>> I am the author of how these macros are generated, but somehow I have
>> missed this thread initially. Could you send me off-list that
>> gtype-desc.h file?
>
> The problematic gtype-desc.h has been sent to Laurynas separately, I
> was compiling only the gcc-core-4.6-20100911.tar.bz2 tarball, because
> I only want a c compiler

Thanks. I assume that you pass --enable-languages=c to configure?

I will investigate this tomorrow and will get back to you.

Regards,
-- 
Laurynas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-13 21:37         ` Laurynas Biveinis
@ 2010-09-13 21:42           ` Dennis, CHENG Renquan
  2010-09-14 14:01             ` Dennis, CHENG Renquan
  0 siblings, 1 reply; 13+ messages in thread
From: Dennis, CHENG Renquan @ 2010-09-13 21:42 UTC (permalink / raw)
  To: Laurynas Biveinis; +Cc: Kai Ruottu, gcc

On Mon, Sep 13, 2010 at 9:32 PM, Laurynas Biveinis
<laurynas.biveinis@gmail.com> wrote:
> Thanks. I assume that you pass --enable-languages=c to configure?

No, just a very simple configure and make command:

../path/to/gcc-4.6-build$ time { ../gcc-4.6-20100911/configure
--prefix=/usr --disable-nls --with-system-zlib && make --debug=b; } |&
tee build-log

Because the source code is uncompressed from gcc-core-4.6-..., it only
includes the c compiler, I leave the configure to figure out there is
only c compiler source code;

>
> I will investigate this tomorrow and will get back to you.
>
> Regards,
> --
> Laurynas
>

--
Cheng, from Singapore

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-13 21:42           ` Dennis, CHENG Renquan
@ 2010-09-14 14:01             ` Dennis, CHENG Renquan
  2010-09-14 14:23               ` Kai Ruottu
  0 siblings, 1 reply; 13+ messages in thread
From: Dennis, CHENG Renquan @ 2010-09-14 14:01 UTC (permalink / raw)
  To: Laurynas Biveinis; +Cc: Kai Ruottu, gcc

For anyone could succeed compiling gcc-4.6, could you paste a correct
ggc_alloc_cleared_lang_type macro ?

just run this grep command under your build directory,

gcc-4.6-build$ grep -RsInw ggc_alloc_cleared_lang_type gcc/
gcc/gtype-desc.h:2451:#define ggc_alloc_cleared_lang_type() ((struct
lang_type *)(ggc_internal_cleared_alloc_stat (sizeof (struct
lang_type) MEM_STAT_INFO)))

thanks,

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: on how to compile gcc-4.6 correctly?
  2010-09-14 14:01             ` Dennis, CHENG Renquan
@ 2010-09-14 14:23               ` Kai Ruottu
  0 siblings, 0 replies; 13+ messages in thread
From: Kai Ruottu @ 2010-09-14 14:23 UTC (permalink / raw)
  To: Dennis, CHENG Renquan; +Cc: Laurynas Biveinis, gcc

14.9.2010 11:29, Dennis, CHENG Renquan kirjoitti:

> For anyone could succeed compiling gcc-4.6, could you paste a correct
> ggc_alloc_cleared_lang_type macro ?
>
> just run this grep command under your build directory,
>
> gcc-4.6-build$ grep -RsInw ggc_alloc_cleared_lang_type gcc/
> gcc/gtype-desc.h:2451:#define ggc_alloc_cleared_lang_type() ((struct
> lang_type *)(ggc_internal_cleared_alloc_stat (sizeof (struct
> lang_type) MEM_STAT_INFO)))

[root@hp-pavilion build]# grep -RsInw ggc_alloc_cleared_lang_type gcc/
gcc/gtype-desc.h:3450:#define ggc_alloc_cleared_lang_type(SIZE) ((struct 
lang_type *)(ggc_internal_cleared_alloc_stat (SIZE MEM_STAT_INFO)))



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-09-14 12:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-06  3:17 on how to compile gcc-4.6 correctly? Dennis
2010-09-06  9:18 ` Justin P. Mattock
2010-09-06  9:54   ` Cheng Rk
2010-09-06 10:32     ` Justin Mattock
2010-09-06 14:52 ` Kai Ruottu
2010-09-13 14:19   ` Dennis, CHENG Renquan
2010-09-13 20:04     ` Kai Ruottu
2010-09-13 20:15     ` Laurynas Biveinis
2010-09-13 20:31       ` Dennis, CHENG Renquan
2010-09-13 21:37         ` Laurynas Biveinis
2010-09-13 21:42           ` Dennis, CHENG Renquan
2010-09-14 14:01             ` Dennis, CHENG Renquan
2010-09-14 14:23               ` Kai Ruottu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).