diff options
author | Amy Fong <amy.fong@windriver.com> | 2015-04-16 13:52:36 -0400 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-01-04 09:21:06 -0200 |
commit | 24092dc5e6680602d8a4b66bd9046f345bf58b3a (patch) | |
tree | 76b2150d5cf0ce0cc8bb7f197261136074117436 | |
parent | dfb21b449dd652b99bc4725796d143e8c9779cd6 (diff) | |
download | meta-java-24092dc5e6680602d8a4b66bd9046f345bf58b3a.tar.gz |
java.bbclass: java missing classes during compile
oe_makeclasspath is used to define the classpath argument passed to
javac for a number of packages. The current behaviour takes a number
args specifying jar files to look for and if the files exist, it adds
it to a specified variable.
On some builds, oe_makeclasspath cannot find the jar file.
oe_makeclasspath used an invalid test to see the package is native.
(testing if the build arch and package arch are the same, if so, native)
We test to see if PN matches *-native or *-nativesdk instead.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
-rw-r--r-- | classes/java.bbclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/classes/java.bbclass b/classes/java.bbclass index 464d8a8..ab51787 100644 --- a/classes/java.bbclass +++ b/classes/java.bbclass | |||
@@ -98,11 +98,14 @@ oe_makeclasspath() { | |||
98 | case "$1" in | 98 | case "$1" in |
99 | -s) | 99 | -s) |
100 | # take jar files from native staging if this is a -native recipe | 100 | # take jar files from native staging if this is a -native recipe |
101 | if [ ${PACKAGE_ARCH} = ${BUILD_ARCH} ]; then | 101 | case "$PN" in |
102 | *-native|*-nativesdk) | ||
102 | dir=${STAGING_DATADIR_JAVA_NATIVE} | 103 | dir=${STAGING_DATADIR_JAVA_NATIVE} |
103 | else | 104 | ;; |
105 | *) | ||
104 | dir=${STAGING_DATADIR_JAVA} | 106 | dir=${STAGING_DATADIR_JAVA} |
105 | fi | 107 | ;; |
108 | esac | ||
106 | ;; | 109 | ;; |
107 | -*) | 110 | -*) |
108 | bbfatal "oe_makeclasspath: unknown option: $1" | 111 | bbfatal "oe_makeclasspath: unknown option: $1" |