public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Dont use wrapper script in case of canadian build
@ 2009-08-02 15:45 Bart vdr. Meulen
  2009-08-02 17:11 ` Yann E. MORIN
  2009-08-02 18:09 ` Yann E. MORIN
  0 siblings, 2 replies; 6+ messages in thread
From: Bart vdr. Meulen @ 2009-08-02 15:45 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Bart vdr. Meulen <bartvdrmeulen@gmail.com>
# Date 1249226323 -7200
# Node ID e02f3efe036e52b3fd5f8405d8c0a96c8bfdc592
# Parent  5820df7ee48aecf7ef7f7bb3a949ed5868e9c24b
Dont use wrapper script in case of canadian build

When making a canadian build, it's unkown whether the target system
supports a bash-like shell. So don't apply the wrapper script for
the binaries.

Signed-off-by Bart vdr. Meulen <bartvdrmeulen@gmail.com>

--

diff -r 5820df7ee48a -r e02f3efe036e scripts/build/internals.sh
--- a/scripts/build/internals.sh	Sun Aug 02 16:45:43 2009 +0200
+++ b/scripts/build/internals.sh	Sun Aug 02 17:18:43 2009 +0200
@@ -41,8 +41,11 @@
 
     # If using the companion libraries, we need a wrapper
     # that will set LD_LIBRARY_PATH approriately
-    if [    "${CT_GMP_MPFR}" = "y"      \
-         -o "${CT_PPL_CLOOG_MPC}" = "y" ]; then
+    # Note, when building a Canadian compiler, we don't
+    # known if a bash-like shell  is available, 
+    # so skip the wrapper in that case
+    if [ \( "${CT_GMP_MPFR}" = "y" -o "${CT_PPL_CLOOG_MPC}" = "y" \) \
+         -a -z "${CT_CANADIAN}" ]; then
         CT_DoLog EXTRA "Installing toolchain wrappers"
         CT_Pushd "${CT_PREFIX_DIR}/bin"
 



--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Dont use wrapper script in case of canadian build
  2009-08-02 15:45 [PATCH] Dont use wrapper script in case of canadian build Bart vdr. Meulen
@ 2009-08-02 17:11 ` Yann E. MORIN
  2009-08-02 18:09 ` Yann E. MORIN
  1 sibling, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2009-08-02 17:11 UTC (permalink / raw)
  To: Bart vdr. Meulen; +Cc: crossgcc

Bart,
All,

On Sunday 02 August 2009 17:38:33 Bart vdr. Meulen wrote:
> Dont use wrapper script in case of canadian build
> 
> When making a canadian build, it's unkown whether the target system
> supports a bash-like shell. So don't apply the wrapper script for
> the binaries.

In this case, how do we force using our companion libraries on such a
system? Would a wrapper writen in C work in this case? (I hope so!)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  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] 6+ messages in thread

* Re: [PATCH] Dont use wrapper script in case of canadian build
  2009-08-02 15:45 [PATCH] Dont use wrapper script in case of canadian build Bart vdr. Meulen
  2009-08-02 17:11 ` Yann E. MORIN
@ 2009-08-02 18:09 ` Yann E. MORIN
  2009-08-02 20:59   ` Thomas Charron
  1 sibling, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2009-08-02 18:09 UTC (permalink / raw)
  To: crossgcc; +Cc: Bart vdr. Meulen

Bart,
All,

On Sunday 02 August 2009 17:38:33 Bart vdr. Meulen wrote:
> When making a canadian build, it's unkown whether the target system
> supports a bash-like shell. So don't apply the wrapper script for
> the binaries.

BTW, the wrapper script use /bin/sh, so it is not dependent on bash,
and is (expected to be) POSIXly correct.

Are you trying to say that there's no /bin/sh in mingw32 ?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  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] 6+ messages in thread

* Re: [PATCH] Dont use wrapper script in case of canadian build
  2009-08-02 18:09 ` Yann E. MORIN
