diff options
Diffstat (limited to 'recipes-security/libseccomp/files/0010-tools-add-ppc-support.patch')
-rw-r--r-- | recipes-security/libseccomp/files/0010-tools-add-ppc-support.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/recipes-security/libseccomp/files/0010-tools-add-ppc-support.patch b/recipes-security/libseccomp/files/0010-tools-add-ppc-support.patch new file mode 100644 index 0000000..30d7681 --- /dev/null +++ b/recipes-security/libseccomp/files/0010-tools-add-ppc-support.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From b54dafd62376f9041b4d48e800f39c588554aabc Mon Sep 17 00:00:00 2001 | ||
2 | From: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
3 | Date: Wed, 11 Feb 2015 13:23:27 +0000 | ||
4 | Subject: [PATCH 10/11] tools: add ppc support | ||
5 | |||
6 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
7 | Signed-off-by: Paul Moore <pmoore@redhat.com> | ||
8 | --- | ||
9 | tools/scmp_arch_detect.c | 3 +++ | ||
10 | tools/scmp_bpf_disasm.c | 2 ++ | ||
11 | tools/scmp_bpf_sim.c | 2 ++ | ||
12 | tools/util.c | 2 ++ | ||
13 | 4 files changed, 9 insertions(+) | ||
14 | |||
15 | diff --git a/tools/scmp_arch_detect.c b/tools/scmp_arch_detect.c | ||
16 | index d23d2ec..03644c6 100644 | ||
17 | --- a/tools/scmp_arch_detect.c | ||
18 | +++ b/tools/scmp_arch_detect.c | ||
19 | @@ -105,6 +105,9 @@ int main(int argc, char *argv[]) | ||
20 | case SCMP_ARCH_PPC64LE: | ||
21 | printf("ppc64le\n"); | ||
22 | break; | ||
23 | + case SCMP_ARCH_PPC: | ||
24 | + printf("ppc\n"); | ||
25 | + break; | ||
26 | default: | ||
27 | printf("unknown\n"); | ||
28 | } | ||
29 | diff --git a/tools/scmp_bpf_disasm.c b/tools/scmp_bpf_disasm.c | ||
30 | index 9199e17..d773469 100644 | ||
31 | --- a/tools/scmp_bpf_disasm.c | ||
32 | +++ b/tools/scmp_bpf_disasm.c | ||
33 | @@ -338,6 +338,8 @@ int main(int argc, char *argv[]) | ||
34 | arch = AUDIT_ARCH_PPC64; | ||
35 | else if (strcmp(optarg, "ppc64le") == 0) | ||
36 | arch = AUDIT_ARCH_PPC64LE; | ||
37 | + else if (strcmp(optarg, "ppc") == 0) | ||
38 | + arch = AUDIT_ARCH_PPC; | ||
39 | else | ||
40 | exit_usage(argv[0]); | ||
41 | break; | ||
42 | diff --git a/tools/scmp_bpf_sim.c b/tools/scmp_bpf_sim.c | ||
43 | index d3e439f..a53b4fd 100644 | ||
44 | --- a/tools/scmp_bpf_sim.c | ||
45 | +++ b/tools/scmp_bpf_sim.c | ||
46 | @@ -253,6 +253,8 @@ int main(int argc, char *argv[]) | ||
47 | arch = AUDIT_ARCH_PPC64; | ||
48 | else if (strcmp(optarg, "ppc64le") == 0) | ||
49 | arch = AUDIT_ARCH_PPC64LE; | ||
50 | + else if (strcmp(optarg, "ppc") == 0) | ||
51 | + arch = AUDIT_ARCH_PPC; | ||
52 | else | ||
53 | exit_fault(EINVAL); | ||
54 | break; | ||
55 | diff --git a/tools/util.c b/tools/util.c | ||
56 | index f998009..b45de3b 100644 | ||
57 | --- a/tools/util.c | ||
58 | +++ b/tools/util.c | ||
59 | @@ -68,6 +68,8 @@ | ||
60 | #else | ||
61 | #define ARCH_NATIVE AUDIT_ARCH_PPC64LE | ||
62 | #endif | ||
63 | +#elif __PPC__ | ||
64 | +#define ARCH_NATIVE AUDIT_ARCH_PPC | ||
65 | #else | ||
66 | #error the simulator code needs to know about your machine type | ||
67 | #endif | ||
68 | -- | ||
69 | 2.3.5 | ||
70 | |||