extract-utils: Specify arch for binary targets
If arch is not specified, blueprint parsing and elf checks assume the source is the target arch. If target is 64-bit and the binary is 32-bit, conflicts in symbols can arise, so lets be specific. Change-Id: I943e269465e5b20829cb4719b81a7638b025b123
This commit is contained in:
committed by
Chirayu Desai
parent
8c6023360c
commit
71a53af8cf
@@ -567,10 +567,24 @@ function write_blueprint_packages() {
|
|||||||
printf '\tname: "%s",\n' "$PKGNAME"
|
printf '\tname: "%s",\n' "$PKGNAME"
|
||||||
printf '\towner: "%s",\n' "$VENDOR"
|
printf '\towner: "%s",\n' "$VENDOR"
|
||||||
if [ "$EXTENSION" != "sh" ]; then
|
if [ "$EXTENSION" != "sh" ]; then
|
||||||
printf '\tsrcs: ["%s/bin/%s"],\n' "$SRC" "$FILE"
|
printf '\ttarget: {\n'
|
||||||
if [ -z "$DISABLE_CHECKELF" ]; then
|
if objdump -a "$ANDROID_ROOT"/"$OUTDIR"/"$SRC"/bin/"$FILE" |grep -c 'file format elf64' > /dev/null; then
|
||||||
printf '\tshared_libs: [%s],\n' "$(basename -s .so $(${OBJDUMP} -x "$ANDROID_ROOT"/"$OUTDIR"/"$SRC"/bin/"$FILE" 2>/dev/null |grep NEEDED) 2>/dev/null |grep -v ^NEEDED$ |sed 's/-3.9.1//g' |sed 's/\(.*\)/"\1",/g' |tr '\n' ' ')"
|
printf '\t\tandroid_arm64: {\n'
|
||||||
else
|
else
|
||||||
|
printf '\t\tandroid_arm: {\n'
|
||||||
|
fi
|
||||||
|
printf '\t\t\tsrcs: ["%s/bin/%s"],\n' "$SRC" "$FILE"
|
||||||
|
if [ -z "$DISABLE_CHECKELF" ]; then
|
||||||
|
printf '\t\t\tshared_libs: [%s],\n' "$(basename -s .so $(${OBJDUMP} -x "$ANDROID_ROOT"/"$OUTDIR"/"$SRC"/bin/"$FILE" 2>/dev/null |grep NEEDED) 2>/dev/null |grep -v ^NEEDED$ |sed 's/-3.9.1//g' |sed 's/\(.*\)/"\1",/g' |tr '\n' ' ')"
|
||||||
|
fi
|
||||||
|
printf '\t\t},\n'
|
||||||
|
printf '\t},\n'
|
||||||
|
if objdump -a "$ANDROID_ROOT"/"$OUTDIR"/"$SRC"/bin/"$FILE" |grep -c 'file format elf64' > /dev/null; then
|
||||||
|
printf '\tcompile_multilib: "%s",\n' "64"
|
||||||
|
else
|
||||||
|
printf '\tcompile_multilib: "%s",\n' "32"
|
||||||
|
fi
|
||||||
|
if [ ! -z "$DISABLE_CHECKELF" ]; then
|
||||||
printf '\tcheck_elf_files: false,\n'
|
printf '\tcheck_elf_files: false,\n'
|
||||||
fi
|
fi
|
||||||
printf '\tstrip: {\n'
|
printf '\tstrip: {\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user