changeset 828:354b5ff4f988

2008-04-21 Christan Thalinger <twisti@complang.tuwien.ac.at> * acinclude.m4 (ENABLE_FAST_BUILD): Removed. (ENABLE_OPTIMIZATIONS): New function. * configure.ac (ENABLE_FAST_BUILD): Removed call. (ENABLE_OPTIMIZATIONS): Added call. * Makefile.am [!ENABLE_OPTIMIZATIONS] (ICEDTEA_ENV): Set NO_OPTIMIZATIONS and CC_NO_OPT. (FAST_BUILD_PATCH): Removed. (ICEDTEA_PATCHES): Removed FAST_BUILD_PATCH. * Makefile.in, configure: Regenerated. * patches/icedtea-speed.patch: Removed.
author Christian Thalinger <twisti@complang.tuwien.ac.at>
date Mon, 21 Apr 2008 17:03:11 +0200
parents 46671a3d6f13
children db72f04f6dd5
files ChangeLog Makefile.am Makefile.in acinclude.m4 configure configure.ac patches/icedtea-speed.patch
diffstat 7 files changed, 98 insertions(+), 112 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Apr 21 16:45:07 2008 +0200
+++ b/ChangeLog	Mon Apr 21 17:03:11 2008 +0200
@@ -1,3 +1,16 @@
+2008-04-21  Christan Thalinger  <twisti@complang.tuwien.ac.at>
+
+	* acinclude.m4 (ENABLE_FAST_BUILD): Removed.
+	(ENABLE_OPTIMIZATIONS): New function.
+	* configure.ac (ENABLE_FAST_BUILD): Removed call.
+	(ENABLE_OPTIMIZATIONS): Added call.
+	* Makefile.am [!ENABLE_OPTIMIZATIONS] (ICEDTEA_ENV): Set
+	NO_OPTIMIZATIONS and CC_NO_OPT.
+	(FAST_BUILD_PATCH): Removed.
+	(ICEDTEA_PATCHES): Removed FAST_BUILD_PATCH.
+	* Makefile.in, configure: Regenerated.
+	* patches/icedtea-speed.patch: Removed.
+
 2008-04-21  Christan Thalinger  <twisti@complang.tuwien.ac.at>
 
 	* acinclude.m4 (SET_CORE_BUILD): Always set to true when building
--- a/Makefile.am	Mon Apr 21 16:45:07 2008 +0200
+++ b/Makefile.am	Mon Apr 21 17:03:11 2008 +0200
@@ -39,7 +39,7 @@
 	hotspot hotspot-helper clean-extra
 
 EXTRA_DIST = rt generated $(ICEDTEA_PATCHES) $(ICEDTEA_ECJ_PATCH) \
-	gcjwebplugin.cc patches/icedtea-speed.patch tools-copy contrib ports \
+	gcjwebplugin.cc tools-copy contrib ports \
 	patches/icedtea-gcc-4.3.patch extra $(ZERO_PATCHES) \
 	patches/icedtea-cacao.patch
 
@@ -106,6 +106,12 @@
 	"ALT_HOTSPOT_IMPORT_PATH=$(CACAO)"
 endif
 
+if !ENABLE_OPTIMIZATIONS
+ICEDTEA_ENV += \
+	"NO_OPTIMIZATIONS=true" \
+	"CC_NO_OPT=-O0 -g"
+endif
+
 if !ENABLE_DOCS
 ICEDTEA_ENV += \
 	"NO_DOCS=true"
@@ -163,6 +169,12 @@
 	"ALT_HOTSPOT_IMPORT_PATH=$(CACAO)"
 endif
 
+if !ENABLE_OPTIMIZATIONS
+ICEDTEA_ENV_ECJ += \
+	"NO_OPTIMIZATIONS=true" \
+	"CC_NO_OPT=-O0 -g"
+endif
+
 if !ENABLE_DOCS
 ICEDTEA_ENV_ECJ += \
 	"NO_DOCS=true"
@@ -223,13 +235,6 @@
 	mkdir -p stamps
 	touch stamps/ports.stamp
 
-# Patch OpenJDK sources for plug replacements.
-if FAST_BUILD
-  FAST_BUILD_PATCH = patches/icedtea-speed.patch
-else
-  FAST_BUILD_PATCH =
-endif
-
 # If new gcc is installed, apply 4.3 patch
 if GCC_OLD
   GCC_PATCH =
@@ -299,7 +304,6 @@
 	patches/icedtea-LCMS-setTagData.patch \
 	patches/icedtea-color-createcontext.patch \
 	$(GCC_PATCH) \
-	$(FAST_BUILD_PATCH) \
 	$(DISTRIBUTION_PATCHES)
 
 if WITH_CACAO
