[meta-java,v4,07/23] javasqlite: Create cc tool to make libtool happy

Submitted by Ricardo Ribalda Delgado on July 5, 2019, 11:18 a.m. | Patch ID: 162824

Details

Message ID 20190705111824.22255-8-ricardo@ribalda.com
State Master Next
Delegated to: Richard Leitner
Headers show

Commit Message

Ricardo Ribalda Delgado July 5, 2019, 11:18 a.m.
Libtool has hardcoded cc as the name for the compiler. We make a script
that calls gcc.

Fixes:

| ./libtool --mode=link cc -I/workdir/build/tmp/work/dbfp4-poky-linux/javasqlite/20150419-r0/recipe-sysroot-native/usr/lib/jvm/icedtea7-native//include -I/workdir/build/tmp/work/dbfp4-poky-linux/javasqlite/20150419-r0/recipe-sysroot-native/usr/lib/jvm/icedtea7-native//include/linux  -I/workdir/build/tmp/work/dbfp4-poky-linux/javasqlite/20150419-r0/recipe-sysroot-native/usr/include -DHAVE_SQLITE2=0 -DHAVE_SQLITE3=1 -DHAVE_SQLITE_FUNCTION_TYPE=0 -DHAVE_SQLITE_OPEN_AUX_FILE=0 -DHAVE_SQLITE_SET_AUTHORIZER=0 -DHAVE_SQLITE_TRACE=0 -DHAVE_SQLITE_COMPILE=0 -DHAVE_SQLITE_PROGRESS_HANDLER=0 -DHAVE_SQLITE3_MALLOC=1 -DHAVE_SQLITE3_PREPARE_V2=1 -DHAVE_SQLITE3_PREPARE16_V2=1 -DHAVE_SQLITE3_BIND_ZEROBLOB=1 -DHAVE_SQLITE3_CLEAR_BINDINGS=1 -DHAVE_SQLITE3_COLUMN_TABLE_NAME16=0 -DHAVE_SQLITE3_COLUMN_DATABASE_NAME16=0 -DHAVE_SQLITE3_COLUMN_ORIGIN_NAME16=0 -DHAVE_SQLITE3_BIND_PARAMETER_COUNT=1 -DHAVE_SQLITE3_BIND_PARAMETER_NAME=1 -DHAVE_SQLITE3_BIND_PARAMETER_INDEX=1 -DHAVE_SQLITE3_RESULT_ZEROBLO
 B=1 -DHAVE_SQLITE3_INCRBLOBIO=1 -DHAVE_SQLITE3_KEY=0 -DHAVE_SQLITE3_SHARED_CACHE=1 -DHAVE_SQLITE3_OPEN_V2=1 -DHAVE_SQLITE3_LOAD_EXTENSION=0 -DHAVE_SQLITE3_BACKUPAPI=1 -DHAVE_SQLITE3_PROFILE=1 -DHAVE_SQLITE3_STATUS=1 -DHAVE_SQLITE3_DB_STATUS=1 -DHAVE_SQLITE3_STMT_STATUS=1 -DCANT_PASS_VALIST_AS_CHARPTR=1  -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DLL=1 -o native/mkconst native/mkconst.c
| libtool: link: cc -I/workdir/build/tmp/work/dbfp4-poky-linux/javasqlite/20150419-r0/recipe-sysroot-native/usr/lib/jvm/icedtea7-native//include -I/workdir/build/tmp/work/dbfp4-poky-linux/javasqlite/20150419-r0/recipe-sysroot-native/usr/lib/jvm/icedtea7-native//include/linux -I/workdir/build/tmp/work/dbfp4-poky-linux/javasqlite/20150419-r0/recipe-sysroot-native/usr/include -DHAVE_SQLITE2=0 -DHAVE_SQLITE3=1 -DHAVE_SQLITE_FUNCTION_TYPE=0 -DHAVE_SQLITE_OPEN_AUX_FILE=0 -DHAVE_SQLITE_SET_AUTHORIZER=0 -DHAVE_SQLITE_TRACE=0 -DHAVE_SQLITE_COMPILE=0 -DHAVE_SQLITE_PROGRESS_HANDLER=0 -DHAVE_SQLITE3_MALLOC=1 -DHAVE_SQLITE3_PREPARE_V2=1 -DHAVE_SQLITE3_PREPARE16_V2=1 -DHAVE_SQLITE3_BIND_ZEROBLOB=1 -DHAVE_SQLITE3_CLEAR_BINDINGS=1 -DHAVE_SQLITE3_COLUMN_TABLE_NAME16=0 -DHAVE_SQLITE3_COLUMN_DATABASE_NAME16=0 -DHAVE_SQLITE3_COLUMN_ORIGIN_NAME16=0 -DHAVE_SQLITE3_BIND_PARAMETER_COUNT=1 -DHAVE_SQLITE3_BIND_PARAMETER_NAME=1 -DHAVE_SQLITE3_BIND_PARAMETER_INDEX=1 -DHAVE_SQLITE3_RESULT_ZEROBLOB=1 -DHA
 VE_SQLITE3_INCRBLOBIO=1 -DHAVE_SQLITE3_KEY=0 -DHAVE_SQLITE3_SHARED_CACHE=1 -DHAVE_SQLITE3_OPEN_V2=1 -DHAVE_SQLITE3_LOAD_EXTENSION=0 -DHAVE_SQLITE3_BACKUPAPI=1 -DHAVE_SQLITE3_PROFILE=1 -DHAVE_SQLITE3_STATUS=1 -DHAVE_SQLITE3_DB_STATUS=1 -DHAVE_SQLITE3_STMT_STATUS=1 -DCANT_PASS_VALIST_AS_CHARPTR=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DLL=1 -o native/mkconst native/mkconst.c
| ./libtool: line 1720: cc: command not found
| make: *** [Makefile:222: native/mkconst] Error 127

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
---
 recipes-core/javasqlite/javasqlite_20150419.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/recipes-core/javasqlite/javasqlite_20150419.bb b/recipes-core/javasqlite/javasqlite_20150419.bb
index d721d66..06fbac2 100644
--- a/recipes-core/javasqlite/javasqlite_20150419.bb
+++ b/recipes-core/javasqlite/javasqlite_20150419.bb
@@ -7,7 +7,7 @@  That API is wrapped by methods in the SQLite.Database class."
 
 LICENSE = "BSD"
 SECTION = "application"
-PR = "r0"
+PR = "r1"
 SRC_URI =  " \
     http://www.ch-werner.de/javasqlite/${BPN}-${PV}.tar.gz \
     file://0001-fix-errors-during-cross-compile.patch \
@@ -40,3 +40,9 @@  INSANE_SKIP_${PN}-dev = "dev-elf"
 do_configure_append (){
 	cp ${S}/*-libtool ${S}/libtool
 }
+
+do_compile_prepend (){
+	echo '#!/bin/sh' > ${STAGING_BINDIR_NATIVE}/cc
+	echo '${BUILD_CC} $@' >> ${STAGING_BINDIR_NATIVE}/cc
+	chmod a+x ${STAGING_BINDIR_NATIVE}/cc
+}