summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-04-07 14:11:19 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-04-07 14:11:19 +0200
commit3cda7c5f211225fea03a3634daeef9cafd627aa2 (patch)
treeca35985e99c5c699d3cc2246042306ac3e6f9b74
parent2bf604ffc3707110490658b3d2004da62767722b (diff)
parent7356a92fbf59f66521b2e7fdd478b0fa63df052d (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
-rw-r--r--jtools/ecj/Makefile9
-rw-r--r--jtools/gcj/Makefile6
-rw-r--r--package/openjdk/Makefile43
3 files changed, 39 insertions, 19 deletions
diff --git a/jtools/ecj/Makefile b/jtools/ecj/Makefile
index 32cfdeb53..a67e9ebd8 100644
--- a/jtools/ecj/Makefile
+++ b/jtools/ecj/Makefile
@@ -18,9 +18,16 @@ ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj:
LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 \
PATH=$(STAGING_JAVA_HOST_DIR)/usr/bin:$$PATH \
$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj -g -O2 -findirect-dispatch \
- -o ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj \
+ -o ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj.native \
--main=org.eclipse.jdt.internal.compiler.batch.Main \
$(TOPDIR)/jtools_build/gcc-4.5.2/ecj.jar
$(CP) $(TOPDIR)/jtools_build/gcc-4.5.2/ecj.jar ${STAGING_JAVA_HOST_DIR}/usr/share/ecj.jar
+ echo "env LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj.native \$$@" > \
+ ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj
+ chmod u+x ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj
+ # put a wrapper for java here
+ echo "env LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 ${STAGING_JAVA_HOST_DIR}/usr/bin/gij \$$@" > \
+ ${STAGING_JAVA_HOST_DIR}/usr/bin/java
+ chmod u+x ${STAGING_JAVA_HOST_DIR}/usr/bin/java
include $(TOPDIR)/mk/tools.mk
diff --git a/jtools/gcj/Makefile b/jtools/gcj/Makefile
index ea41ca671..7ccd03c15 100644
--- a/jtools/gcj/Makefile
+++ b/jtools/gcj/Makefile
@@ -26,9 +26,9 @@ $(WRKBUILD)/.configured: ${WRKDIST}/.prepared
--enable-java-home \
--enable-languages=java \
--with-ffi \
- --with-mpc=$(STAGING_HOST_DIR) \
- --with-mpfr=$(STAGING_HOST_DIR) \
- --with-gmp=$(STAGING_HOST_DIR) \
+ --with-mpc=$(STAGING_HOST_DIR)/usr \
+ --with-mpfr=$(STAGING_HOST_DIR)/usr \
+ --with-gmp=$(STAGING_HOST_DIR)/usr \
--disable-libmudflap \
--disable-libgomp \
--disable-biarch \
diff --git a/package/openjdk/Makefile b/package/openjdk/Makefile
index 41775218a..8802ee529 100644
--- a/package/openjdk/Makefile
+++ b/package/openjdk/Makefile
@@ -54,6 +54,9 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,OPENJDK,openjdk,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS))
ifeq ($(ADK_PACKAGE_OPENJDK_ZERO),y)
CONFIGURE_ARGS+= --enable-zero
@@ -62,29 +65,33 @@ ifeq ($(ADK_PACKAGE_OPENJDK_SHARK),y)
CONFIGURE_ARGS+= --enable-shark
endif
+BOOTSTRAPJDK:= ${WRKDIST}/bootstrap-jdk
CONFIGURE_ARGS+= --disable-docs \
--enable-bootstrap \
--enable-openjdk-cross-compilation \
+ --with-cc-for-build=$(CC_FOR_BUILD) \
--with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \
--with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \
--with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \
--with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \
- --with-jdk-home=$(WRKSRC)/openjdk.build/j2sdk-image \
- --with-java=$(WRKSRC)/openjdk.build/j2sdk-image/bin/java \
- --with-javac=$(WRKSRC)/openjdk.build/j2sdk-image/bin/javac \
- --with-javah=$(WRKSRC)/openjdk.build/j2sdk-image/bin/javah \
- --with-jar=$(WRKSRC)/openjdk.build/j2sdk-image/bin/jar \
- --with-rmic=$(WRKSRC)/openjdk.build/j2sdk-image/bin/rmic \
- --with-native2ascii=$(WRKSRC)/openjdk.build/j2sdk-image/bin/native2ascii \
+ --with-jdk-home=$(BOOTSTRAPJDK) \
+ --with-java=$(BOOTSTRAPJDK)/bin/java \
+ --with-javac=$(BOOTSTRAPJDK)/bin/javac \
+ --with-javah=$(BOOTSTRAPJDK)/bin/javah \
+ --with-jar=$(BOOTSTRAPJDK)/bin/jar \
+ --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
+ --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
--without-rhino
-OPENJDK_BUILD_ENV+= JAVACFLAGS="-cp ${STAGING_JAVA_HOST_DIR}/usr/share/java/libgcj-4.5.2.jar"
-OPENJDK_BUILD_ENV+= DYLD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64
-OPENJDK_BUILD_ENV+= LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64
-OPENJDK_BUILD_ENV+= ADK_ECJ=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj
+OPENJDK_NATIVE_ENV+= JAVACFLAGS="-cp ${STAGING_JAVA_HOST_DIR}/usr/share/java/libgcj-4.5.2.jar"
+OPENJDK_NATIVE_ENV+= DYLD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64
+OPENJDK_NATIVE_ENV+= LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64
+OPENJDK_NATIVE_ENV+= ADK_ECJ=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj
+
+OPENJDK_BUILD_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/bin
do-extract:
- cd ${WRKDIST}; mkdir $(PKG_NAME)-$(PKG_VERSION) ; \
+ cd ${WRKDIST}; mkdir $(PKG_NAME)-$(PKG_VERSION); \
tar xzf $(TOPDIR)/dl/$(PKG_NAME)-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz -C $(PKG_NAME)-$(PKG_VERSION)
cd $(WRKDIST); tar xzf $(TOPDIR)/dl/$(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz
cd ${WRKDIST}; tar xzf ${TOPDIR}/dl/${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz
@@ -94,13 +101,13 @@ do-extract:
pre-configure:
cd ${WRKBUILD}; rm -rf config.{cache,status}; \
- export ${OPENJDK_BUILD_ENV}; ./configure \
+ export ${OPENJDK_NATIVE_ENV}; ./configure \
--enable-bootstrap \
--enable-zero \
--disable-openjdk-cross-compilation \
--with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \
--with-jdk-home=$(STAGING_JAVA_HOST_DIR)/usr/lib/jvm \
- --with-java=$(STAGING_JAVA_HOST_DIR)/usr/bin/gij \
+ --with-java=$(STAGING_JAVA_HOST_DIR)/usr/bin/java \
--with-javac=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj \
--with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \
--with-ecj-jar=${STAGING_JAVA_HOST_DIR}/usr/share/ecj.jar \
@@ -109,7 +116,13 @@ pre-configure:
--with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \
--without-rhino \
--disable-docs \
- ;${MAKE}
+ && $(MAKE) && $(CP) $(WRKSRC)/openjdk.build/j2sdk-image ${WRKDIST}/bootstrap-jdk && $(MAKE) clean && rm -rf ${WRKBUILD}/openjdk-old
+
+do-build:
+ cd ${WRKBUILD}; export $(OPENJDK_BUILD_ENV); make
+
+do-install:
+ cd ${WRKBUILD}; make install
openjdk-install:
$(INSTALL_DIR) $(IDIR_OPENJDK)/usr/bin