summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-04-22 18:34:10 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-04-22 18:34:10 (EDT)
commitdb131a04978faeba3c267c2f4ece2f8ecb8f382e (patch)
tree6e5e3c0e22386d5c73b72524ced141d0eae9db6a /src
parent8c670d8646abcfc2792c235a40cc552d3e042483 (diff)
Set build architecture variables.
Diffstat (limited to 'src')
-rw-r--r--src/opkbuild.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index a9f87d8..4bd6046 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -179,13 +179,20 @@ version=$(oh_get_field Version)
export OH_SRCPKG="${srcpkg}"
export OH_PKGVER=${version}
-# Set environment variables for the build configuration.
-export OH_HOST_PLATFORM="${host_platform}"
+# Set environment variables for the build architecture.
+export OH_BUILD_ARCH_DIST="${build_arch}"
+IFS=- read OH_BUILD_ARCH_CPU OH_BUILD_ARCH_KERNEL OH_BUILD_ARCH_LIBS <<EOF
+${OH_BUILD_ARCH_DIST}
+EOF
+export OH_BUILD_ARCH_CPU OH_BUILD_ARCH_KERNEL OH_BUILD_ARCH_LIBS
+
+# Set environment variables for the host architecture and platform.
export OH_HOST_ARCH_DIST="${host_arch}"
IFS=- read OH_HOST_ARCH_CPU OH_HOST_ARCH_KERNEL OH_HOST_ARCH_LIBS <<EOF
${OH_HOST_ARCH_DIST}
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.
if [ ! -f "@@DATADIR@@/opkhelper/archtab" ]; then