Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Masaki Muranaka <monaka@monami-software.com>
To: gdb-patches@sourceware.org
Subject: [sim] canadian cross build for m32c-elf target.
Date: Tue, 05 Jan 2010 06:05:00 -0000	[thread overview]
Message-ID: <B354DFA3-03A0-4D76-A887-DA06B1DE2EF7@monami-software.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

Hello.

I had an build time error like follows when I configured with target=m32c-elf, host=i386-pc-mingw32, build=x86_64-darwin.

/bin/sh: ./opc2c: cannot execute binary file

opc2c must be built by CC_FOR_BUILD instead of CC as it is expected to run on build machine, right?


2010-01-05  Masaki Muranaka  <monaka@monami-software.com>

	* sim/m32c/Makefile.in : Use CC_FOR_BUILD to build opc2c.





--
Masaki Muranaka
Monami software


[-- Attachment #2: 0001-Makefile.in-Use-CC_FOR_BUILD-to-build-opc2c.patch --]
[-- Type: application/octet-stream, Size: 1440 bytes --]

From 4b170eafcb1f810b70f96cf61040f1577e7b3147 Mon Sep 17 00:00:00 2001
From: Masaki Muranaka <monaka@monami-software.com>
Date: Tue, 5 Jan 2010 14:47:12 +0900
Subject: [PATCH] Makefile.in: Use CC_FOR_BUILD to build opc2c.


Signed-off-by: Masaki Muranaka <monaka@monami-software.com>
---
 sim/m32c/Makefile.in |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sim/m32c/Makefile.in b/sim/m32c/Makefile.in
index c304ab8..72e9032 100644
--- a/sim/m32c/Makefile.in
+++ b/sim/m32c/Makefile.in
@@ -55,7 +55,7 @@ m32c.c : m32c.opc opc2c
 	./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c
 
 opc2c : opc2c.o safe-fgets.o
-	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
+	$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $^ -o $@ $(BUILD_LIBS)
 
 sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld
 	../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o
@@ -82,10 +82,14 @@ load.o : load.h cpu.h mem.h
 main.o : cpu.h mem.h misc.h load.h
 mem.o : mem.h cpu.h syscalls.h
 misc.o : cpu.h misc.h
-opc2c.o : safe-fgets.h
 reg.o : cpu.h
-safe-fgets.o : safe-fgets.h
 srcdest.c : cpu.h mem.h
 syscalls.c : cpu.h mem.h syscalls.h
 
 r8c.o : cpu.h mem.h misc.h int.h
+
+opc2c.o : opc2c.c safe-fgets.h
+	$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/opc2c.c
+
+safe-fgets.o : safe-fgets.c safe-fgets.h
+	$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/safe-fgets.c
-- 
1.6.5.2


             reply	other threads:[~2010-01-05  6:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05  6:05 Masaki Muranaka [this message]
2010-11-21  2:03 ` [ping/RFC] Fwd: " Masaki Muranaka
2010-11-21  3:29   ` DJ Delorie
2010-12-04  2:05     ` Masaki Muranaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B354DFA3-03A0-4D76-A887-DA06B1DE2EF7@monami-software.com \
    --to=monaka@monami-software.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox