kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #39530
Re: Kicad support for Linux on PPC
-
From:
Jean-Samuel Reynaud <js.reynaud@xxxxxxxxx>
-
Date:
Wed, 20 Feb 2019 14:18:59 +0100
-
Autocrypt:
addr=js.reynaud@xxxxxxxxx; prefer-encrypt=mutual; keydata= xsBNBFRE8V0BCAC+AVA0CmgbCmSZlEWOdsO+fitOXrTj/6hYgQ5hXUQ3CFGufK5ofZA9HOxi Bt+8CBDOGt4XMwiJF1BC4pchqk9UIwAxWIltMvlTllY7p0qj5CO0FPm4861pJbP9ugdjfRHI 5FqtL3HIsixq5e6gfWfHPz6mpnizeU9/qlhGDGfQ7xWrjWRtjpyBdy1tkrW4yxWccFMYASem vN0x/5jCpg4aeM2FsqLQm+PJLjiIWT0AtyPBvvQSCOeAWX8BzU5dfVX+qzQUYlAWP4clPsTH uQ78jV99CDBvLrhgMi03SU1J30oiNL2a+B2RAHq7iPvSickN1kwtNH42H8QjOTWx8vz3ABEB AAHNKkplYW4tU2FtdWVsIFJleW5hdWQgPGpzLnJleW5hdWRAZ21haWwuY29tPsLAeAQTAQIA IgUCVETxXQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQkhQ/kLFaxSV7kAf/afy/ bh7NnEhgjs1NxyycYdi2rzFGKKAyqavi+Y5T0hVoIrX3O26tJ1LchkOX+9NlrHDYOwo/gOPg YboJz5Vmuh2o1JveRcWkbPF6mzqKmLcg/8LxrjcmdKwjmglsu9zvpsF+CN2HmtuTKnDRitv2 hLl6GbWz05hn6/cE8vgHlkkFnDPzORLmpW0yOjCowCGJTgdrkUWro1vfTixxHsQke55o9SOg k0KBAHKGpWOxypNcNC3GPWt8z9Pk5vuBTILYItzU4eCCDTTHHpmYknAII+KIR2GIiwEoJ1i0 MkLHlccZspS9ShQlvds329gxcMe0ssQJ1SplaRAr0D/FP643Gc7ATQRURPFdAQgA6RcTNoqz gm6f42zDPrj0EajJIiIKDFLem1oskMPfWCDufsPrSJ6FvEjnjGD95SMbkSDs2ufbFx2/CMbc VSuX3iNSmJiP+zt+378/cORxYcpF9qYfee3naQKp6zJC/KKyXcXIkgBWF6JLZqFoF50j7+iE LL6udNrCH3b3Gsbb9ViT9Qf1RQ8ZvYFrNPfkMEW88d4cQAQo3cUTonzrPWMlAe7saiWH3k5w j3NNstzCEzxndQpZYavjwMEtUa+9KFOkd9HHuL0gnGK11ze/O65Jl1ZSHgiWKAxF/SBlyTCu zkeqGCP9ihWCGuX4EWFT0R/cmqiFigAQSce5TVGq2Ga3uwARAQABwsBeBBgBAgAJBQJURPFd AhsMAAoJEJIUP5CxWsUlIbUH+KRZKwWOF3LVa+qrWeP/k4CXDjWsO+PYBO5A/Mwgzhz5atJC s/9ot27i7JlEeghYmSud49OT3m3w4PIA5LtmzGkihNrPMC2eTpQMg/msYg7zc+lyoXQibm8G CQ4MaFVVSYVJA0wPe+UWy7DC4r+c7/WdrHSM2j8QJgRa3MZZJ/oGGOKkZd0znJlDzFnRN22n fOwxPuvt9OtBDx4q9HJFHroL8h+AGqHl+z43zfbvLVKfgn4Jqo/yx0o4VnBOHortKm1cPat1 FQDFvmbLNNh4frXzWnWseSg9Eqo1OKFoX+Puy6MGJPk+r+/W4xlN7kaidlM/s6BZ3qA4iTlF cemauw==
-
Cc:
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<5718b48ca62d0eea6171e834febec7a4@hillbrand.org>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
Dear All,
Following this patch application, please find attached a small patch to
fix compilation issue on PPC64 (PPC32 was ok).
Regards,
Le 18/02/2019 à 14:40, Seth Hillbrand a écrit :
> Am 2019-02-11 10:39, schrieb Jean-Samuel Reynaud:
>> Dear all,
>>
>> Please find attached a patch to adding missing support for Linux
>> platform on arch PPC and PPC64.
>> It's proposed by an external user who need that...
>>
>>
>> Regards,
>
> This patch has been pushed to the KiCad source tree. Thank you
> Jean-Samuel and Gianluca!
>
> -S
>From 4ce597bd0a1cfe36eae92f7abac1ca23bf0b0b22 Mon Sep 17 00:00:00 2001
From: Jean-Samuel Reynaud <js.reynaud@xxxxxxxxx>
Date: Wed, 20 Feb 2019 14:15:26 +0100
Subject: [PATCH] Fix compilation issue on PPC64
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.7.4"
This is a multi-part message in MIME format.
--------------2.7.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
common/system/libcontext.cpp | 62 ++++++++++++++++++++++----------------------
1 file changed, 31 insertions(+), 31 deletions(-)
--------------2.7.4
Content-Type: text/x-patch; name="0001-Fix-compilation-issue-on-PPC64.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Fix-compilation-issue-on-PPC64.patch"
diff --git a/common/system/libcontext.cpp b/common/system/libcontext.cpp
index 17f656e..f6f83ce 100644
--- a/common/system/libcontext.cpp
+++ b/common/system/libcontext.cpp
@@ -1011,24 +1011,24 @@ __asm (
#if defined(LIBCONTEXT_PLATFORM_linux_ppc64) && defined(LIBCONTEXT_COMPILER_gcc)
__asm (
".globl jump_fcontext\n"
-"#if _CALL_ELF == 2\n"
+#if _CALL_ELF == 2
" .text\n"
" .align 2\n"
"jump_fcontext:\n"
" addis %r2, %r12, .TOC.-jump_fcontext@ha\n"
" addi %r2, %r2, .TOC.-jump_fcontext@l\n"
" .localentry jump_fcontext, . - jump_fcontext\n"
-"#else\n"
+#else
" .section \".opd\",\"aw\"\n"
" .align 3\n"
"jump_fcontext:\n"
-"# ifdef _CALL_LINUX\n"
+# ifdef _CALL_LINUX
" .quad .L.jump_fcontext,.TOC.@tocbase,0\n"
" .type jump_fcontext,@function\n"
" .text\n"
" .align 2\n"
".L.jump_fcontext:\n"
-"# else\n"
+# else
" .hidden .jump_fcontext\n"
" .globl .jump_fcontext\n"
" .quad .jump_fcontext,.TOC.@tocbase,0\n"
@@ -1037,13 +1037,13 @@ __asm (
" .text\n"
" .align 2\n"
".jump_fcontext:\n"
-"# endif\n"
-"#endif\n"
+# endif
+#endif
" # reserve space on stack\n"
" subi %r1, %r1, 328\n"
-"#if _CALL_ELF != 2\n"
+#if _CALL_ELF != 2
" std %r2, 152(%r1) # save TOC\n"
-"#endif\n"
+#endif
" std %r14, 160(%r1) # save R14\n"
" std %r15, 168(%r1) # save R15\n"
" std %r16, 176(%r1) # save R16\n"
@@ -1122,9 +1122,9 @@ __asm (
" lfd %f0, 144(%r1) # load FPSCR\n"
" mtfsf 0xff, %f0 # restore FPSCR\n"
"2:\n"
-"#if _CALL_ELF != 2\n"
+#if _CALL_ELF != 2
" ld %r2, 152(%r1) # restore TOC\n"
-"#endif\n"
+#endif
" ld %r14, 160(%r1) # restore R14\n"
" ld %r15, 168(%r1) # restore R15\n"
" ld %r16, 176(%r1) # restore R16\n"
@@ -1160,15 +1160,15 @@ __asm (
" mr %r3, %r5\n"
" # jump to context\n"
" bctr\n"
-"#if _CALL_ELF == 2\n"
+#if _CALL_ELF == 2
" .size jump_fcontext, .-jump_fcontext\n"
-"#else\n"
-"# ifdef _CALL_LINUX\n"
+#else
+# ifdef _CALL_LINUX
" .size .jump_fcontext, .-.L.jump_fcontext\n"
-"# else\n"
+# else
" .size .jump_fcontext, .-.jump_fcontext\n"
-"# endif\n"
-"#endif\n"
+# endif
+#endif
".section .note.GNU-stack,\"\",%progbits\n"
);
@@ -1177,24 +1177,24 @@ __asm (
#if defined(LIBCONTEXT_PLATFORM_linux_ppc64) && defined(LIBCONTEXT_COMPILER_gcc)
__asm (
".globl make_fcontext\n"
-"#if _CALL_ELF == 2\n"
+#if _CALL_ELF == 2
" .text\n"
" .align 2\n"
"make_fcontext:\n"
" addis %r2, %r12, .TOC.-make_fcontext@ha\n"
" addi %r2, %r2, .TOC.-make_fcontext@l\n"
" .localentry make_fcontext, . - make_fcontext\n"
-"#else\n"
+#else
" .section \".opd\",\"aw\"\n"
" .align 3\n"
"make_fcontext:\n"
-"# ifdef _CALL_LINUX\n"
+# ifdef _CALL_LINUX
" .quad .L.make_fcontext,.TOC.@tocbase,0\n"
" .type make_fcontext,@function\n"
" .text\n"
" .align 2\n"
".L.make_fcontext:\n"
-"# else\n"
+# else
" .hidden .make_fcontext\n"
" .globl .make_fcontext\n"
" .quad .make_fcontext,.TOC.@tocbase,0\n"
@@ -1203,8 +1203,8 @@ __asm (
" .text\n"
" .align 2\n"
".make_fcontext:\n"
-"# endif\n"
-"#endif\n"
+# endif
+#endif
" # save return address into R6\n"
" mflr %r6\n"
" # first arg of make_fcontext() == top address of context-stack\n"
@@ -1215,17 +1215,17 @@ __asm (
" subi %r3, %r3, 392\n"
" # third arg of make_fcontext() == address of context-function\n"
" # entry point (ELFv2) or descriptor (ELFv1)\n"
-"#if _CALL_ELF == 2\n"
+#if _CALL_ELF == 2
" # save address of context-function entry point\n"
" std %r5, 320(%r3)\n"
-"#else\n"
+#else
" # save address of context-function entry point\n"
" ld %r4, 0(%r5)\n"
" std %r4, 320(%r3)\n"
" # save TOC of context-function\n"
" ld %r4, 8(%r5)\n"
" std %r4, 152(%r3)\n"
-"#endif\n"
+#endif
" # load LR\n"
" mflr %r0\n"
" # jump to label 1\n"
@@ -1255,15 +1255,15 @@ __asm (
" # exit application\n"
" bl _exit\n"
" nop\n"
-"#if _CALL_ELF == 2\n"
+#if _CALL_ELF == 2
" .size make_fcontext, .-make_fcontext\n"
-"#else\n"
-"# ifdef _CALL_LINUX\n"
+#else
+# ifdef _CALL_LINUX
" .size .make_fcontext, .-.L.make_fcontext\n"
-"# else\n"
+# else
" .size .make_fcontext, .-.make_fcontext\n"
-"# endif\n"
-"#endif\n"
+# endif
+#endif
".section .note.GNU-stack,\"\",%progbits\n"
);
--------------2.7.4--
Follow ups
References