/hg/icedtea6: Generalise ZERO_ARCHFLAG to ARCHFLAG and use in Pu...

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Tue Mar 9 10:27:08 PST 2010


changeset b6c061fbac95 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b6c061fbac95
author: Andrew John Hughes <ahughes at redhat.com>
date: Tue Mar 09 18:26:30 2010 +0000

	Generalise ZERO_ARCHFLAG to ARCHFLAG and use in PulseAudio native
	build.

	2010-03-08 Andrew John Hughes <ahughes at redhat.com>

	 * Makefile.am: (IT_CFLAGS): General CFLAGS for all
	IcedTea C builds, which includes ARCHFLAG.
	(ICEDTEA_ENV): Set ZERO_ARCHFLAG from ARCHFLAG.
	(ICEDTEA_ECJ_ENV): Likewise. (stamps/native-ecj.stamp): Use
	IT_CFLAGS. ($(PULSE_JAVA_NATIVE_BUILDDIR)/%.o): Use
	IT_CFLAGS.
		* acinclude.m4: (IT_SET_ARCH_SETTINGS): Renamed from
	SET_ARCH_DIRS. Use host_cpu rather than host. Add sections
	for sparc and s390x. Set ARCHFLAG to m64 for x86_64,
	sparc64, powerpc64 and s390x, m31 for s390 and m32 for i?86,
	powerpc and sparc. (ENABLE_ZERO_BUILD): Remove setting of
	ZERO_ARCHFLAG, generalised to ARCHFLAG.
		* configure.ac: Call renamed IT_SET_ARCH_SETTINGS.


diffstat:

4 files changed, 62 insertions(+), 31 deletions(-)
ChangeLog    |   19 ++++++++++++++++++
Makefile.am  |   13 +++++++-----
acinclude.m4 |   59 +++++++++++++++++++++++++++++++++-------------------------
configure.ac |    2 -

diffs (226 lines):

diff -r 9c3d0d30552c -r b6c061fbac95 ChangeLog
--- a/ChangeLog	Mon Mar 08 15:18:20 2010 +0000
+++ b/ChangeLog	Tue Mar 09 18:26:30 2010 +0000
@@ -1,3 +1,22 @@ 2010-03-08  Andrew John Hughes  <ahughes
+2010-03-08  Andrew John Hughes  <ahughes at redhat.com>
+
+	* Makefile.am:
+	(IT_CFLAGS): General CFLAGS for all IcedTea
+	C builds, which includes ARCHFLAG.
+	(ICEDTEA_ENV): Set ZERO_ARCHFLAG from ARCHFLAG.
+	(ICEDTEA_ECJ_ENV): Likewise.
+	(stamps/native-ecj.stamp): Use IT_CFLAGS.
+	($(PULSE_JAVA_NATIVE_BUILDDIR)/%.o): Use IT_CFLAGS.
+	* acinclude.m4:
+	(IT_SET_ARCH_SETTINGS): Renamed from SET_ARCH_DIRS.
+	Use host_cpu rather than host.  Add sections for
+	sparc and s390x.  Set ARCHFLAG to m64 for x86_64,
+	sparc64, powerpc64 and s390x, m31 for s390 and m32
+	for i?86, powerpc and sparc.
+	(ENABLE_ZERO_BUILD): Remove setting of ZERO_ARCHFLAG,
+	generalised to ARCHFLAG.
+	* configure.ac: Call renamed IT_SET_ARCH_SETTINGS.
+
 2010-03-08  Andrew John Hughes  <ahughes at redhat.com>
 
 	* Makefile.am:
diff -r 9c3d0d30552c -r b6c061fbac95 Makefile.am
--- a/Makefile.am	Mon Mar 08 15:18:20 2010 +0000
+++ b/Makefile.am	Tue Mar 09 18:26:30 2010 +0000
@@ -95,6 +95,9 @@ ICEDTEA_BOOTSTRAP_CLASSES = \
 	$(SHARE)/sun/misc/Unsafe.java
 
 # FIXME (javac): Settings for javac go here
+
+# Flags
+IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
 
 # Conditional defintions
 
@@ -443,7 +446,7 @@ ICEDTEA_ENV = \
 	ARCH_DATA_MODEL="$(ZERO_BITSPERWORD)" \
 	ZERO_ENDIANNESS="$(ZERO_ENDIANNESS)" \
 	ZERO_ARCHDEF="$(ZERO_ARCHDEF)" \