--- a/Makefile.in	Mon Apr 21 16:45:07 2008 +0200
+++ b/Makefile.in	Mon Apr 21 17:03:11 2008 +0200
@@ -34,16 +34,24 @@
 @WITH_CACAO_TRUE@am__append_1 = \
 @WITH_CACAO_TRUE@	"ALT_HOTSPOT_IMPORT_PATH=$(CACAO)"
 
-@ENABLE_DOCS_FALSE@am__append_2 = \
+@ENABLE_OPTIMIZATIONS_FALSE@am__append_2 = \
+@ENABLE_OPTIMIZATIONS_FALSE@	"NO_OPTIMIZATIONS=true" \
+@ENABLE_OPTIMIZATIONS_FALSE@	"CC_NO_OPT=-O0 -g"
+
+@ENABLE_DOCS_FALSE@am__append_3 = \
 @ENABLE_DOCS_FALSE@	"NO_DOCS=true"
 
-@WITH_CACAO_TRUE@am__append_3 = \
+@WITH_CACAO_TRUE@am__append_4 = \
 @WITH_CACAO_TRUE@	"ALT_HOTSPOT_IMPORT_PATH=$(CACAO)"
 
-@ENABLE_DOCS_FALSE@am__append_4 = \
+@ENABLE_OPTIMIZATIONS_FALSE@am__append_5 = \
+@ENABLE_OPTIMIZATIONS_FALSE@	"NO_OPTIMIZATIONS=true" \
+@ENABLE_OPTIMIZATIONS_FALSE@	"CC_NO_OPT=-O0 -g"
+
+@ENABLE_DOCS_FALSE@am__append_6 = \
 @ENABLE_DOCS_FALSE@	"NO_DOCS=true"
 
-@WITH_CACAO_TRUE@am__append_5 = \
+@WITH_CACAO_TRUE@am__append_7 = \
 @WITH_CACAO_TRUE@	patches/icedtea-cacao.patch
 
 subdir = .
@@ -247,7 +255,7 @@
 @NETX_PLUGIN_FALSE@NETX_PATCH = 
 @NETX_PLUGIN_TRUE@NETX_PATCH = patches/icedtea-netx-plugin.patch
 EXTRA_DIST = rt generated $(ICEDTEA_PATCHES) $(ICEDTEA_ECJ_PATCH) \
-	gcjwebplugin.cc patches/icedtea-speed.patch tools-copy contrib ports \
+	gcjwebplugin.cc tools-copy contrib ports \
 	patches/icedtea-gcc-4.3.patch extra $(ZERO_PATCHES) \
 	patches/icedtea-cacao.patch
 
@@ -302,7 +310,7 @@
 	"FT2_LIB=$(FREETYPE2_LIBS)" \
 	"ALT_PARALLEL_COMPILE_JOBS=$(PARALLEL_JOBS)" \
 	"HOTSPOT_BUILD_JOBS=$(PARALLEL_JOBS)" $(am__append_1) \
-	$(am__append_2)
+	$(am__append_2) $(am__append_3)
 
 # OpenJDK ecj build environment.
 ICEDTEA_BUILD_DIR_ECJ = \
@@ -341,8 +349,8 @@
 	"FREETYPE2_HEADERS=$(FREETYPE2_CFLAGS)" \
 	"FT2_LIB=$(FREETYPE2_LIBS)" \
 	"ALT_PARALLEL_COMPILE_JOBS=$(PARALLEL_JOBS)" \
-	"HOTSPOT_BUILD_JOBS=$(PARALLEL_JOBS)" $(am__append_3) \
-	$(am__append_4)
+	"HOTSPOT_BUILD_JOBS=$(PARALLEL_JOBS)" $(am__append_4) \
+	$(am__append_5) $(am__append_6)
 
 # OpenJDK Source Preparation Targets
 # ==================================
@@ -351,10 +359,6 @@
 OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/
 @USE_ALT_OPENJDK_SRC_ZIP_FALSE@OPENJDK_SRC_ZIP = openjdk-6-src-$(OPENJDK_VERSION)-$(OPENJDK_DATE).tar.gz
 @USE_ALT_OPENJDK_SRC_ZIP_TRUE@OPENJDK_SRC_ZIP = $(ALT_OPENJDK_SRC_ZIP)
-@FAST_BUILD_FALSE@FAST_BUILD_PATCH = 
-
-# Patch OpenJDK sources for plug replacements.
-@FAST_BUILD_TRUE@FAST_BUILD_PATCH = patches/icedtea-speed.patch
 @GCC_OLD_FALSE@GCC_PATCH = patches/icedtea-gcc-4.3.patch
 
 # If new gcc is installed, apply 4.3 patch
