Bootstrap failure on i686: libstdc++-v3/intl/libgettext.h: Filenot found

Andreas Jaeger aj@suse.de
Wed Aug 8 05:05:00 GMT 2001


Andreas Jaeger <aj@suse.de> writes:

> Bootstrapping the current CVS version on i686-linux-gnu gives:
>
> linking /cvs/gcc/libstdc++-v3/config/io/basic_file_stdio.cc to src/basic_file.cc
> linking /cvs/gcc/libstdc++-v3/intl/libgettext.h to intl/libintl.h
> configure: error: /cvs/gcc/libstdc++-v3/intl/libgettext.h: File not found
> make[1]: *** [configure-target-libstdc++-v3] Error 1
>
> I run configure as:
> /cvs/gcc/configure --prefix=/opt/gcc-3.1-devel --enable-shared \
>          --enable-threads=posix --enable-clocale=gnu  \
>          --with-gnu-as --with-gnu-ld --disable-nls --with-system-zlib \
>          --enable-languages=c,objc,c++,f77,java
>
> Any ideas?

I just tried without the --enable-clocale=gnu patch and encountered no
problems

Btw. I'm running glibc 2.2.2 on i686-linux-gnu with recent CVS
binutils,

Andreas
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7cSsCOJpWPMJyoSYRArxWAJoC3qk+gZOs8VlePwMrViuTK4tVRACePx0A
mlKcUCargOyzXTRYGLz6j8Y=
=0X1Y
-----END PGP SIGNATURE-----From mkoerner@itp.phys.ethz.ch Wed Aug 08 05:36:00 2001
From: mkoerner@itp.phys.ethz.ch
To: gcc-gnats@gcc.gnu.org
Subject: target/3959: Inline asm bug, when ebp is marked as clobbered.
Date: Wed, 08 Aug 2001 05:36:00 -0000
Message-id: <200108081229.OAA02981@sphinx.ethz.ch>
X-SW-Source: 2001-08/msg00220.html
Content-length: 2352

>Number:         3959
>Category:       target
>Synopsis:       Inline asm generates bad code on i386 when register ebp is clobbered.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 08 05:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Mathias Koerner
>Release:        3.0
>Organization:
ETHZ
>Environment:
System: Linux sphinx 2.2.14-SMP #3 SMP Fri Jun 30 15:24:40 CEST 2000 i686 unknown
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /scratch/local-1/gcc-3.0/configure --prefix=/usr/local/gcc-3.0
>Description:
The executable generated by compiling the following code produces
a segmentation fault:

int main() {
  int n;
  n = 5;
  asm ("movl %0,%%ebp" : : "g"(n) : "ebp" );
  return 0;
}

This happens, because the ebp register is used by gcc after
the asm instruction, before it is restored properly from the stack.

>How-To-Repeat:
Compile the program above and run it. The preprocessed code is:

# 1 "br2.cpp"
int main() {
  int n;
  n = 5;
  asm ("movl %0,%%ebp" : : "g"(n) : "ebp" );
  return 0;
}

>Fix:
The critical part of the assembler file generated from the code above is:

.LFB1:
        pushl   %ebp
.LCFI0:
        movl    %esp, %ebp
.LCFI1:
        subl    $4, %esp
.LCFI2:
        movl    $5, -4(%ebp)
#APP
        movl -4(%ebp),%ebp
#NO_APP
        movl    $0, %eax
        movl    %ebp, %esp
        popl    %ebp

The critical line here is "movl %ebp, %esp" after #NO_APP. %ebp has been 
marked clobbered and actually clobbered. A solution would be to push
%ebp immediately before #APP and pop it after #NO_APP (the code works
properly, when I write:

#APP
	pushl %ebp
	movl -4(%ebp),%ebp
	popl %ebp
#NO_APP

I have looked through the gcc documentation. I did not find any note,
that one cannot clobber ebp. I'm not an assembler expert, so it might well
be that clobbering ebp is "insane", but it would be nice, if there was
a hint in the documentation, or if gcc would warn that clobbering ebp is
not a good thing to do.

I finally hope that this bug report is useful and would like to
thank the people looking at the report for the work they have done/
are doing.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list