From c53fe8dfbbf70dcc7f46963015d1636afb3a464a Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Wed, 26 May 2010 16:53:43 +0530 Subject: [PATCH] build fixes for sparc64 and freebsd platforms --- conf/any-emu.rmk | 5 ++++- configure.ac | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conf/any-emu.rmk b/conf/any-emu.rmk index 7560c8aba..77ba4f2b7 100644 --- a/conf/any-emu.rmk +++ b/conf/any-emu.rmk @@ -1,6 +1,7 @@ # -*- makefile -*- ifeq ($(target_cpu), sparc64) +COMMON_CFLAGS += -mno-app-regs COMMON_LDFLAGS += -mno-relax endif @@ -25,10 +26,12 @@ TARGET_NO_STRIP = yes noinst_MODULES = emu-full.mod emu_full_mod_SOURCES = kern/emu/full.c emu_full_mod_CFLAGS = $(COMMON_CFLAGS) +emu_full_mod_LDFLAGS = $(COMMON_LDFLAGS) noinst_MODULES = emu-lite.mod emu_lite_mod_SOURCES = kern/emu/lite.c kern/emu/cache.S symlist.c emu_lite_mod_CFLAGS = $(COMMON_CFLAGS) +emu_lite_mod_LDFLAGS = $(COMMON_LDFLAGS) # For halt.mod. pkglib_MODULES += halt.mod @@ -45,7 +48,7 @@ endif grub_emu_LDFLAGS = $(LIBCURSES) ifeq ($(target_cpu), sparc64) -grub_emu_LDFLAGS += -m64 -mno-relax +grub_emu_LDFLAGS += -m64 -melf64_sparc -mno-relax endif ifeq ($(enable_grub_emu_usb), yes) diff --git a/configure.ac b/configure.ac index 9448f792d..54622e5e9 100644 --- a/configure.ac +++ b/configure.ac @@ -155,7 +155,7 @@ esac machine_CPPFLAGS="$machine_CPPFLAGS -DMACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`" CPPFLAGS="$CPPFLAGS $cpu_CPPFLAGS $machine_CPPFLAGS" -TARGET_ASFLAGS="$TARGET_ASFLAGS $machine_CPPFLAGS" +TARGET_ASFLAGS="$TARGET_ASFLAGS $cpu_CPPFLAGS $machine_CPPFLAGS" TARGET_CFLAGS="$TARGET_CFLAGS $cpu_CPPFLAGS $machine_CPPFLAGS" AC_SUBST(host_cpu)