From 40770ac31c96ea60328e22a927d62acfe4e0fe99 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 4 Jan 2006 07:06:49 +0000 Subject: Bug 618, Thomas Chou: update build flags for nios target --- Rules.mak | 7 +++++++ extra/Configs/Config.nios | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Rules.mak b/Rules.mak index 6f3c90b5b..86a888384 100644 --- a/Rules.mak +++ b/Rules.mak @@ -176,6 +176,11 @@ ifeq ($(TARGET_ARCH),mips) CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32 endif +ifeq ($(TARGET_ARCH),nios) + CPU_LDFLAGS-y+=-m32 + CPU_CFLAGS-y+=-m32 +endif + ifeq ($(TARGET_ARCH),sh) OPTIMIZATION+=-fstrict-aliasing OPTIMIZATION+= $(call check_gcc,-mprefergot,) @@ -281,9 +286,11 @@ ifeq ($(UCLIBC_HAS_SOFT_FLOAT),y) # If -msoft-float isn't supported, we want an error anyway. # Hmm... might need to revisit this for arm since it has 2 different # soft float encodings. +ifneq ($(TARGET_ARCH),nios) ifneq ($(TARGET_ARCH),nios2) CPU_CFLAGS += -msoft-float endif +endif ifeq ($(TARGET_ARCH),arm) # No longer needed with current toolchains, but leave it here for now. # If anyone is actually still using gcc 2.95 (say), they can uncomment it. diff --git a/extra/Configs/Config.nios b/extra/Configs/Config.nios index 5ca9e96c4..32612d083 100644 --- a/extra/Configs/Config.nios +++ b/extra/Configs/Config.nios @@ -15,7 +15,7 @@ config HAVE_ELF config ARCH_CFLAGS string - default "-m32 -funaligned-struct-hack" + default "-funaligned-struct-hack" config LIBGCC_CFLAGS string -- cgit v1.2.3