When configuring and building gcc 3.2 on a i386-linux machine c++ programs fail because you use 486 code in inline assembler statements in your atomicity headers (xadd, cmpxchg and others) libjava has the same problems. It would be nice if you could rework the header files to use non-atomic i386 instructions if such behaviour is required. A special configure option would do, too. If you need help how the appropriate headers for i386 might look like, mail me, but I haven't got the files around here at the university, so it might take some time to send them in... Release: gcc-3.2 Environment: i388 running Linux 2.2.21 and glibc 2.2.5 How-To-Repeat: You can't repeat it unless you still have an old i386 around...
Fix: rework i386 atomicity header files to make a distinction between i386 and i486 and newer...
State-Changed-From-To: open->analyzed State-Changed-Why: Thank you for your bug report. We already make a distinction between i386 and higher. If we compare those two files: % cd libstdc++-v3/config/cpu % diff i386/atomicity.h i486/atomicity.h 1c1 < // Low-level functions for atomic operations: x86, x < 4 version -*- C++ -*- --- > // Low-level functions for atomic operations: x86, x >= 4 version -*- C++ -*- 58,59d57 < < % Well, crumbs. That's embarassing. I have not done any CVS archaeology to find out when this happened, but I'm sure it was a long time ago. (Those files are rarely changed.) And it's gone undetected this long because there are only five i386 machines still in use, and you have one of them. :-) Somebody more familiar with i386 will have to rewrite those instructions. And remove those two useless blank lines. :-)
Responsible-Changed-From-To: unassigned->bkoz Responsible-Changed-Why: Mine.
State-Changed-From-To: analyzed->feedback State-Changed-Why: This target, i386, should have been using the generic configuration, not the i486 files. I switched it. -benjamin
From: bkoz@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libstdc++/7926 Date: 2 Nov 2002 01:42:23 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: bkoz@gcc.gnu.org 2002-11-01 17:42:22 Modified files: libstdc++-v3 : ChangeLog configure.target Removed files: libstdc++-v3/config/cpu/arm: atomicity.h libstdc++-v3/config/cpu/i386: atomicity.h libstdc++-v3/config/cpu/x86-64: atomicity.h Log message: 2002-11-01 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/7926 * configure.target: Simplify. * config/cpu/i386/atomicity.h: Remove. * config/cpu/i386: Remove. * config/cpu/arm/atomicity.h: Remove. * config/cpu/arm: Remove. * config/cpu/x86-64/atomicity.h: Remove. * config/cpu/x86-64: Remove. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1410&r2=1.1411 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.target.diff?cvsroot=gcc&r1=1.53&r2=1.54 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/cpu/arm/atomicity.h.diff?cvsroot=gcc&r1=1.4&r2=NONE http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/cpu/i386/atomicity.h.diff?cvsroot=gcc&r1=1.3&r2=NONE http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/cpu/x86-64/atomicity.h.diff?cvsroot=gcc&r1=1.1&r2=NONE
State-Changed-From-To: feedback->closed State-Changed-Why: This is fixed on mainline.