From 9160013ae9647160577abe2275b94627be704044 Mon Sep 17 00:00:00 2001 From: Leon Mak Date: Tue, 5 Dec 2017 15:43:29 -0800 Subject: [PATCH 1/3] Check for rpi 3 Change `-march=` option --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 859f4d7..fa0f4a9 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,11 @@ PROC?=$(shell uname -m) CC=gcc CFLAGS=-fPIC -O3 -fomit-frame-pointer -fno-exceptions -Wall -std=c99 -pedantic +MODEL=$(cat /proc/device-tree/model) ifeq (${PROC},x86_64) CFLAGS+=-m64 -mtune=generic +elif [[ $MODEL == *"Raspberry Pi"* ]] + -march=armv7 else CFLAGS+=-m32 -march=i686 endif From dfc138056661036559a776d2bb843a0ca775bd5a Mon Sep 17 00:00:00 2001 From: Leon Mak Date: Tue, 5 Dec 2017 15:45:11 -0800 Subject: [PATCH 2/3] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fa0f4a9..e9744b3 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ CFLAGS=-fPIC -O3 -fomit-frame-pointer -fno-exceptions -Wall -std=c99 -pedantic MODEL=$(cat /proc/device-tree/model) ifeq (${PROC},x86_64) CFLAGS+=-m64 -mtune=generic -elif [[ $MODEL == *"Raspberry Pi"* ]] +else ifeq [[ $MODEL == *"Raspberry Pi"* ]] -march=armv7 else CFLAGS+=-m32 -march=i686 From 8a694ebc4a2a0c57a9b757ecfb6836fd140fdcda Mon Sep 17 00:00:00 2001 From: Leon Mak Date: Tue, 5 Dec 2017 15:48:45 -0800 Subject: [PATCH 3/3] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e9744b3..e6dd9d6 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ CFLAGS=-fPIC -O3 -fomit-frame-pointer -fno-exceptions -Wall -std=c99 -pedantic MODEL=$(cat /proc/device-tree/model) ifeq (${PROC},x86_64) CFLAGS+=-m64 -mtune=generic -else ifeq [[ $MODEL == *"Raspberry Pi"* ]] +else ifneq (,$(findstring "Raspberry Pi", $(MODEL))) -march=armv7 else CFLAGS+=-m32 -march=i686