summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSipke Vriend <sipke.vriend@xilinx.com>2013-05-23 08:18:02 +1000
committerSipke Vriend <sipke.vriend@xilinx.com>2013-05-23 08:18:02 +1000
commit31a59c8825650f801a6e549b0215da835386b243 (patch)
tree65388cc467a2526267d8009ee0c9ad7c03fab806
parent62047c26d234418404776b0af4f39e5d1c6c73c7 (diff)
downloadmeta-xilinx-31a59c8825650f801a6e549b0215da835386b243.tar.gz
microblaze: Set FPU_TARGET and add sanity checking
Set bitbake 'known' FPU_TARGET to reflect soft-fpu or hard-fpu Sanity check: add pattern-compare if reorder only exists in v8.30. Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com>
-rw-r--r--conf/machine/include/microblaze/feature-microblaze-fpu.inc6
-rw-r--r--conf/machine/include/microblaze/feature-microblaze-v8.inc21
2 files changed, 25 insertions, 2 deletions
diff --git a/conf/machine/include/microblaze/feature-microblaze-fpu.inc b/conf/machine/include/microblaze/feature-microblaze-fpu.inc
index 07f9ba93..bf2fe38b 100644
--- a/conf/machine/include/microblaze/feature-microblaze-fpu.inc
+++ b/conf/machine/include/microblaze/feature-microblaze-fpu.inc
@@ -1,5 +1,3 @@
1TARGET_FPU = "fpu-other"
2
3TUNEVALID[fpu-soft] = "Use Microblaze software FPU" 1TUNEVALID[fpu-soft] = "Use Microblaze software FPU"
4TUNEVALID[fpu-hard] = "Enable Microblaze hardware FPU in basic mode." 2TUNEVALID[fpu-hard] = "Enable Microblaze hardware FPU in basic mode."
5TUNEVALID[fpu-hard-extended] = "Enable Microblaze hardware FPU in extended mode - conversion and square root instructions." 3TUNEVALID[fpu-hard-extended] = "Enable Microblaze hardware FPU in extended mode - conversion and square root instructions."
@@ -11,5 +9,9 @@ MBCCARGSFPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "-mhar
11MBPKGFPU_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-fb", "", d)}" 9MBPKGFPU_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-fb", "", d)}"
12MBPKGFPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "-fe", "${MBPKGFPU_BASIC}", d)}" 10MBPKGFPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "-fe", "${MBPKGFPU_BASIC}", d)}"
13 11
12# Set target fpu (bitbake known target) to soft or hard (basic or extended in microblaze language)
13TARGETFPU_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "fpu-hard", "fpu-soft", d)}"
14TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "fpu-hard", "${TARGETFPU_BASIC}", d)}"
15
14TUNECONFLICTS[fpu-hard] = "fpu-soft" 16TUNECONFLICTS[fpu-hard] = "fpu-soft"
15TUNECONFLICTS[fpu-hard-extended] = "fpu-soft" 17TUNECONFLICTS[fpu-hard-extended] = "fpu-soft"
diff --git a/conf/machine/include/microblaze/feature-microblaze-v8.inc b/conf/machine/include/microblaze/feature-microblaze-v8.inc
index 21b54c0f..46a11cfd 100644
--- a/conf/machine/include/microblaze/feature-microblaze-v8.inc
+++ b/conf/machine/include/microblaze/feature-microblaze-v8.inc
@@ -22,3 +22,24 @@ MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v8.10", "-v8.10", "" ,d)
22TUNEVALID[v8.00] = "Use Microblaze version 8.00" 22TUNEVALID[v8.00] = "Use Microblaze version 8.00"
23MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v8.00", "-mcpu=v8.00.a", "" ,d)}" 23MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v8.00", "-mcpu=v8.00.a", "" ,d)}"
24MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v8.00", "-v8.00", "" ,d)}" 24MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v8.00", "-v8.00", "" ,d)}"
25
26TUNECONFLICTS[v8.00] += "reorder"
27TUNECONFLICTS[v8.10] += "reorder"
28TUNECONFLICTS[v8.20] += "reorder"
29
30# Perform some additional sanity checking
31python __anonymous () {
32 import bb
33 tune_features = bb.data.getVar('TUNE_FEATURES', d, 1)
34 tuneslist = tune_features.split()
35
36 #
37 # GCC will fail on v8.30 if reorder and pattern-compare are not
38 # both in ccflags
39 # -mxl-reorder requires -mxl-pattern-compare for -mcpu=v8.30.a
40 # Check if either one exists alone and if so, add the other
41 #
42 if 'v8.30' in tuneslist:
43 if 'reorder' in tuneslist and 'pattern-compare' not in tuneslist:
44 d.setVar("TUNE_FEATURES", "%s pattern-compare" % tune_features)
45}