Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18365 - squeak has a problem with gcc 3.x. autoconf doesn't detect DOUBLE_WORD_ORDER
Summary: squeak has a problem with gcc 3.x. autoconf doesn't detect DOUBLE_WORD_ORDER
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High critical
Assignee: Jared H. Hudson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-28 09:01 UTC by Norbert hartl
Modified: 2003-04-16 02:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert hartl 2003-03-28 09:01:12 UTC
This is a copy&paste block from the squeak-dev mailinglist:

<CUT>
Hi,

there has been a open problem with all GCC 3.x on Linux x86 for quite a
long time. If you run configure the double order is not determined
correctly. So you still have to set

#define DOUBLE_WORD_ORDER 1

manually in the automatically created config.h. Otherwise Squeak will
produce later a lot of float errors and break down quickly.

Responsible for the detection of the double order is the
AC_C_DOUBLE_ORDER macro used in the configure script. This macro is
defined in acinclude.m4. It tries to detect the double order using the
following test program:

main()
     {
     double d = 1.0;
     return *(int*)&d == 0;
     }

If you compile it with "gcc -g -O2" as it is normal within configure
scripts on Linux, the program does not yield the desired results when
using GCC 3.x. This is because of the "-O2" optimizing option, which
seems to have a different behavior since GCC 3.0. The reason seems to be
a mix of options that -O2 stands for. If you, for example, provide
"-fno-strict-aliasing" or "-fno-schedule-insns2" in addition to "-O2",
then the result is the originally intended. But only providing the two
complementary options without "-O2" is not enough to reproduce the
strange behavior that "-O2" alone leads to.

However, the problem follows from the double*-to-int*-cast, because a
pointer to an 8-byte-value is cast to a 4-byte-value. Such a cast has
actually no defined behavior. So the result can change at different
optimization levels.
</CUT>

Reproducible: Always
Steps to Reproduce:
1. emerge squeak
2. run squeak


Actual Results:  
You will see that some title bars in squeak remain black after starting up. A
few secondes later squeak will crash.

Expected Results:  
stay alive :)
Comment 1 Norbert hartl 2003-04-16 02:57:27 UTC
I checked to source build again and the DOUBLE_WORD_ORDER is set correctly. My squeak still does not working but this has nothing do with this bug anymore.