@@ -406,7 +410,7 @@
 	patches/icedtea-ia64-fdlibm.patch \
 	patches/icedtea-LCMS-setTagData.patch \
 	patches/icedtea-color-createcontext.patch $(GCC_PATCH) \
-	$(FAST_BUILD_PATCH) $(DISTRIBUTION_PATCHES) $(am__append_5)
+	$(DISTRIBUTION_PATCHES) $(am__append_7)
 
 # Patch OpenJDK for plug replacements and ecj.
 ICEDTEA_ECJ_PATCH = patches/icedtea-ecj.patch
--- a/acinclude.m4	Mon Apr 21 16:45:07 2008 +0200
+++ b/acinclude.m4	Mon Apr 21 17:03:11 2008 +0200
@@ -491,18 +491,27 @@
   AC_SUBST(XERCES2_JAR)
 ])
 
-AC_DEFUN([ENABLE_FAST_BUILD],
+AC_DEFUN([ENABLE_OPTIMIZATIONS],
 [
-  AC_ARG_ENABLE([fast-build],
-                [AS_HELP_STRING(--enable-fast-build,optimize for quick building: use -O0 and do not build documentation)],
+  AC_MSG_CHECKING(whether to disable optimizations)
+  AC_ARG_ENABLE([optimizations],
+                [AS_HELP_STRING(--disable-optimizations,build with -O0 -g [[default=no]])],
   [
-    AC_MSG_CHECKING(fast build)
-    AC_MSG_RESULT(will apply patches/icedtea-speed.patch)
-    AM_CONDITIONAL(FAST_BUILD, test x = x)
+    case "${enableval}" in
+      no)
+        AC_MSG_RESULT([yes, building with -O0 -g])
+        enable_optimizations=no
+        ;;
+      *)
+        AC_MSG_RESULT([no])
+        enable_optimizations=yes
+        ;;
+    esac
   ],
   [
-    AM_CONDITIONAL(FAST_BUILD, test x != x)
+    enable_optimizations=yes
   ])
+  AM_CONDITIONAL([ENABLE_OPTIMIZATIONS], test x"${enable_optimizations}" = "xyes")
 ])
 
 AC_DEFUN([FIND_TOOL],
--- a/configure	Mon Apr 21 16:45:07 2008 +0200
+++ b/configure	Mon Apr 21 17:03:11 2008 +0200
@@ -756,8 +756,8 @@
 WITH_CACAO_TRUE
 WITH_CACAO_FALSE
 CACAO
-FAST_BUILD_TRUE
-FAST_BUILD_FALSE
+ENABLE_OPTIMIZATIONS_TRUE
+ENABLE_OPTIMIZATIONS_FALSE
 ZERO_BUILD_TRUE
 ZERO_BUILD_FALSE
 CPP
@@ -1424,8 +1424,7 @@
   --enable-dependency-tracking   do not reject slow dependency extractors
   --disable-gcjwebplugin  Disable compilation of browser plugin
   --disable-docs          Disable generation of documentation
-  --enable-fast-build     optimize for quick building: use -O0 and do not
-                          build documentation
+  --disable-optimizations build with -O0 -g [default=no]
   --enable-zero           use zero-assembler port on non-zero platforms
   --enable-netx-plugin    enable experimental caching and security support in
                           applet plugin
@@ -7970,33 +7969,36 @@
 
 
 
-  # Check whether --enable-fast-build was given.
-if test "${enable_fast_build+set}" = set; then
-  enableval=$enable_fast_build;
-    { echo "$as_me:$LINENO: checking fast build" >&5
-echo $ECHO_N "checking fast build... $ECHO_C" >&6; }
-    { echo "$as_me:$LINENO: result: will apply patches/icedtea-speed.patch" >&5
-echo "${ECHO_T}will apply patches/icedtea-speed.patch" >&6; }
-     if test x = x; then
-  FAST_BUILD_TRUE=
-  FAST_BUILD_FALSE='#'
-else
-  FAST_BUILD_TRUE='#'
-  FAST_BUILD_FALSE=
-fi
-
-
-else
-
-     if test x != x; then
-  FAST_BUILD_TRUE=
-  FAST_BUILD_FALSE='#'
-else
-  FAST_BUILD_TRUE='#'
-  FAST_BUILD_FALSE=
-fi
-
-
+  { echo "$as_me:$LINENO: checking whether to disable optimizations" >&5
+echo $ECHO_N "checking whether to disable optimizations... $ECHO_C" >&6; }
+  # Check whether --enable-optimizations was given.
+if test "${enable_optimizations+set}" = set; then
+  enableval=$enable_optimizations;
+    case "${enableval}" in
+      no)
+        { echo "$as_me:$LINENO: result: yes, building with -O0 -g" >&5
+echo "${ECHO_T}yes, building with -O0 -g" >&6; }
+        enable_optimizations=no
+        ;;
+      *)
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+        enable_optimizations=yes
+        ;;
+    esac
+
+else
+
+    enable_optimizations=yes
+
+fi
+
+   if test x"${enable_optimizations}" = "xyes"; then
+  ENABLE_OPTIMIZATIONS_TRUE=
+  ENABLE_OPTIMIZATIONS_FALSE='#'
+else
+  ENABLE_OPTIMIZATIONS_TRUE='#'
+  ENABLE_OPTIMIZATIONS_FALSE=
 fi
 
 
