diff options
author | Khem Raj <raj.khem@gmail.com> | 2013-04-02 20:34:12 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2013-04-04 00:05:30 -0700 |
commit | 4afce8c0adba43ab1df8a7b5f3fb27c5416951a3 (patch) | |
tree | 9e1139a571d6dcdd089b2ff08245f7de2260b2fd /recipes-core/openjdk/openjdk-7-common.inc | |
parent | 95d2eee93801618044e6cc1fe73cbc03fdb0d303 (diff) | |
download | meta-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-7-common.inc')
-rw-r--r-- | recipes-core/openjdk/openjdk-7-common.inc | 78 |
1 files changed, 2 insertions, 76 deletions
diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc index 1d5f2ca..5194d9f 100644 --- a/recipes-core/openjdk/openjdk-7-common.inc +++ b/recipes-core/openjdk/openjdk-7-common.inc | |||
@@ -1,15 +1,6 @@ | |||
1 | DESCRIPTION = "Java runtime based upon the OpenJDK- and Icedtea Project" | 1 | require openjdk-common.inc |
2 | HOMEPAGE = "http://icedtea.classpath.org" | ||
3 | LICENSE = "GPL-2.0-with-classpath-exception" | ||
4 | PRIORITY = "optional" | ||
5 | SECTION = "libs" | ||
6 | |||
7 | ICEDTEA_VERSION = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1].split("-")[1] or '1.0'}" | ||
8 | ICEDTEA = "icedtea-${ICEDTEA_VERSION}" | 2 | ICEDTEA = "icedtea-${ICEDTEA_VERSION}" |
9 | 3 | ||
10 | S = "${WORKDIR}/${ICEDTEA}" | ||
11 | B = "${S}/build" | ||
12 | |||
13 | INC_PR = "r5" | 4 | INC_PR = "r5" |
14 | 5 | ||
15 | SRC_URI = " \ | 6 | SRC_URI = " \ |
@@ -45,15 +36,6 @@ DEPENDS = " \ | |||
45 | freetype alsa-lib libffi \ | 36 | freetype alsa-lib libffi \ |
46 | " | 37 | " |
47 | 38 | ||
48 | DEPENDS_append_libc-uclibc = " virtual/libiconv " | ||
49 | |||
50 | # The OpenJDK build with interpreter optimizations for ARM depends on a binary | ||
51 | # that generates constants for an assembler source file. There is no other | ||
52 | # way than to generate this on a pseudo machine. Cross-compiling would not help | ||
53 | # because structure sizes and/or alignment may differ. | ||
54 | DEPENDS_append = " qemu-native " | ||
55 | |||
56 | |||
57 | # No package should directly depend on this (it should require | 39 | # No package should directly depend on this (it should require |
58 | # java2-runtime instead). | 40 | # java2-runtime instead). |
59 | PRIVATE_LIBS = "\ | 41 | PRIVATE_LIBS = "\ |
@@ -69,7 +51,6 @@ PRIVATE_LIBS = "\ | |||
69 | libheapViewer.so libheapTracker.so libminst.so libmtrace.so \ | 51 | libheapViewer.so libheapTracker.so libminst.so libmtrace.so \ |
70 | libwaiters.so libhprof.so \ | 52 | libwaiters.so libhprof.so \ |
71 | " | 53 | " |
72 | inherit java autotools gettext qemu | ||
73 | 54 | ||
74 | export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}" | 55 | export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}" |
75 | export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2" | 56 | export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2" |
@@ -140,45 +121,6 @@ EXTRA_OECONF = " \ | |||
140 | --with-cc-for-build=${BUILD_CC} \ | 121 | --with-cc-for-build=${BUILD_CC} \ |
141 | " | 122 | " |
142 | 123 | ||
143 | # OpenJDK uses slightly different names for certain arches. We need to know | ||
144 | # this to create some files which are expected by the build. | ||
145 | def get_jdk_arch(d): | ||
146 | import bb | ||
147 | |||
148 | jdk_arch = bb.data.getVar('TRANSLATED_TARGET_ARCH', d, 1) | ||
149 | if jdk_arch == "x86-64": | ||
150 | jdk_arch = "amd64" | ||
151 | elif jdk_arch == "powerpc": | ||
152 | jdk_arch = "ppc" | ||
153 | elif jdk_arch == "powerpc64": | ||
154 | jdk_arch = "ppc64" | ||
155 | elif (jdk_arch == "i486" or jdk_arch == "i586" or jdk_arch == "i686"): | ||
156 | jdk_arch = "i386" | ||
157 | |||
158 | return jdk_arch | ||
159 | |||
160 | JDK_ARCH = "${@get_jdk_arch(d)}" | ||
161 | JDK_HOME = "${libdir_jvm}/${JDK_DIR}" | ||
162 | JDK_FAKE = "${WORKDIR}/fake-jdk" | ||
163 | |||
164 | # A function that is needed in the Shark builds. | ||
165 | def get_llvm_configure_arch(d): | ||
166 | import bb; | ||
167 | |||
168 | arch = bb.data.getVar('TRANSLATED_TARGET_ARCH', d, 1) | ||
169 | if arch == "x86-64" or arch == "i486" or arch == "i586" or arch == "i686": | ||
170 | arch = "x86" | ||
171 | elif arch == "arm": | ||
172 | arch = "arm" | ||
173 | elif arch == "mipsel" or arch == "mips": | ||
174 | arch = "mips" | ||
175 | elif arch == "powerpc" or arch == "powerpc64": | ||
176 | arch = "powerpc" | ||
177 | else: | ||
178 | bb.warn("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) ); | ||
179 | |||
180 | return arch | ||
181 | |||
182 | do_configure_prepend() { | 124 | do_configure_prepend() { |
183 | echo "Configure with parallel-jobs: ${JDK_JOBS}" | 125 | echo "Configure with parallel-jobs: ${JDK_JOBS}" |
184 | 126 | ||
@@ -199,7 +141,7 @@ do_configure_append() { | |||
199 | # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are | 141 | # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are |
200 | # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. | 142 | # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. |
201 | # The base for this quirk is that GNU Make only considers the last "-j" option. | 143 | # The base for this quirk is that GNU Make only considers the last "-j" option. |
202 | EXTRA_OEMAKE = 'CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' | 144 | EXTRA_OEMAKE += 'CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' |
203 | 145 | ||
204 | EXTRA_OEMAKE += ' \ | 146 | EXTRA_OEMAKE += ' \ |
205 | OE_CFLAGS="${TARGET_CFLAGS}" \ | 147 | OE_CFLAGS="${TARGET_CFLAGS}" \ |
@@ -211,17 +153,6 @@ EXTRA_OEMAKE += ' \ | |||
211 | REQUIRED_ALSA_VERSION="" \ | 153 | REQUIRED_ALSA_VERSION="" \ |
212 | ' | 154 | ' |
213 | 155 | ||
214 | # Puts an OE specific string into the binary making it possible for the user | ||
215 | # to know where it comes from (and blame the right people ...). | ||
216 | DIST_ID = "Built for ${DISTRO}" | ||
217 | DIST_NAME = "${DISTRO}" | ||
218 | EXTRA_OEMAKE += 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"' | ||
219 | |||
220 | |||
221 | # llvm configure and compiles stuff | ||
222 | |||
223 | export WANT_LLVM_RELEASE = "2.8" | ||
224 | |||
225 | # Provides the target architecture to the configure script. | 156 | # Provides the target architecture to the configure script. |
226 | export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" | 157 | export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" |
227 | 158 | ||
@@ -231,11 +162,6 @@ OE_LAUNCHER_LDFLAGS_arm = "" | |||
231 | 162 | ||
232 | EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"' | 163 | EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"' |
233 | 164 | ||
234 | # Large stack is required at least on x86_64 host, otherwise random segfaults appear: | ||
235 | QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 2097152 -L ${STAGING_DIR_TARGET} -E LD_LIBRARY_PATH=${STAGING_BASELIBDIR}" | ||
236 | |||
237 | EXTRA_OEMAKE += 'QEMU="${QEMU}"' | ||
238 | |||
239 | do_compile() { | 165 | do_compile() { |
240 | 166 | ||
241 | bbnote "3/3 Building final JDK" | 167 | bbnote "3/3 Building final JDK" |