From a4f796120780245705086b9c73daab0527d1c5b6 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Sun, 29 Dec 2013 17:27:58 +0100 Subject: [PATCH] Fix compilation with biarch compilers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When compiling OpenHackWare with a biarch compiler that defaults to ppc64 we need to manually tell the build system to use the 32bit target. Signed-off-by: Alexander Graf Signed-off-by: Andreas Färber --- Makefile | 4 ++-- src/boot.ld | 2 +- src/main.ld | 2 +- src/vectors.ld | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9dc19e2..a45674a 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,8 @@ #DEBUG=1 CROSS_COMPILE?=powerpc-linux- -CC:= $(CROSS_COMPILE)gcc -LD:= $(CROSS_COMPILE)ld +CC:= $(CROSS_COMPILE)gcc -m32 +LD:= $(CROSS_COMPILE)ld -m elf32ppc OBJCOPY:= $(CROSS_COMPILE)objcopy MKDIR:= mkdir CAT:= cat diff --git a/src/boot.ld b/src/boot.ld index 916fd94..57070ee 100644 --- a/src/boot.ld +++ b/src/boot.ld @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -OUTPUT_ARCH(powerpc) +OUTPUT_ARCH(powerpc:common) MEMORY { diff --git a/src/main.ld b/src/main.ld index 9b6e8c4..f689f72 100644 --- a/src/main.ld +++ b/src/main.ld @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -OUTPUT_ARCH(powerpc) +OUTPUT_ARCH(powerpc:common) MEMORY { diff --git a/src/vectors.ld b/src/vectors.ld index f003109..cc83b6a 100644 --- a/src/vectors.ld +++ b/src/vectors.ld @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -OUTPUT_ARCH(powerpc) +OUTPUT_ARCH(powerpc:common) MEMORY { -- 2.11.4.GIT