@@ -12251,17 +12253,10 @@
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
-if test -z "${FAST_BUILD_TRUE}" && test -z "${FAST_BUILD_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"FAST_BUILD\" was never defined.
+if test -z "${ENABLE_OPTIMIZATIONS_TRUE}" && test -z "${ENABLE_OPTIMIZATIONS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENABLE_OPTIMIZATIONS\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"FAST_BUILD\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${FAST_BUILD_TRUE}" && test -z "${FAST_BUILD_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"FAST_BUILD\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"FAST_BUILD\" was never defined.
+echo "$as_me: error: conditional \"ENABLE_OPTIMIZATIONS\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -13002,8 +12997,8 @@
 WITH_CACAO_TRUE!$WITH_CACAO_TRUE$ac_delim
 WITH_CACAO_FALSE!$WITH_CACAO_FALSE$ac_delim
 CACAO!$CACAO$ac_delim
-FAST_BUILD_TRUE!$FAST_BUILD_TRUE$ac_delim
-FAST_BUILD_FALSE!$FAST_BUILD_FALSE$ac_delim
+ENABLE_OPTIMIZATIONS_TRUE!$ENABLE_OPTIMIZATIONS_TRUE$ac_delim
+ENABLE_OPTIMIZATIONS_FALSE!$ENABLE_OPTIMIZATIONS_FALSE$ac_delim
 ZERO_BUILD_TRUE!$ZERO_BUILD_TRUE$ac_delim
 ZERO_BUILD_FALSE!$ZERO_BUILD_FALSE$ac_delim
 CPP!$CPP$ac_delim
--- a/configure.ac	Mon Apr 21 16:45:07 2008 +0200
+++ b/configure.ac	Mon Apr 21 17:03:11 2008 +0200
@@ -204,7 +204,7 @@
 WITH_OPENJDK_SRC_ZIP
 WITH_OPENJDK_SRC_DIR
 AC_CHECK_WITH_CACAO
-ENABLE_FAST_BUILD
+ENABLE_OPTIMIZATIONS
 ENABLE_ZERO_BUILD
 ENABLE_NETX_PLUGIN
 SET_CORE_BUILD
--- a/patches/icedtea-speed.patch	Mon Apr 21 16:45:07 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-diff -urN openjdk.orig/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make
---- openjdk.orig/hotspot/build/linux/makefiles/gcc.make	2007-10-12 03:46:25.000000000 -0400
-+++ openjdk/hotspot/build/linux/makefiles/gcc.make	2007-10-12 17:41:02.000000000 -0400
-@@ -98,7 +98,7 @@
- CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
- 
- # The flags to use for an Optimized g++ build
--OPT_CFLAGS += -O3
-+OPT_CFLAGS += -O0 -g
- 
- # Hotspot uses very unstrict aliasing turn this optimization off
- OPT_CFLAGS += -fno-strict-aliasing
-diff -urN openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk
---- openjdk.orig/jdk/make/common/Defs-linux.gmk	2007-10-12 03:54:05.000000000 -0400
-+++ openjdk/jdk/make/common/Defs-linux.gmk	2007-10-12 17:41:02.000000000 -0400
-@@ -97,6 +97,7 @@
-     _OPT = $(CC_LOWER_OPT)
-     CPPFLAGS_DBG    += -DLOGGING 
- endif
-+_OPT = -O0 -g
- 
- # For all platforms, do not omit the frame pointer register usage. 
- #    We need this frame pointer to make it easy to walk the stacks.
-diff -urN openjdk.orig/jdk/make/Makefile openjdk/jdk/make/Makefile
---- openjdk.orig/jdk/make/Makefile	2007-10-12 03:54:03.000000000 -0400
-+++ openjdk/jdk/make/Makefile	2007-10-12 17:41:02.000000000 -0400
-@@ -249,9 +249,9 @@
- #
- # Docs
- #
--OTHERSUBDIRS = docs
--docs:: sanity-docs post-sanity-docs
--	$(OTHERSUBDIRS-loop)
-+#OTHERSUBDIRS = docs
-+#docs:: sanity-docs post-sanity-docs
-+#	$(OTHERSUBDIRS-loop)
- 
- #
- # Release engineering targets.