-	ZERO_ARCHFLAG="$(ZERO_ARCHFLAG)" \
+	ZERO_ARCHFLAG="$(ARCHFLAG)" \
 	LIBFFI_CFLAGS="$(LIBFFI_CFLAGS)" \
 	LIBFFI_LIBS="$(LIBFFI_LIBS)" \
 	LLVM_CFLAGS="$(LLVM_CFLAGS)" \
@@ -533,7 +536,7 @@ ICEDTEA_ENV_ECJ = \
 	ARCH_DATA_MODEL="$(ZERO_BITSPERWORD)" \
 	ZERO_ENDIANNESS="$(ZERO_ENDIANNESS)" \
 	ZERO_ARCHDEF="$(ZERO_ARCHDEF)" \
-	ZERO_ARCHFLAG="$(ZERO_ARCHFLAG)" \
+	ZERO_ARCHFLAG="$(ARCHFLAG)" \
 	LIBFFI_CFLAGS="$(LIBFFI_CFLAGS)" \
 	LIBFFI_LIBS="$(LIBFFI_LIBS)" \
 	LLVM_CFLAGS="$(LLVM_CFLAGS)" \
@@ -1232,8 +1235,8 @@ clean-patch-ecj:
 
 stamps/native-ecj.stamp: 
 	mkdir -p stamps ; \
-	if test "x${GCJ}" != "xno"; then \
-	  ${GCJ} ${CFLAGS} -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \
+	if test "x$(GCJ)" != "xno"; then \
+	  $(GCJ) $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \
 	    --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR} ; \
 	fi ; \
 	touch stamps/native-ecj.stamp
@@ -1726,7 +1729,7 @@ extra-lib/about.jar: stamps/extra-class-
 
 if ENABLE_PULSE_JAVA
 $(PULSE_JAVA_NATIVE_BUILDDIR)/%.o: $(PULSE_JAVA_NATIVE_SRCDIR)/%.c stamps/pulse-java-headers.stamp
-	$(CC) $(CFLAGS) -fPIC -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include \
+	$(CC) $(IT_CFLAGS) -fPIC -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include \
 	 -I$(PULSE_JAVA_NATIVE_BUILDDIR) -o $@ -c $<
 
 $(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so: $(PULSE_JAVA_NATIVE_OBJECTS)
diff -r 9c3d0d30552c -r b6c061fbac95 acinclude.m4
--- a/acinclude.m4	Mon Mar 08 15:18:20 2010 +0000
+++ b/acinclude.m4	Tue Mar 09 18:26:30 2010 +0000
@@ -1,68 +1,89 @@ AC_DEFUN([SET_ARCH_DIRS],
-AC_DEFUN([SET_ARCH_DIRS],
+AC_DEFUN([IT_SET_ARCH_SETTINGS],
 [
-  case "${host}" in
-    x86_64-*-*)
+  case "${host_cpu}" in
+    x86_64)
       BUILD_ARCH_DIR=amd64
       INSTALL_ARCH_DIR=amd64
       JRE_ARCH_DIR=amd64
       CROSS_TARGET_ARCH=x86_64
+      ARCHFLAG="-m64"
       ;;
-    i?86-*-*)
+    i?86)
       BUILD_ARCH_DIR=i586
       INSTALL_ARCH_DIR=i386
       JRE_ARCH_DIR=i386
       ARCH_PREFIX=${LINUX32}
       CROSS_TARGET_ARCH=i386
+      ARCHFLAG="-m32"
       ;;
-    alpha*-*-*)
+    alpha*)
       BUILD_ARCH_DIR=alpha
       INSTALL_ARCH_DIR=alpha
       JRE_ARCH_DIR=alpha
       CROSS_TARGET_ARCH=alpha
       ;;
-    arm*-*-*)
+    arm*)
       BUILD_ARCH_DIR=arm
       INSTALL_ARCH_DIR=arm
       JRE_ARCH_DIR=arm
       CROSS_TARGET_ARCH=arm
       ;;
-    mips-*-*)
+    mips)
       BUILD_ARCH_DIR=mips
       INSTALL_ARCH_DIR=mips
       JRE_ARCH_DIR=mips
       CROSS_TARGET_ARCH=mips
        ;;
