Bug 42827 - error in building libgcc; error: 'BITS_PER_UNIT' undeclared
Summary: error in building libgcc; error: 'BITS_PER_UNIT' undeclared
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.3.4
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-21 14:18 UTC by Marek Artur Penther
Modified: 2012-01-16 09:30 UTC (History)
1 user (show)

See Also:
Host: i686-linux-gnu
Target: i686-linux-gnu
Build: i686-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Artur Penther 2010-01-21 14:18:13 UTC
make[4]: Opuszczenie katalogu `/home/data/gcc/build/gcc-4.3.4/i686-linux-gnu/libgcc'
/home/data/gcc/build/gcc-4.3.4/./gcc/xgcc -B/home/data/gcc/build/gcc-4.3.4/./gcc/ -B/usr/i686-linux-gnu/bin/ -B/usr/i686-linux-gnu/lib/ -isystem /usr/i686-linux-gnu/include -isystem /usr/i686-linux-gnu/sys-include -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH -g -fkeep-inline-functions -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH -mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH  -I. -I. -I../.././gcc -I../../../../sources/gcc-4.3.4/libgcc -I../../../../sources/gcc-4.3.4/libgcc/. -I../../../../sources/gcc-4.3.4/libgcc/../gcc -I../../../../sources/gcc-4.3.4/libgcc/../include -I../../../../sources/gcc-4.3.4/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../../sources/gcc-4.3.4/libgcc/../gcc/libgcc2.c \
          -fvisibility=hidden -DHIDE_EXPORTS
../../../../sources/gcc-4.3.4/libgcc/../gcc/libgcc2.c: In function ‘__mulhi3’:
../../../../sources/gcc-4.3.4/libgcc/../gcc/libgcc2.c:560: error: ‘BITS_PER_UNIT’ undeclared (first use in this function)
../../../../sources/gcc-4.3.4/libgcc/../gcc/libgcc2.c:560: error: (Each undeclared identifier is reported only once
../../../../sources/gcc-4.3.4/libgcc/../gcc/libgcc2.c:560: error: for each function it appears in.)
make[3]: *** [_muldi3.o] Błąd 1
make[3]: Opuszczenie katalogu `/home/data/gcc/build/gcc-4.3.4/i686-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Błąd 2
make[2]: Opuszczenie katalogu `/home/data/gcc/build/gcc-4.3.4'
make[1]: *** [stage1-bubble] Błąd 2
make[1]: Opuszczenie katalogu `/home/data/gcc/build/gcc-4.3.4'
make: *** [all] Błąd 2
r
Comment 1 Richard Biener 2010-01-21 14:42:50 UTC
works for me.  Are you building inside the source tree?
Comment 2 Marek Artur Penther 2010-01-21 15:57:27 UTC
Subject: Re:  error in building libgcc; error: 'BITS_PER_UNIT' undeclared

No, I building completely outside of source tree:
/home/data/gcc/source/gcc-4.3.4 - that is source
/home/data/gcc/build/gcc-4.3.4 - that is build
I using compiler flags anywhere I can, but I tryed build this by invoking it 
by hand without mine compiler flag - still not working.

On Thursday 21 January 2010 14:42, rguenth at gcc dot gnu dot org wrote:
> ------- Comment #1 from rguenth at gcc dot gnu dot org  2010-01-21 14:42
> ------- works for me.  Are you building inside the source tree?

Comment 3 Andrew Pinski 2010-02-07 20:18:22 UTC
How did you invoke configure and make?  What are your env variables settings for CFLAGS, STAGE1_CFLAGS and BOOT_CFLAGS?

Comment 4 Marek Artur Penther 2010-02-07 22:07:41 UTC
Subject: Re:  error in building libgcc; error: 'BITS_PER_UNIT' undeclared

BOOT_CFLAGS is same as CFLAGS:
-mmmx -m3dnow -msse -march=athlon-xp -mtune=athlon-xp -O2 -pipe -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_3DNOW_PREFETCH
STAGE1_CFLAGS is empty (not set)
anyway I forcing using all setuped flags by invoking make with this flags 
before make, because I using chroot environment to build gcc. I started to 
use it, when I had problem with java, but I found out it is bug in gcc.

On Sunday 07 February 2010 20:18, pinskia at gcc dot gnu dot org wrote:
> ------- Comment #3 from pinskia at gcc dot gnu dot org  2010-02-07 20:18
> ------- How did you invoke configure and make?  What are your env variables
> settings for CFLAGS, STAGE1_CFLAGS and BOOT_CFLAGS?

Comment 5 Andrew Pinski 2010-02-07 22:09:52 UTC
So I think we are miscompiling GCC with BOOT_CFLAGS set.  I don't have access to an x86 machine which could use those CFLAGS so someone else needs to debug this.  Can you try 4.4.3?
Comment 6 Marek Artur Penther 2010-02-08 05:55:34 UTC
Subject: Re:  error in building libgcc; error: 'BITS_PER_UNIT' undeclared

I can't compile it without 4.3.4, becuase depends could not be compiled by 
4.2.4.
There is another bug in all versions of gcc:
building libada (if I am not wrong), gnatmake using just gcc, even if other 
exec is forced to be used by using $CC (in my case gcc-4.2.4 with flags), and 
this effecting in not compatible *.ali files. I will find it and report, but 
not now, cause I going to work right now.

On Sunday 07 February 2010 22:09, pinskia at gcc dot gnu dot org wrote:
> ------- Comment #5 from pinskia at gcc dot gnu dot org  2010-02-07 22:09
> ------- So I think we are miscompiling GCC with BOOT_CFLAGS set.  I don't
> have access to an x86 machine which could use those CFLAGS so someone else
> needs to debug this.  Can you try 4.4.3?

Comment 7 Andrew Pinski 2012-01-16 09:30:23 UTC
>I can't compile it without 4.3.4, becuase depends could not be compiled by 
4.2.4.

Wrong, don't compile with those flags and then try with that newly build one with those flags.

Anyways no feedback about doing the bootstrap with a newer toolchain so closing as invalid.