* cross build for OS lion
@ 2011-10-06 17:09 Peica
2011-10-10 20:48 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Peica @ 2011-10-06 17:09 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
Hi,
I have make a patch for crosstool-NG cross building from OS Lion via MacPort GCC. If I use the default one, it could stop the building because the script set the Xcode gcc as C_HOST and it would make a internal compiler error when calling my target compiler.
[-- Attachment #2: crosstool-NG.sh.in.patch --]
[-- Type: application/octet-stream, Size: 138 bytes --]
1c1
< #!/bin/bash
---
> #!@@CT_bash@@
352,353d351
< CT_HOST_PREFIX="${CT_BUILD_PREFIX}"
< CT_HOST_SUFFIX="${CT_BUILD_SUFFIX}"
[-- Attachment #3: Type: text/plain, Size: 77 bytes --]
Best wishes,
Peica Chen 陈培嘉
other mail: gpeica@gmail.com
[-- Attachment #4: Type: text/plain, Size: 71 bytes --]
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cross build for OS lion
2011-10-06 17:09 cross build for OS lion Peica
@ 2011-10-10 20:48 ` Yann E. MORIN
2011-10-11 2:11 ` Peica
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2011-10-10 20:48 UTC (permalink / raw)
To: crossgcc; +Cc: Peica
Peica, All,
On Thursday 06 October 2011 19:09:15 Peica wrote:
> I have make a patch for crosstool-NG cross building from OS Lion via
> MacPort GCC. If I use the default one, it could stop the building
> because the script set the Xcode gcc as C_HOST and it would make a
> internal compiler error when calling my target compiler.
The patch is almost unreadable. Please provide a unified patch:
diff -u
It also seems the patch is reversed.
Anyway, the patch seems really wrong. Setting the HOST and build prefix to
be the same breaks on canadian-crosses. With a canadian-cross toolchain,
the build machine is where the compiler is _built_, while the host machine
is where the compiler _runs_. And those two machines may be different.
Care to explain what breaks for you? For example, put your entire build.log
file on some website (or a pastebin) where we can get it to analyse the
issue.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cross build for OS lion
2011-10-10 20:48 ` Yann E. MORIN
@ 2011-10-11 2:11 ` Peica
0 siblings, 0 replies; 3+ messages in thread
From: Peica @ 2011-10-11 2:11 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc
Hi Yann E. MORIN and All,
Sorry for the wrong patch.
I need to add these line into scripts/crosstool-NG to avoid the wrong choice for compiler.
If not, the script would call the Xcode gcc by default. and it cause the target compiler
crash at runtime.
case "${CT_TOOLCHAIN_TYPE}" in
cross)
# A cross-compiler runs on the same machine it is built on
CT_HOST="${CT_BUILD}"
CT_HOST_PREFIX="${CT_BUILD_PREFIX}" // i add
CT_HOST_SUFFIX="${CT_BUILD_SUFFIX}" // i add
build_mangle="build_"
host_mangle="build_"
target_mangle=""
install_build_tools_for="BUILD HOST"
;;
canadian)
build_mangle="build_"
host_mangle="host_"
target_mangle=""
install_build_tools_for="BUILD HOST TARGET"
;;
*) CT_Abort "No code for '${CT_TOOLCHAIN_TYPE}' toolchain type!"
;;
esac
Another problem is to build the gdb in static way(script/build/debug/300-gdb.sh). Please refer here if it make sense to you,
if [ "${CT_GDB_CROSS}" = "y" ]; then
local -a cross_extra_config
local gcc_version
CT_DoStep INFO "Installing cross-gdb"
CT_DoLog EXTRA "Configuring cross-gdb"
mkdir -p "${CT_BUILD_DIR}/build-gdb-cross"
cd "${CT_BUILD_DIR}/build-gdb-cross"
cross_extra_config=("${extra_config[@]}")
case "${CT_THREADS}" in
none) cross_extra_config+=("--disable-threads");;
*) cross_extra_config+=("--enable-threads");;
esac
CC_for_gdb=
LD_for_gdb=
if [ "${CT_GDB_CROSS_STATIC}" = "y" ]; then
CC_for_gdb="gcc -static" // should we use "${CT_HOST}-gcc static" to replace here?
LD_for_gdb="ld -static" // should we use "${CT_HOST}-ld -static" to replace here?
fi
在 2011-10-11,上午4:47, Yann E. MORIN 写道:
> Peica, All,
>
> On Thursday 06 October 2011 19:09:15 Peica wrote:
>> I have make a patch for crosstool-NG cross building from OS Lion via
>> MacPort GCC. If I use the default one, it could stop the building
>> because the script set the Xcode gcc as C_HOST and it would make a
>> internal compiler error when calling my target compiler.
>
> The patch is almost unreadable. Please provide a unified patch:
> diff -u
>
> It also seems the patch is reversed.
>
> Anyway, the patch seems really wrong. Setting the HOST and build prefix to
> be the same breaks on canadian-crosses. With a canadian-cross toolchain,
> the build machine is where the compiler is _built_, while the host machine
> is where the compiler _runs_. And those two machines may be different.
>
> Care to explain what breaks for you? For example, put your entire build.log
> file on some website (or a pastebin) where we can get it to analyse the
> issue.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> '------------------------------^-------^------------------^--------------------'
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
>
>
Best wishes,
Peica Chen 陈培嘉
other mail: gpeica@gmail.com
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-11 2:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-06 17:09 cross build for OS lion Peica
2011-10-10 20:48 ` Yann E. MORIN
2011-10-11 2:11 ` Peica
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).