@ 2009-08-02 20:59   ` Thomas Charron
  2009-08-02 21:06     ` Yann E. MORIN
  2009-08-29 22:45     ` Yann E. MORIN
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Charron @ 2009-08-02 20:59 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Bart vdr. Meulen

On Sun, Aug 2, 2009 at 2:09 PM, Yann E.
MORIN<yann.morin.1998@anciens.enib.fr> wrote:
> Bart,
> All,
> On Sunday 02 August 2009 17:38:33 Bart vdr. Meulen wrote:
>> When making a canadian build, it's unkown whether the target system
>> supports a bash-like shell. So don't apply the wrapper script for
>> the binaries.
> BTW, the wrapper script use /bin/sh, so it is not dependent on bash,
> and is (expected to be) POSIXly correct.
> Are you trying to say that there's no /bin/sh in mingw32 ?

  Generally speaking?  No.  You can install it with MSYS, however,
Mingw is not cygwin.

-- 
-- Thomas

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Dont use wrapper script in case of canadian build
  2009-08-02 20:59   ` Thomas Charron
@ 2009-08-02 21:06     ` Yann E. MORIN
  2009-08-29 22:45     ` Yann E. MORIN
  1 sibling, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2009-08-02 21:06 UTC (permalink / raw)
  To: Thomas Charron; +Cc: crossgcc, Bart vdr. Meulen

Thomas, Bart,
All,

On Sunday 02 August 2009 22:59:44 Thomas Charron wrote:
> On Sun, Aug 2, 2009 at 2:09 PM, Yann E.
> MORIN<yann.morin.1998@anciens.enib.fr> wrote:
> > Are you trying to say that there's no /bin/sh in mingw32 ?
> Generally speaking?  No.  You can install it with MSYS, however,
> Mingw is not cygwin.

OK, which means we should write the wrapper in C, and install a binary.
I don't like that. Having a C file just to set LD_LIBRARY_PATH is... weird.
Doing what the wrapper currently does will be awfully more complex in C than
it is in shell.

OTOH, it might be noticeably faster than a shell script. But then the gain
might in fact not be noticeable, when compared to the time the compiler
will take to execute.

OK, it's on the TODO list. Unless someone beats me to it... ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  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] 6+ messages in thread

* Re: [PATCH] Dont use wrapper script in case of canadian build
  2009-08-02 20:59   ` Thomas Charron
  2009-08-02 21:06     ` Yann E. MORIN
@ 2009-08-29 22:45     ` Yann E. MORIN
  1 sibling, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2009-08-29 22:45 UTC (permalink / raw)
  To: crossgcc; +Cc: Thomas Charron, Bart vdr. Meulen

Bart, Thomas,
All,

On Sunday 02 August 2009 22:59:44 Thomas Charron wrote:
> On Sun, Aug 2, 2009 at 2:09 PM, Yann E.
> MORIN<yann.morin.1998@anciens.enib.fr> wrote:
> > On Sunday 02 August 2009 17:38:33 Bart vdr. Meulen wrote:
> >> When making a canadian build, it's unkown whether the target system
> >> supports a bash-like shell. So don't apply the wrapper script for
> >> the binaries.
> > Are you trying to say that there's no /bin/sh in mingw32 ?
>   Generally speaking?  No.  You can install it with MSYS, however,
> Mingw is not cygwin.

OK, I finally had some time to work on this: there now are two versions
of the wrapper:
 - the pre-existing shell script,
 - a new wrapper written in C that gets compiled for the host.

It's still up to the user to select what wrapper he/she wants to use. After
all, if there can be a shell in MingW32, using the shell script would be
good enough.

As I feared, the C version is much more complex than its shell counterpart,
and I don't like that. I've tested it only lightly, and it does work as
expected, but _may_ have some short-comings, notably with multi-byte
characters in file names, which I'm not sure are correctly handled. Also,
error conditions (eg. out of memory) are not all tested for.

If you can have a look, then I'm open to critiscism. And to patches! ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  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] 6+ messages in thread

end of thread, other threads:[~2009-08-29 22:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-02 15:45 [PATCH] Dont use wrapper script in case of canadian build Bart vdr. Meulen
2009-08-02 17:11 ` Yann E. MORIN
2009-08-02 18:09 ` Yann E. MORIN
2009-08-02 20:59   ` Thomas Charron
2009-08-02 21:06     ` Yann E. MORIN
2009-08-29 22:45     ` Yann E. MORIN

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).