From 946b13559b2791546301d4a600492b1c7ab2aa7e Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 19 Oct 2019 06:57:36 -0600 Subject: [PATCH] boards/sim/sim/sim/configs:: Add -m32 to HOSTLDFLAGS if enable CONFIG_SIM_M32 fix the following link error: /usr/bin/ld: i386 architecture of input file `nettest_host.hobj' is incompatible with i386:x86-64 output /usr/bin/ld: i386 architecture of input file `nettest_server.hobj' is incompatible with i386:x86-64 output --- boards/sim/sim/sim/configs/cxxtest/Make.defs | 2 +- boards/sim/sim/sim/configs/nsh2/Make.defs | 4 ++-- boards/sim/sim/sim/scripts/Make.defs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boards/sim/sim/sim/configs/cxxtest/Make.defs b/boards/sim/sim/sim/configs/cxxtest/Make.defs index 01402cd254..7146e1ad71 100644 --- a/boards/sim/sim/sim/configs/cxxtest/Make.defs +++ b/boards/sim/sim/sim/configs/cxxtest/Make.defs @@ -125,6 +125,7 @@ ifeq ($(CONFIG_SIM_M32),y) LDLINKFLAGS += -melf_i386 CCLINKFLAGS += -m32 LDFLAGS += -m32 + HOSTLDFLAGS += -m32 endif MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) @@ -133,4 +134,3 @@ HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(HOSTINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -HOSTLDFLAGS = diff --git a/boards/sim/sim/sim/configs/nsh2/Make.defs b/boards/sim/sim/sim/configs/nsh2/Make.defs index e4460094c2..e329be3f6d 100644 --- a/boards/sim/sim/sim/configs/nsh2/Make.defs +++ b/boards/sim/sim/sim/configs/nsh2/Make.defs @@ -116,7 +116,8 @@ endif ifeq ($(CONFIG_SIM_M32),y) LDLINKFLAGS += -melf_i386 CCLINKFLAGS += -m32 - LDFLAGS += -m32 + LDFLAGS += -m32 + HOSTLDFLAGS += -m32 endif @@ -126,4 +127,3 @@ HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(HOSTINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -HOSTLDFLAGS = diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index 52c6016329..94d53bb872 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -124,6 +124,7 @@ ifeq ($(CONFIG_SIM_M32),y) LDLINKFLAGS += -melf_i386 CCLINKFLAGS += -m32 LDFLAGS += -m32 + HOSTLDFLAGS += -m32 endif @@ -133,4 +134,3 @@ HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(HOSTINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -HOSTLDFLAGS =