Skip to content

Instantly share code, notes, and snippets.

@neagix
Created June 22, 2013 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neagix/5841400 to your computer and use it in GitHub Desktop.
Save neagix/5841400 to your computer and use it in GitHub Desktop.
a quick patch to compile bsnes/higan on ARM v8/v9
diff --git a/higan/Makefile b/higan/Makefile
index 73b1a56..4da52ca 100755
--- a/higan/Makefile
+++ b/higan/Makefile
@@ -14,8 +14,8 @@ target := ethos
# console := true
# compiler
-c := $(compiler) -std=gnu99
-cpp := $(subst cc,++,$(compiler)) -std=gnu++0x
+c := $(compiler) -std=gnu99 $(CFLAGS)
+cpp := $(subst cc,++,$(compiler)) -std=gnu++0x $(CXXFLAGS)
flags := -I. -O3 -fomit-frame-pointer
link := -s
objects := libco
@@ -33,7 +33,7 @@ endif
# platform
ifeq ($(platform),x)
- flags += -march=native
+# flags += -march=native
link += -Wl,-export-dynamic -ldl -lX11 -lXext
else ifeq ($(platform),win)
ifeq ($(arch),win32)
diff --git a/higan/nall/Makefile b/higan/nall/Makefile
index bbc4b02..fe7e032 100755
--- a/higan/nall/Makefile
+++ b/higan/nall/Makefile
@@ -40,7 +40,7 @@ ifeq ($(compiler),)
else ifeq ($(platform),osx)
compiler := gcc-mp-4.7
else
- compiler := gcc-4.7
+ compiler := gcc
endif
endif
diff --git a/higan/nall/intrinsics.hpp b/higan/nall/intrinsics.hpp
index 413ef59..d693bb4 100755
--- a/higan/nall/intrinsics.hpp
+++ b/higan/nall/intrinsics.hpp
@@ -45,7 +45,7 @@ struct Intrinsics {
/* Endian detection */
-#if defined(__i386__) || defined(__amd64__) || defined(_M_IX86) || defined(_M_AMD64)
+#if defined(__i386__) || defined(__amd64__) || defined(_M_IX86) || defined(_M_AMD64) || defined(__arm__)
#define ENDIAN_LSB
#define ARCH_LSB
Intrinsics::Endian Intrinsics::endian() { return Intrinsics::Endian::LSB; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment