From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11288 invoked by alias); 22 Nov 2013 19:34:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11240 invoked by uid 89); 22 Nov 2013 19:34:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: multi.imgtec.com Received: from Unknown (HELO multi.imgtec.com) (194.200.65.239) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 22 Nov 2013 19:34:53 +0000 From: "Steve Ellcey " Date: Fri, 22 Nov 2013 20:00:00 -0000 To: Subject: [patch, sim] Fix simulator Makefile User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: X-SEF-Processed: 7_3_0_01192__2013_11_22_19_34_45 X-SW-Source: 2013-11/txt/msg00705.txt.bz2 I am trying to build a complete 32 bit toolchain, including the simulator, on an x86-64 Linux box by setting CFLAGS and CXXFLAGS to '-O2 -g -m32'. I ran into a problem when building the simulator because in the igen subdirectory make is using -m32 when compiling the objects that go into igen but not on the link line. I tried setting LDFLAGS to -m32 but that did not help. I noticed that a number of other targets in that Makefile (that no longer appear to be used) use $(BUILD_CFLAGS) as well as $(BUILD_LDFLAGS) when linking. Making that change when building igen fixed the problem. This may be considered an obvious fix, but I thought I would send it out first anyway just to double check. OK to checkin? Steve Ellcey sellcey@mips.com 2013-11-22 Steve Ellcey * igen/Makefile.in (igen): Use BUILD_CFLAGS in link. diff --git a/sim/igen/Makefile.in b/sim/igen/Makefile.in index 7b2375c..8f6a42c 100644 --- a/sim/igen/Makefile.in +++ b/sim/igen/Makefile.in @@ -117,7 +117,7 @@ IGEN_OBJS=\ gen.o igen: igen.o $(IGEN_OBJS) - $(CC_FOR_BUILD) $(BUILD_LDFLAGS) -o igen igen.o $(IGEN_OBJS) $(LIBIBERTY_LIB) + $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o igen igen.o $(IGEN_OBJS) $(LIBIBERTY_LIB) igen.o: igen.c misc.h filter_host.h lf.h table.h ld-decode.h ld-cache.h ld-insn.h filter.h gen-model.h gen-itable.h gen-icache.h gen-idecode.h gen-engine.h gen-semantics.h gen-support.h gen.h igen.h $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c