kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #41943
Patch: Fixing a compile error on Power PC
-
To:
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
"Steven A. Falco" <stevenfalco@xxxxxxxxx>
-
Date:
Sat, 24 Aug 2019 18:00:57 -0400
-
Autocrypt:
addr=stevenfalco@xxxxxxxxx; keydata= xsFNBFxDhRcBEAC6Imgmt25S/CEOFsv+gHf52PQavJDRWK3pytsiD91DUmZnIwpWkYwJiKo8 E8nYMxw8R4g0YhCXCc7DwYXUnHQgIaO3SnLryLGZntJUuCuZxMjE4YEGOhq0mePnlhz1gcMQ 2TOAvBVXVg2841rEzGWZlXIg53eBavAobB9oJG2/5MyDzyB7d7nhvpuDuEDSKbIR69tbtTQC EQ86hZM+mUvekkU6FiMJQEU4hqJBF4BKmp+0mZ+dN1ZjRPCmCcShj9c6W6n9YITZuOPEBhIB v88m+3YQBkzsPu6tGjAXlk2H4jrkry9BQK27Ddn1N3Gz+oRDkX/UVd/jY2m0A0gxMi++N0wO K2DTShAAO4Imdrb5G1K+UJ0kNbLnkO4CmVVBD/yvnZo1WLRh4MGgUW8J+l1EPjQZvJHSOdIU 7HoLkWDoH6CZg2UqSNrhYIfJJD/K1H0gcXfCVEVhbDlQxclhiWID+8wQ9c0fVa/EabU0zBXJ sLBkO6tEtSaiLKHaIqkYGXCQxvpwHQwPR5ZNt9DXrRkmVm77ymh2jLJbHVv8XgtOJE7XkXn8 3Iv9iUFESd/1xZFUB51eVu+8aDjxDkwaqzlf/rUiOV+S8KZ4//gc1CC0EhqFCRFSZEJsblR1 c0wdF86NVFqeH+g+Z6n/yLKJWAvRLuw8w9JlWnoTMnIzS77J/wARAQABzSdTdGV2ZW4gQS4g RmFsY28gPHN0ZXZlbmZhbGNvQGdtYWlsLmNvbT7CwY4EEwEKADgWIQSDrcEoXtTdcq9JzuJt oCQy7y8uvgUCXTMy7gIbAQULCQgHAwUVCgkICwUWAgMBAAIeAQIX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YmcKOrGh9S73xsCPHZ4+FJxgKqp6O+hyYoW4fCKczpuzABgJUM0fwR4l6DV
-
Openpgp:
id=83ADC1285ED4DD72AF49CEE26DA02432EF2F2EBE
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
I have enabled compilation for PPC64LE, because that was requested by a Fedora user. KiCAD builds fine for 5.1, but the PPC64 compilation is broken on master.
The attached patch fixes that by reverting a small portion of commit 6cab769f41f. Basically, on a 64-bit PPC machine, gcc defines both _ARCH_PPC and _ARCH_PPC64, thus commit 6cab769f41f resulted in trying to compile 32-bit PPC assembly code on PPC64. Also, assuming the assembly worked, we would have wound up with multiple copies of the context code.
Steve
>From 50cfa7f31eab8a8643dd52682d1e627983c8dbb0 Mon Sep 17 00:00:00 2001
From: "Steven A. Falco" <stevenfalco@xxxxxxxxx>
Date: Sat, 24 Aug 2019 15:13:46 -0400
Subject: [PATCH] Revert part of commit 6cab769f41f
Commit 6cab769f41f breaks compilation on ppc64le, because the gcc
compiler defines both _ARCH_PPC and _ARCH_PPC64.
---
include/system/libcontext.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/system/libcontext.h b/include/system/libcontext.h
index dfa323dcd..645d38ebb 100644
--- a/include/system/libcontext.h
+++ b/include/system/libcontext.h
@@ -48,8 +48,7 @@
#ifdef _ARCH_PPC64
#define LIBCONTEXT_PLATFORM_linux_ppc64
#define LIBCONTEXT_CALL_CONVENTION
- #endif
- #ifdef _ARCH_PPC
+ #elif defined _ARCH_PPC
#define LIBCONTEXT_PLATFORM_linux_ppc32
#define LIBCONTEXT_CALL_CONVENTION
#endif
--
2.21.0
Follow ups