blob: 100b765f2da7b5078845e7ccc8248d06bab44b8a [file] [log] [blame]
Brad Bishop7f28bc52017-12-03 23:42:40 -05001From c1c42513edd27c97341f2033af77c13a4724eb8f Mon Sep 17 00:00:00 2001
2From: Haiqing Bai <Haiqing.Bai@windriver.com>
3Date: Fri, 25 Nov 2016 16:48:01 +0800
4Subject: [PATCH] crda: Use target word size instead of host's.
5
6In key2pub.py, the codes check the wordsize
7of the host machine but not the target's, this fix
8fetches the wordsize of target from the build system.
9
10Upstream-Status: Pending
11Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
12---
13 utils/key2pub.py | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/utils/key2pub.py b/utils/key2pub.py
17index 3e84cd2..401d58a 100755
18--- a/utils/key2pub.py
19+++ b/utils/key2pub.py
20@@ -58,9 +58,9 @@ def print_ssl_32(output, name, val):
21 output.write('};\n\n')
22
23 def print_ssl(output, name, val):
24- import struct
25+ import os
26 output.write('#include <stdint.h>\n')
27- if len(struct.pack('@L', 0)) == 8:
28+ if os.getenv('TARGET_BITS') == '64':
29 return print_ssl_64(output, name, val)
30 else:
31 return print_ssl_32(output, name, val)
32--
331.9.1
34