-    mipsel-*-*)
+    mipsel)
       BUILD_ARCH_DIR=mipsel
       INSTALL_ARCH_DIR=mipsel
       JRE_ARCH_DIR=mipsel
       CROSS_TARGET_ARCH=mipsel
        ;;
-    powerpc-*-*)
+    powerpc)
       BUILD_ARCH_DIR=ppc
       INSTALL_ARCH_DIR=ppc
       JRE_ARCH_DIR=ppc
       ARCH_PREFIX=${LINUX32}
       CROSS_TARGET_ARCH=ppc
+      ARCHFLAG="-m32"
        ;;
-    powerpc64-*-*)
+    powerpc64)
       BUILD_ARCH_DIR=ppc64
       INSTALL_ARCH_DIR=ppc64
       JRE_ARCH_DIR=ppc64
       CROSS_TARGET_ARCH=ppc64
+      ARCHFLAG="-m64"
        ;;
-    sparc64-*-*)
+    sparc)
+      BUILD_ARCH_DIR=sparc
+      INSTALL_ARCH_DIR=sparc
+      JRE_ARCH_DIR=sparc
+      CROSS_TARGET_ARCH=sparc
+      ARCH_PREFIX=${LINUX32}
+      ARCHFLAG="-m32"
+       ;;
+    sparc64)
       BUILD_ARCH_DIR=sparcv9
       INSTALL_ARCH_DIR=sparcv9
       JRE_ARCH_DIR=sparc64
       CROSS_TARGET_ARCH=sparc64
+      ARCHFLAG="-m64"
        ;;
-    s390-*-*)
+    s390)
       BUILD_ARCH_DIR=s390
       INSTALL_ARCH_DIR=s390
       JRE_ARCH_DIR=s390
       ARCH_PREFIX=${LINUX32}
       CROSS_TARGET_ARCH=s390
+      ARCHFLAG="-m31"
+       ;;
+    s390x)
+      BUILD_ARCH_DIR=s390x
+      INSTALL_ARCH_DIR=s390x
+      JRE_ARCH_DIR=s390x
+      CROSS_TARGET_ARCH=s390x
+      ARCHFLAG="-m64"
        ;;
     *)
       BUILD_ARCH_DIR=`uname -m`
@@ -76,6 +97,7 @@ AC_DEFUN([SET_ARCH_DIRS],
   AC_SUBST(JRE_ARCH_DIR)
   AC_SUBST(ARCH_PREFIX)
   AC_SUBST(CROSS_TARGET_ARCH)
+  AC_SUBST(ARCHFLAG)
 ])
 
 AC_DEFUN([SET_OS_DIRS],
@@ -764,23 +786,10 @@ AC_DEFUN([ENABLE_ZERO_BUILD],
     *)
       ZERO_ARCHDEF=`echo ${ZERO_LIBARCH} | tr a-z A-Z`
   esac
-  dnl multilib machines need telling which mode to build for
-  case "${ZERO_LIBARCH}" in
-    i386|ppc|sparc)
-      ZERO_ARCHFLAG="-m32"
-      ;;
-    s390)
-      ZERO_ARCHFLAG="-m31"
-      ;;
-    amd64|ppc64|s390x|sparc64)
-      ZERO_ARCHFLAG="-m64"
-      ;;
-  esac
   AC_SUBST(ZERO_LIBARCH)
   AC_SUBST(ZERO_BITSPERWORD)
   AC_SUBST(ZERO_ENDIANNESS)
   AC_SUBST(ZERO_ARCHDEF)
-  AC_SUBST(ZERO_ARCHFLAG)
   AC_CONFIG_FILES([jvm.cfg])
   AC_CONFIG_FILES([ergo.c])
 ])
diff -r 9c3d0d30552c -r b6c061fbac95 configure.ac
--- a/configure.ac	Mon Mar 08 15:18:20 2010 +0000
+++ b/configure.ac	Tue Mar 09 18:26:30 2010 +0000
@@ -154,7 +154,7 @@ IT_GET_PKGVERSION
 IT_GET_PKGVERSION
 IT_GET_LSB_DATA
 
-SET_ARCH_DIRS
+IT_SET_ARCH_SETTINGS
 SET_OS_DIRS
 
 if test "${with_openjdk}" = true



More information about the distro-pkg-dev mailing list