From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: Remy Bohmer <linux@bohmer.net>
Cc: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>, crossgcc@sourceware.org
Subject: Re: [CT-NG:patch 02/19] Symlink to cc not always installed correctly
Date: Sun, 11 Apr 2010 13:26:00 -0000 [thread overview]
Message-ID: <201004111525.59331.yann.morin.1998@anciens.enib.fr> (raw)
In-Reply-To: <4bbf80f5.0d67f10a.7841.5f08@mx.google.com>
Remy, Bart, All,
On Friday 09 April 2010 21:04:21 Remy Bohmer wrote:
> When building an cross-compiler for a host which depends
> on file extensions the symlink for cc was not installed correctly
Yes, this is needed. But a typo and a few style fixes...
> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
> scripts/build/cc/gcc.sh | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> Index: crosstool-ng/scripts/build/cc/gcc.sh
> ===================================================================
> --- crosstool-ng.orig/scripts/build/cc/gcc.sh
> +++ crosstool-ng/scripts/build/cc/gcc.sh
> @@ -246,7 +246,14 @@ do_cc_core() {
>
> # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
> # to call the C compiler with the same, somewhat canonical name.
> - CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${core_prefix_dir}/bin/${CT_TARGET}"-cc
> + # check whether compiler as an extension
as --> has
> + file=$(ls -1 ${core_prefix_dir}/bin/${CT_TARGET}-gcc.* 2>/dev/null || echo "")
- Properly quote the filename you're listing.
- echo "" --> true
> + if [ "x${file}" = "x" ]; then
the 'x' stuff is ugly. In this case: [ -z "${file}" ]
> + CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${core_prefix_dir}/bin/${CT_TARGET}"-cc
> + else
> + ext=${file##*.}
> + CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc.${ext}" "${core_prefix_dir}/bin/${CT_TARGET}-cc.${ext}"
> + fi
>
> CT_EndStep
> }
> @@ -362,7 +369,14 @@ do_cc() {
>
> # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
> # to call the C compiler with the same, somewhat canonical name.
> - CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-cc
> + # check whether compiler as an extension
> + file=$(ls -1 ${CT_TARGET}/bin/${CT_TARGET}-gcc.* 2>/dev/null || echo "")
> + if [ "x${file}" = "x" ]; then
> + CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-cc
> + else
> + ext=${file##*.}
> + CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc.${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc.${ext}"
> + fi
3x Ditto.
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
next prev parent reply other threads:[~2010-04-11 13:26 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100409190419.325379428@bohmer.net>
2010-04-09 19:33 ` [CT-NG:patch 04/19] Update check for need of g++ Remy Bohmer
2010-04-11 13:43 ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 02/19] Symlink to cc not always installed correctly Remy Bohmer
2010-04-11 13:26 ` Yann E. MORIN [this message]
2010-04-09 19:33 ` [CT-NG:patch 07/19] Adapt CTPatch function to handle dash in package name Remy Bohmer
2010-04-11 14:06 ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 16/19] Fix PPL build for MINGW Remy Bohmer
2010-04-09 19:33 ` [CT-NG:patch 01/19] Add option to not install the wrapper scripts Remy Bohmer
2010-04-09 22:25 ` Arnaud Lacombe
2010-04-11 13:20 ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 12/19] Add mingw target libraries Remy Bohmer
2010-04-11 15:45 ` Yann E. MORIN
2010-04-11 16:10 ` Arnaud Lacombe
2010-04-09 19:33 ` [CT-NG:patch 11/19] Add mingw as kernel type Remy Bohmer
2010-04-11 15:25 ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 05/19] Force autoreconf for mpfr Remy Bohmer
2010-04-11 13:56 ` Yann E. MORIN
2010-04-12 22:24 ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 09/19] Allow choice for elf format when building bare metal cross compiler Remy Bohmer
2010-04-11 14:47 ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState to check for existence Remy Bohmer
2010-04-11 13:59 ` Yann E. MORIN
2010-04-12 12:28 ` Bart van der Meulen
2010-04-12 15:12 ` Arnaud Lacombe
2010-04-12 20:43 ` Yann E. MORIN
2010-04-12 20:42 ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 03/19] Build candian baremetal compiler Remy Bohmer
2010-04-11 13:40 ` Yann E. MORIN
[not found] ` <i2l87271a2c1004120533g10be9d4ge8c5d8bdb69742f8@mail.gmail.com>
2010-04-12 12:35 ` Bart van der Meulen
2010-04-09 19:33 ` [CT-NG:patch 10/19] Add ARCH_CPU for m68k architecture Remy Bohmer
2010-04-11 15:03 ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 13/19] Add Linux - Mingw32 sample Remy Bohmer
2010-04-09 19:34 ` [CT-NG:patch 18/19] Fix wrong host compiler usage on canadian build with baremetal target Remy Bohmer
2010-04-09 19:34 ` [CT-NG:patch 17/19] Fix linking of PPL (it does not link with stdc++ automaticly) Remy Bohmer
2010-04-09 19:34 ` [CT-NG:patch 19/19] The m68k processor does not like unaligned access in memcpy Remy Bohmer
2010-04-12 20:56 ` Yann E. MORIN
2010-04-09 19:34 ` [CT-NG:patch 08/19] Prevent trailing - in CT_TARGET Remy Bohmer
2010-04-11 14:11 ` Yann E. MORIN
2010-04-09 19:34 ` [CT-NG:patch 14/19] add bugurl and compiler version to core gcc compiler Remy Bohmer
2010-04-11 15:50 ` Yann E. MORIN
2010-04-09 19:34 ` [CT-NG:patch 15/19] First setup for cygwin as target Remy Bohmer
2010-04-11 20:30 ` Yann E. MORIN
2010-04-12 12:44 ` Bart van der Meulen
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=201004111525.59331.yann.morin.1998@anciens.enib.fr \
--to=yann.morin.1998@anciens.enib.fr \
--cc=bartvdrmeulen@gmail.com \
--cc=crossgcc@sourceware.org \
--cc=linux@bohmer.net \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).