From 4203865325c33d752f814850f43d2ecb16c8fa16 Mon Sep 17 00:00:00 2001
From: Sam Thursfield <sam.thursfield@codethink.co.uk>
Date: Fri, 27 Oct 2017 13:49:38 +0000
Subject: Replace use of architecture conditionals with generic project
 conditions

The initial implementation of architecture conditionals has been
removed, as the same behaviours can be implemented using the more
generic mechanism for conditionals that is being introduced for
BuildStream 1.0.

We now have two architecture options: build_arch and arch. They are
documented in project.conf. The first one controls the build sandbox
while the second controls the host and target of the binaries we
produce.
---
 elements/gnu-toolchain/glibc.bst | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'elements/gnu-toolchain/glibc.bst')

diff --git a/elements/gnu-toolchain/glibc.bst b/elements/gnu-toolchain/glibc.bst
index a541a771..01c1971f 100644
--- a/elements/gnu-toolchain/glibc.bst
+++ b/elements/gnu-toolchain/glibc.bst
@@ -12,6 +12,13 @@ depends:
 - gnu-toolchain/fhs-dirs.bst
 - gnu-toolchain/linux-api-headers.bst
 
+variables:
+  glibc-arch-flags: ''
+
+  (?):
+    - arch.startswith("armv7"):
+        glibc-arch-flags: --without-fp
+
 environment:
   PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin
 
@@ -21,14 +28,8 @@ config:
   - mkdir o
 
   - |
-    case "%{bst-arch}" in
-        armv7*)
-            ARCH_FLAGS="--without-fp" ;;
-    esac
-
     export CFLAGS="-O2 $CFLAGS";
-    cd o && ../configure \
-      $ARCH_FLAGS \
+    cd o && ../configure %{glibc-arch-flags} \
       --prefix="%{prefix}" \
       --disable-profile \
       --enable-kernel=3.0.0 \
-- 
cgit v1.2.1

