* [sim] canadian cross build for m32c-elf target.
@ 2010-01-05 6:05 Masaki Muranaka
2010-11-21 2:03 ` [ping/RFC] Fwd: " Masaki Muranaka
0 siblings, 1 reply; 4+ messages in thread
From: Masaki Muranaka @ 2010-01-05 6:05 UTC (permalink / raw)
To: gdb-patches
[-- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ping/RFC] Fwd: [sim] canadian cross build for m32c-elf target.
2010-01-05 6:05 [sim] canadian cross build for m32c-elf target Masaki Muranaka
@ 2010-11-21 2:03 ` Masaki Muranaka
2010-11-21 3:29 ` DJ Delorie
0 siblings, 1 reply; 4+ messages in thread
From: Masaki Muranaka @ 2010-11-21 2:03 UTC (permalink / raw)
To: gdb-patches, DJ Delorie
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
Hello,
Ping. Ok to apply?
(I'll change ChangeLog date later)
Begin forwarded message:
> sender: Masaki Muranaka <monaka@monami-software.com>
> date: 2010年1月5日 15:04:59JST
> to: gdb-patches@sourceware.org
> subject: [sim] canadian cross build for m32c-elf target.
>
> 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: 1484 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
[-- Attachment #3: Type: text/plain, Size: 1 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ping/RFC] Fwd: [sim] canadian cross build for m32c-elf target.
2010-11-21 2:03 ` [ping/RFC] Fwd: " Masaki Muranaka
@ 2010-11-21 3:29 ` DJ Delorie
2010-12-04 2:05 ` Masaki Muranaka
0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2010-11-21 3:29 UTC (permalink / raw)
To: Masaki Muranaka; +Cc: gdb-patches
This is OK with me, but I note that opcodes/Makefile uses
$(COMPILE_FOR_BUILD). Sim doesn't have that. I wonder why?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ping/RFC] Fwd: [sim] canadian cross build for m32c-elf target.
2010-11-21 3:29 ` DJ Delorie
@ 2010-12-04 2:05 ` Masaki Muranaka
0 siblings, 0 replies; 4+ messages in thread
From: Masaki Muranaka @ 2010-12-04 2:05 UTC (permalink / raw)
To: DJ Delorie; +Cc: gdb-patches
Hello,
Patch applied. Thanks.
And indeed sim should have $(COMPILE_FOR_BUILD).
On 2010/11/21, at 12:29, DJ Delorie wrote:
>
> This is OK with me, but I note that opcodes/Makefile uses
> $(COMPILE_FOR_BUILD). Sim doesn't have that. I wonder why?
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-04 2:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-05 6:05 [sim] canadian cross build for m32c-elf target Masaki Muranaka
2010-11-21 2:03 ` [ping/RFC] Fwd: " Masaki Muranaka
2010-11-21 3:29 ` DJ Delorie
2010-12-04 2:05 ` Masaki Muranaka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox