summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-06-24 14:06:22 -0400
committerTom Rini <trini@ti.com>2014-06-24 14:06:22 -0400
commitba9b42c81b0734d53edfbb1fe4a6ded7de78c5ab (patch)
tree4a2a320c917e0ec10908b25b0878a62b3210f00b /arch
parent19198f8b013b70ae6f497422e5418cc009dea145 (diff)
parent1638d98052e0d03e46d504b21ec1b88ecfcd87aa (diff)
downloadu-boot-imx-ba9b42c81b0734d53edfbb1fe4a6ded7de78c5ab.zip
u-boot-imx-ba9b42c81b0734d53edfbb1fe4a6ded7de78c5ab.tar.gz
u-boot-imx-ba9b42c81b0734d53edfbb1fe4a6ded7de78c5ab.tar.bz2
Merge branch 'sandbox' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/cpu/os.c1
-rw-r--r--arch/sandbox/include/asm/bitops.h5
-rw-r--r--arch/sandbox/include/asm/system.h5
-rw-r--r--arch/x86/config.mk5
-rw-r--r--arch/x86/cpu/config.mk2
5 files changed, 9 insertions, 9 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index 57d04a4..1c4aa3f 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -341,6 +341,7 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp)
ret = -ENOMEM;
goto done;
}
+ next->next = NULL;
strcpy(next->name, entry.d_name);
switch (entry.d_type) {
case DT_REG:
diff --git a/arch/sandbox/include/asm/bitops.h b/arch/sandbox/include/asm/bitops.h
index 74219c5..e807c4e 100644
--- a/arch/sandbox/include/asm/bitops.h
+++ b/arch/sandbox/include/asm/bitops.h
@@ -17,6 +17,7 @@
#ifndef __ASM_SANDBOX_BITOPS_H
#define __ASM_SANDBOX_BITOPS_H
+#include <linux/compiler.h>
#include <asm/system.h>
#ifdef __KERNEL__
@@ -53,7 +54,7 @@ static inline int __test_and_set_bit(int nr, void *addr)
static inline int test_and_set_bit(int nr, void *addr)
{
- unsigned long flags;
+ unsigned long __always_unused flags;
int out;
local_irq_save(flags);
@@ -75,7 +76,7 @@ static inline int __test_and_clear_bit(int nr, void *addr)
static inline int test_and_clear_bit(int nr, void *addr)
{
- unsigned long flags;
+ unsigned long __always_unused flags;
int out;
local_irq_save(flags);
diff --git a/arch/sandbox/include/asm/system.h b/arch/sandbox/include/asm/system.h
index 066acc5..02beed3 100644
--- a/arch/sandbox/include/asm/system.h
+++ b/arch/sandbox/include/asm/system.h
@@ -8,10 +8,7 @@
#define __ASM_SANDBOX_SYSTEM_H
/* Define this as nops for sandbox architecture */
-static inline void local_irq_save(unsigned flags __attribute__((unused)))
-{
-}
-
+#define local_irq_save(x)
#define local_irq_enable()
#define local_irq_disable()
#define local_save_flags(x)
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 38cb7c9..3106079 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -16,17 +16,18 @@ PF_CPPFLAGS_X86 := $(call cc-option, -fno-toplevel-reorder, \
PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86)
PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm
PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0
+PLATFORM_CPPFLAGS += -march=i386 -m32
# Support generic board on x86
__HAVE_ARCH_GENERIC_BOARD := y
PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
-PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions
+PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386
LDFLAGS_FINAL += --gc-sections -pie
LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3
LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3
-export NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+export NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
CONFIG_USE_PRIVATE_LIBGCC := arch/x86/lib
diff --git a/arch/x86/cpu/config.mk b/arch/x86/cpu/config.mk
index c1568cac..4b2c873 100644
--- a/arch/x86/cpu/config.mk
+++ b/arch/x86/cpu/config.mk
@@ -7,7 +7,7 @@
CROSS_COMPILE ?= i386-linux-
-PLATFORM_CPPFLAGS += -DCONFIG_X86 -D__I386__ -march=i386 -Werror
+PLATFORM_CPPFLAGS += -DCONFIG_X86 -D__I386__ -Werror
# DO NOT MODIFY THE FOLLOWING UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
LDPPFLAGS += -DRESET_SEG_START=0xffff0000