summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opkbuild.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 4bd6046..8d6e14a 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -194,11 +194,13 @@ EOF
export OH_HOST_ARCH_CPU OH_HOST_ARCH_KERNEL OH_HOST_ARCH_LIBS
export OH_HOST_PLATFORM="${host_platform}"
-# Look up GNU architecture name and set toolchain environment variables.
+# Make sure the architecture table exists.
if [ ! -f "@@DATADIR@@/opkhelper/archtab" ]; then
printf 'opkbuild: Error: architecture table not found.\n' >&2
exit 1
fi
+
+# Look up GNU architecture name and set toolchain environment variables.
export OH_HOST_ARCH_GNU="$(sed -n \
"s/^${OH_HOST_ARCH_DIST}[ \\t][ \\t]*\\(.*\\)$/\\1/p" \
"@@DATADIR@@/opkhelper/archtab")"