From c9dcd6ca2f5d129590466cd3f812faf9a7382705 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Wed, 23 Feb 2011 17:56:08 +0000 Subject: [PATCH] Makefile: Fix for x86_64 silly architecture names... Signed-off-by: Michel Pollet --- Makefile.common | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index 022f1f1..bc8e3ba 100644 --- a/Makefile.common +++ b/Makefile.common @@ -26,11 +26,11 @@ # You should have received a copy of the GNU General Public License # along with simavr. If not, see . -# get the first character of what the compiler says it is -ARCH = ${shell $(CC) -dumpmachine | sed 's/\(.\).*/\1/'} +# get the first character of what the compiler says it is, unless it's 'x86_64' doh +ARCH = ${shell $(CC) -dumpmachine | sed -e 's/^x/i/' -e 's/\(.\).*/\1/'} ifeq ($(ARCH), i) -CFLAGS += -mfpmath=sse -msse2 -fPIC +CFLAGS += -mfpmath=sse -msse2 endif CFLAGS += -g --std=gnu99 @@ -46,6 +46,7 @@ else AVR_ROOT := /usr/lib/avr AVR_INC := ${AVR_ROOT} AVR := avr- +CFLAGS += -fPIC endif CC ?= gcc -- 2.39.5