harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib][build] difference between classlib 'debug' and 'release' build modes
Date Tue, 26 Jun 2007 13:00:19 GMT
Vladimir Ivanov wrote:
> Fwd it from the '[general][M2] Code frozen' thread
> ===========================
> OK, looking through the federated build I found the difference between
> my 'DRLVM' build and federated one. In the first case 'classlib' was
> built in the 'debug' mode.
> When classlib was rebuilt with -Dhy.cfg=release option the
> StrictMathTest failed on this build too.
> So we should look at the differences between classlib 'debug' and
> 'release' build modes to find the reason of these test failure.

The most pertinent difference is that the natives are compiled with "-g"
in debug mode, and "-O1" in release mode.

There are a bunch of natives in StrictMath.  Could you try reducing the
optimization level of the native code compile for them separately and
see if that fixes the problem?

The fdlibm code we depend upon is already tweaked to use "-O0", so for
now I'd just try the same override for the LUNI natives to see if that
is where the problem lies.

Something like this (untested), below.


Index: src/main/native/luni/unix/makefile
--- src/main/native/luni/unix/makefile	(revision 550526)
+++ src/main/native/luni/unix/makefile	(working copy)
@@ -22,6 +22,9 @@
 # CFLAGS += -fpic -Wall -Werror
 CFLAGS += -fpic -Wall

+# Override OPTS to remove optimizations
+OPTS := -O0
 	$(SHAREDSUB)luni_copyright.o $(SHAREDSUB)file.o procimpl.o \
 	$(SHAREDSUB)oos.o $(SHAREDSUB)nethelp.o \

View raw message