Created
October 20, 2015 05:13
-
-
Save mikekasprzak/0ecf9758fa1e7ae27e4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -rupN openlitespeed-1.4.12/configure.ac openlitespeed-1.4.12-ARM/configure.ac | |
--- openlitespeed-1.4.12/configure.ac 2015-10-19 14:37:38.000000000 -0400 | |
+++ openlitespeed-1.4.12-ARM/configure.ac 2015-10-19 23:24:19.577309207 -0400 | |
@@ -178,15 +178,21 @@ AC_ARG_WITH([libdir], | |
[OPENLSWS_LIBDIR="$withval"], [ | |
OSTYPE=`uname -m` | |
OSNAME=`uname -s` | |
- if test "$OSNAME" != Linux ; then | |
- OPENLSWS_LIBDIR=lib | |
- else | |
- if test "$OSTYPE" != x86_64 ; then | |
+ OPENLSWS_LIBDIR=lib | |
+ if test "$OSNAME" = Linux ; then | |
+ if test "$OSTYPE" = x86_64 ; then | |
+ OPENLSWS_LIBDIR=lib64 | |
+ elif test "$OSTYPE" = i686 ; then | |
CFLAGS="$CFLAGS -march=i686" | |
CXXFLAGS="$CXXFLAGS -march=i686" | |
- OPENLSWS_LIBDIR=lib | |
- else | |
- OPENLSWS_LIBDIR=lib64 | |
+ elif test "$OSTYPE" = armv7l ; then | |
+ # Raspberry Pi 2, Scaleway C1, Parallella | |
+ CFLAGS="$CFLAGS -march=armv7" | |
+ CXXFLAGS="$CXXFLAGS -march=armv7" | |
+ elif test "$OSTYPE" = armv6l ; then | |
+ # Raspberry Pi (not Pi 2) | |
+ CFLAGS="$CFLAGS -march=armv6 -mfloat-abi=hard -mfpu=vfp" | |
+ CXXFLAGS="$CXXFLAGS -march=armv6 -mfloat-abi=hard -mfpu=vfp" | |
fi | |
fi | |
]) | |
diff -rupN openlitespeed-1.4.12/include/lsr/ls_atomic.h openlitespeed-1.4.12-ARM/include/lsr/ls_atomic.h | |
--- openlitespeed-1.4.12/include/lsr/ls_atomic.h 2015-10-19 14:37:38.000000000 -0400 | |
+++ openlitespeed-1.4.12-ARM/include/lsr/ls_atomic.h 2015-10-19 23:30:21.182581358 -0400 | |
@@ -45,7 +45,7 @@ typedef union | |
void *m_ptr; | |
long m_seq; | |
}; | |
-#if defined( __i386__ ) | |
+#if defined( __i386__ )||defined( __arm__ ) | |
uint64_t m_whole; | |
#elif defined( __x86_64 )||defined( __x86_64__ ) | |
#if 0 | |
@@ -55,7 +55,7 @@ typedef union | |
#endif | |
#endif | |
} __attribute__((__aligned__( | |
-#if defined( __i386__ ) | |
+#if defined( __i386__ )||defined( __arm__ ) | |
8 | |
#elif defined( __x86_64 )||defined( __x86_64__ ) | |
16 | |
@@ -95,7 +95,7 @@ typedef union | |
#define ls_atomic_fetch_add __sync_fetch_and_add | |
#define ls_atomic_fetch_sub __sync_fetch_and_sub | |
-#if defined( __i386__ ) | |
+#if defined( __i386__ )||defined( __arm__ ) | |
ls_atomic_inline char ls_atomic_dcas(ls_atom_xptr_t *ptr, | |
ls_atom_xptr_t *cmpptr, ls_atom_xptr_t *newptr) | |
@@ -115,6 +115,10 @@ ls_atomic_inline void ls_atomic_dcasv(ls | |
#endif | |
#else // USE_GCC_ATOMIC | |
+#if defined( __arm__ ) | |
+#error "GCC atomics required on ARM (USE_GCC_ATOMIC)." | |
+#endif | |
+ | |
#if defined( __i386__ ) | |
#define ls_atomic_setint(ptr, val) \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment