stackless-dev / stackless

The Stackless Python programming language
http://www.stackless.com/
Other
1.03k stars 60 forks source link

Enable stackless support for ARM target #65

Closed ghost closed 7 years ago

ghost commented 10 years ago

Originally reported by: Jeff Senn (Bitbucket: jeffsenn, GitHub: jeffsenn)


Even though there is stackless platform support for stack switching on ARM, the platform select leaves no way to enable a stackless compile for an ARM target.

This addition to Stackless/platf/slp_platformselect.h enables the building of the existing code targeting ARM with a GCC tool chain.

slp_platformselect.h.zip


ghost commented 8 years ago

Original comment by Jeff Senn (Bitbucket: jeffsenn, GitHub: jeffsenn):


Apparently it was a mistake in some previous build of GCC - the current version I'm using defines arm (correctly). Good to go. Thanks, Anselm.

ghost commented 8 years ago

Original comment by Anselm Kruis (Bitbucket: akruis, GitHub: akruis):


Here is the diff of the attached slp_platformselect.h against our current version.

$ hg diff Stackless/platf/slp_platformselect.h
diff -r 38b6cdef0178 Stackless/platf/slp_platformselect.h
--- a/Stackless/platf/slp_platformselect.h      Mon Sep 05 13:01:04 2016 +0200
+++ b/Stackless/platf/slp_platformselect.h      Mon Sep 05 13:29:30 2016 +0200
@@ -24,6 +24,8 @@
 #include "switch_arm_thumb_gcc.h" /* gcc using arm thumb */
 #elif defined(__GNUC__) && defined(__arm32__)
 #include "switch_arm32_gcc.h" /* gcc using arm32 */
+#elif defined(__GNUC__) && defined(__ARM__)
+#include "switch_arm32_gcc.h" /* gcc using arm32 */
 #elif defined(__GNUC__) && defined(__mips__) && defined(__linux__)
 #include "switch_mips_unix.h" /* MIPS */
 #elif defined(SN_TARGET_PS3)

It adds a test for the C-preprocessor define __ARM__. Unfortunately, I can't find any documentation, that mentions this define.

@jeffsenn: if this issue is still relevant, please provide information about the exact version of GCC and OS.