logrotate: enable selinux support
[buildroot-gz.git] / package / libffi / 0004-m68k-support-ISA-A-Coldfire-CPUs.patch
blob9308c8951aeefbf84f1f680129b2af3ba161cfb8
1 From 733bb188b898385cfb5ad28cc0e3ecaf38237350 Mon Sep 17 00:00:00 2001
2 From: Waldemar Brodkorb <wbx@openadk.org>
3 Date: Sat, 20 Aug 2016 00:52:19 +0200
4 Subject: [PATCH] m68k: support ISA-A Coldfire CPUs
6 Fix compilation for m68k/coldfire CPUs like mcf5208.
8 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 Signed-off-by: Thorsten Glaser <tg@mirbsd.de>
10 ---
11 src/m68k/sysv.S | 29 ++++++++++++++++++++++++++++-
12 1 file changed, 28 insertions(+), 1 deletion(-)
14 diff --git a/src/m68k/sysv.S b/src/m68k/sysv.S
15 index ec2b14f..ea40f11 100644
16 --- a/src/m68k/sysv.S
17 +++ b/src/m68k/sysv.S
18 @@ -3,7 +3,7 @@
19 sysv.S - Copyright (c) 2012 Alan Hourihane
20 Copyright (c) 1998, 2012 Andreas Schwab
21 Copyright (c) 2008 Red Hat, Inc.
22 - Copyright (c) 2012 Thorsten Glaser
23 + Copyright (c) 2012, 2016 Thorsten Glaser
25 m68k Foreign Function Interface
27 @@ -72,6 +72,15 @@ CALLFUNC(ffi_call_SYSV):
28 pea 4(%sp)
29 #if !defined __PIC__
30 jsr CALLFUNC(ffi_prep_args)
31 +#elif defined(__uClinux__) && defined(__ID_SHARED_LIBRARY__)
32 + move.l _current_shared_library_a5_offset_(%a5),%a0
33 + move.l CALLFUNC(ffi_prep_args@GOT)(%a0),%a0
34 + jsr (%a0)
35 +#elif defined(__mcoldfire__) && !defined(__mcfisab__) && !defined(__mcfisac__)
36 + move.l #_GLOBAL_OFFSET_TABLE_@GOTPC,%a0
37 + lea (-6,%pc,%a0),%a0
38 + move.l CALLFUNC(ffi_prep_args@GOT)(%a0),%a0
39 + jsr (%a0)
40 #else
41 bsr.l CALLFUNC(ffi_prep_args@PLTPC)
42 #endif
43 @@ -215,6 +224,15 @@ CALLFUNC(ffi_closure_SYSV):
44 move.l %a0,-(%sp)
45 #if !defined __PIC__
46 jsr CALLFUNC(ffi_closure_SYSV_inner)
47 +#elif defined(__uClinux__) && defined(__ID_SHARED_LIBRARY__)
48 + move.l _current_shared_library_a5_offset_(%a5),%a0
49 + move.l CALLFUNC(ffi_closure_SYSV_inner@GOT)(%a0),%a0
50 + jsr (%a0)
51 +#elif defined(__mcoldfire__) && !defined(__mcfisab__) && !defined(__mcfisac__)
52 + move.l #_GLOBAL_OFFSET_TABLE_@GOTPC,%a0
53 + lea (-6,%pc,%a0),%a0
54 + move.l CALLFUNC(ffi_closure_SYSV_inner@GOT)(%a0),%a0
55 + jsr (%a0)
56 #else
57 bsr.l CALLFUNC(ffi_closure_SYSV_inner@PLTPC)
58 #endif
59 @@ -317,6 +335,15 @@ CALLFUNC(ffi_closure_struct_SYSV):
60 move.l %a0,-(%sp)
61 #if !defined __PIC__
62 jsr CALLFUNC(ffi_closure_SYSV_inner)
63 +#elif defined(__uClinux__) && defined(__ID_SHARED_LIBRARY__)
64 + move.l _current_shared_library_a5_offset_(%a5),%a0
65 + move.l CALLFUNC(ffi_closure_SYSV_inner@GOT)(%a0),%a0
66 + jsr (%a0)
67 +#elif defined(__mcoldfire__) && !defined(__mcfisab__) && !defined(__mcfisac__)
68 + move.l #_GLOBAL_OFFSET_TABLE_@GOTPC,%a0
69 + lea (-6,%pc,%a0),%a0
70 + move.l CALLFUNC(ffi_closure_SYSV_inner@GOT)(%a0),%a0
71 + jsr (%a0)
72 #else
73 bsr.l CALLFUNC(ffi_closure_SYSV_inner@PLTPC)
74 #endif
75 --
76 1.7.10.4