summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/openjdk-6-common.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-04-02 20:34:12 -0700
committerKhem Raj <raj.khem@gmail.com>2013-04-04 00:05:30 -0700
commit4afce8c0adba43ab1df8a7b5f3fb27c5416951a3 (patch)
tree9e1139a571d6dcdd089b2ff08245f7de2260b2fd /recipes-core/openjdk/openjdk-6-common.inc
parent95d2eee93801618044e6cc1fe73cbc03fdb0d303 (diff)
downloadmeta-java-4afce8c0adba43ab1df8a7b5f3fb27c5416951a3.tar.gz
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 <raj.khem@gmail.com>
Diffstat (limited to 'recipes-core/openjdk/openjdk-6-common.inc')
-rw-r--r--recipes-core/openjdk/openjdk-6-common.inc80
1 files changed, 2 insertions, 78 deletions
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 @@
1DESCRIPTION = "Java runtime based upon the OpenJDK- and Icedtea Project" 1require openjdk-common.inc
2HOMEPAGE = "http://icedtea.classpath.org"
3LICENSE = "GPL-2.0-with-classpath-exception"
4PRIORITY = "optional"
5SECTION = "libs"
6 2
7ICEDTEA_VERSION = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1].split("-")[1] or '1.0'}"
8ICEDTEA = "icedtea6-${ICEDTEA_VERSION}" 3ICEDTEA = "icedtea6-${ICEDTEA_VERSION}"
9 4
10S = "${WORKDIR}/${ICEDTEA}"
11B = "${S}/build"
12
13INC_PR = "r21" 5INC_PR = "r21"
14 6
15SRC_URI = "\ 7SRC_URI = "\
@@ -41,15 +33,6 @@ DEPENDS = "giflib libpng jpeg cups \
41 zip-native \ 33 zip-native \
42 " 34 "
43 35
44DEPENDS_append_libc-uclibc = " virtual/libiconv "
45
46# The OpenJDK build with interpreter optimizations for ARM depends on a binary
47# that generates constants for an assembler source file. There is no other
48# way than to generate this on a pseudo machine. Cross-compiling would not help
49# because structure sizes and/or alignment may differ.
50DEPENDS_append = " qemu-native "
51
52
53# No package should directly depend on this (it should require 36# No package should directly depend on this (it should require
54# java2-runtime instead). 37# java2-runtime instead).
55PRIVATE_LIBS = "\ 38PRIVATE_LIBS = "\
@@ -67,8 +50,6 @@ PRIVATE_LIBS = "\
67 " 50 "
68 51
69 52
70inherit java autotools gettext qemu
71
72export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}" 53export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}"
73export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2" 54export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2"
74export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" 55export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}"
@@ -101,26 +82,6 @@ EXTRA_OECONF = "\
101 " 82 "
102 83
103 84
104# OpenJDK uses slightly different names for certain arches. We need to know
105# this to create some files which are expected by the build.
106def get_jdk_arch(d):
107 import bb
108
109 jdk_arch = bb.data.getVar('TARGET_ARCH', d, 1)
110 if jdk_arch == "x86_64":
111 jdk_arch = "amd64"
112 elif jdk_arch == "powerpc":
113 jdk_arch = "ppc"
114 elif jdk_arch == "powerpc64":
115 jdk_arch = "ppc64"
116 elif (jdk_arch == "i486" or jdk_arch == "i586" or jdk_arch == "i686"):
117 jdk_arch = "i386"
118
119 return jdk_arch
120
121JDK_ARCH = "${@get_jdk_arch(d)}"
122JDK_HOME = "${libdir_jvm}/${JDK_DIR}"
123
124# OpenJDK supports parallel compilation but uses a plain number for this. 85# OpenJDK supports parallel compilation but uses a plain number for this.
125# In OE we have PARALLEL_MAKE which is the actual option passed to make, 86# In OE we have PARALLEL_MAKE which is the actual option passed to make,
126# e.g. "-j 4". 87# e.g. "-j 4".
@@ -140,24 +101,6 @@ def get_jdk_jobs(d):
140 101
141JDK_JOBS = "${@get_jdk_jobs(d)}" 102JDK_JOBS = "${@get_jdk_jobs(d)}"
142 103
143# A function that is needed in the Shark builds.
144def get_llvm_configure_arch(d):
145 import bb;
146
147 arch = bb.data.getVar('TARGET_ARCH', d, 1)
148 if arch == "x86_64" or arch == "i486" or arch == "i586" or arch == "i686":
149 arch = "x86"
150 elif arch == "arm":
151 arch = "arm"
152 elif arch == "mipsel" or arch == "mips":
153 arch = "mips"
154 elif arch == "powerpc" or arch == "powerpc64":
155 arch = "powerpc"
156 else:
157 bb.warn("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) );
158
159 return arch
160
161# Custom preparation of the sources which: 104# Custom preparation of the sources which:
162# - cleans up the sources 105# - cleans up the sources
163# - copies the patches into the proper directory 106# - copies the patches into the proper directory
@@ -216,7 +159,7 @@ do_configure_append() {
216# passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are 159# passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are
217# parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. 160# parallelizable and we need ${PARALLEL_MAKE} to derive the proper value.
218# The base for this quirk is that GNU Make only considers the last "-j" option. 161# The base for this quirk is that GNU Make only considers the last "-j" option.
219EXTRA_OEMAKE = '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' 162EXTRA_OEMAKE += '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"'
220 163
221EXTRA_OEMAKE += ' \ 164EXTRA_OEMAKE += ' \
222 OE_CFLAGS="${TARGET_CFLAGS}" \ 165 OE_CFLAGS="${TARGET_CFLAGS}" \
@@ -226,30 +169,11 @@ EXTRA_OEMAKE += ' \
226 ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \ 169 ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \
227 ' 170 '
228 171
229# Puts an OE specific string into the binary making it possible for the user
230# to know where it comes from (and blame the right people ...).
231DIST_ID = "Built for ${DISTRO}"
232DIST_NAME = "${DISTRO}"
233EXTRA_OEMAKE += 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"'
234
235
236# llvm configure and compiles stuff
237
238export WANT_LLVM_RELEASE = "2.8"
239
240# Provides the target architecture to the configure script.
241export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}"
242
243OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,/usr/lib/llvm${WANT_LLVM_RELEASE}" 172OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,/usr/lib/llvm${WANT_LLVM_RELEASE}"
244 173
245EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"' 174EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"'
246 175
247 176
248# Large stack is required at least on x86_64 host, otherwise random segfaults appear:
249QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET} -E LD_LIBRARY_PATH=${STAGING_BASELIBDIR}"
250
251EXTRA_OEMAKE += 'QEMU="${QEMU}"'
252
253# The build of OpenJDK is a 3-part process. For better restartability and overrideability they have been split into 177# The build of OpenJDK is a 3-part process. For better restartability and overrideability they have been split into
254# three functions. 178# three functions.
255# 1. compile Hotspot or Cacao (this one is supposed to be implemented according to wanted VM) 179# 1. compile Hotspot or Cacao (this one is supposed to be implemented according to wanted VM)