From 4afce8c0adba43ab1df8a7b5f3fb27c5416951a3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 2 Apr 2013 20:34:12 -0700 Subject: openjdk: Create a common inc file between openjdk 6 and 7 we hit below errors ERROR: The function get_jdk_arch defined in openjdk-7-common.inc was already declared in openjdk-6-common.inc. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names. ERROR: The function get_llvm_configure_arch defined in openjdk-7-common.inc was already declared in openjdk-6-c ommon.inc. BitBake has a global python function namespace so shared functions should be declared in a common in clude file rather than being duplicated, or if the functions are different, please use different function names This patch fixes the above Signed-off-by: Khem Raj --- recipes-core/openjdk/openjdk-6-common.inc | 80 +------------------------------ 1 file changed, 2 insertions(+), 78 deletions(-) (limited to 'recipes-core/openjdk/openjdk-6-common.inc') diff --git a/recipes-core/openjdk/openjdk-6-common.inc b/recipes-core/openjdk/openjdk-6-common.inc index f186e91..49808d7 100644 --- a/recipes-core/openjdk/openjdk-6-common.inc +++ b/recipes-core/openjdk/openjdk-6-common.inc @@ -1,15 +1,7 @@ -DESCRIPTION = "Java runtime based upon the OpenJDK- and Icedtea Project" -HOMEPAGE = "http://icedtea.classpath.org" -LICENSE = "GPL-2.0-with-classpath-exception" -PRIORITY = "optional" -SECTION = "libs" +require openjdk-common.inc -ICEDTEA_VERSION = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1].split("-")[1] or '1.0'}" ICEDTEA = "icedtea6-${ICEDTEA_VERSION}" -S = "${WORKDIR}/${ICEDTEA}" -B = "${S}/build" - INC_PR = "r21" SRC_URI = "\ @@ -41,15 +33,6 @@ DEPENDS = "giflib libpng jpeg cups \ zip-native \ " -DEPENDS_append_libc-uclibc = " virtual/libiconv " - -# The OpenJDK build with interpreter optimizations for ARM depends on a binary -# that generates constants for an assembler source file. There is no other -# way than to generate this on a pseudo machine. Cross-compiling would not help -# because structure sizes and/or alignment may differ. -DEPENDS_append = " qemu-native " - - # No package should directly depend on this (it should require # java2-runtime instead). PRIVATE_LIBS = "\ @@ -67,8 +50,6 @@ PRIVATE_LIBS = "\ " -inherit java autotools gettext qemu - export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}" export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2" export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" @@ -101,26 +82,6 @@ EXTRA_OECONF = "\ " -# OpenJDK uses slightly different names for certain arches. We need to know -# this to create some files which are expected by the build. -def get_jdk_arch(d): - import bb - - jdk_arch = bb.data.getVar('TARGET_ARCH', d, 1) - if jdk_arch == "x86_64": - jdk_arch = "amd64" - elif jdk_arch == "powerpc": - jdk_arch = "ppc" - elif jdk_arch == "powerpc64": - jdk_arch = "ppc64" - elif (jdk_arch == "i486" or jdk_arch == "i586" or jdk_arch == "i686"): - jdk_arch = "i386" - - return jdk_arch - -JDK_ARCH = "${@get_jdk_arch(d)}" -JDK_HOME = "${libdir_jvm}/${JDK_DIR}" - # OpenJDK supports parallel compilation but uses a plain number for this. # In OE we have PARALLEL_MAKE which is the actual option passed to make, # e.g. "-j 4". @@ -140,24 +101,6 @@ def get_jdk_jobs(d): JDK_JOBS = "${@get_jdk_jobs(d)}" -# A function that is needed in the Shark builds. -def get_llvm_configure_arch(d): - import bb; - - arch = bb.data.getVar('TARGET_ARCH', d, 1) - if arch == "x86_64" or arch == "i486" or arch == "i586" or arch == "i686": - arch = "x86" - elif arch == "arm": - arch = "arm" - elif arch == "mipsel" or arch == "mips": - arch = "mips" - elif arch == "powerpc" or arch == "powerpc64": - arch = "powerpc" - else: - bb.warn("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) ); - - return arch - # Custom preparation of the sources which: # - cleans up the sources # - copies the patches into the proper directory @@ -216,7 +159,7 @@ do_configure_append() { # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. # The base for this quirk is that GNU Make only considers the last "-j" option. -EXTRA_OEMAKE = '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' +EXTRA_OEMAKE += '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' EXTRA_OEMAKE += ' \ OE_CFLAGS="${TARGET_CFLAGS}" \ @@ -226,30 +169,11 @@ EXTRA_OEMAKE += ' \ ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \ ' -# Puts an OE specific string into the binary making it possible for the user -# to know where it comes from (and blame the right people ...). -DIST_ID = "Built for ${DISTRO}" -DIST_NAME = "${DISTRO}" -EXTRA_OEMAKE += 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"' - - -# llvm configure and compiles stuff - -export WANT_LLVM_RELEASE = "2.8" - -# Provides the target architecture to the configure script. -export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" - OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,/usr/lib/llvm${WANT_LLVM_RELEASE}" EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"' -# Large stack is required at least on x86_64 host, otherwise random segfaults appear: -QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET} -E LD_LIBRARY_PATH=${STAGING_BASELIBDIR}" - -EXTRA_OEMAKE += 'QEMU="${QEMU}"' - # The build of OpenJDK is a 3-part process. For better restartability and overrideability they have been split into # three functions. # 1. compile Hotspot or Cacao (this one is supposed to be implemented according to wanted VM) -- cgit v1.2.3-54-g00ecf