Split patch for Mac OS/ was Re: Help with Building toolchain with crosstool-ng on Mac OS X 10.6.2 (Snow Leopard)

tvb377@gmx.de tvb377@gmx.de
Tue Feb 2 23:24:00 GMT 2010


Hi Yann, all,
> Also, if you would provide mercurial patches, it would be easier to work
> with. See docs/overview.txt, section "Contributing".
Sorry, I'm quite new to mercurial. And I guess the last step in
"Contributing" means it wants to send emails, which I cannot provide 
on this machine here in reasonable time.
Next time I'll use it, promised ;-)

> One patch per new tool, please. Also, be sure to see how it plays with
> the companion tools that were recently added.
OK. Except the expanded list of gnu tools added in configure+Makefile.in,
because all added tools get to use the same mechanism already
employed that makes sure that they actually get called.
--> if it works for sed, it also works for objdump.

> > - make all calls to stat(1) dependent to `uname -s` or replace the call.
> One patch for that.
OK.

> > - replace all calls to readlink(1GNU) with compatible variants.
> "readlink -e" and "readlink" are not equivalent.
No, but
a) ct-ng does not use libs it searches for (here only ncurses) by itself.
b) The variable where is dropped for libs, afaik. It is also
   questionnable if you would actually need the shared object instead of
   the link.
c) I'm not aware of installations where links point to links 
   [that point to links...] that point to shared objects.
   Then the check could in theory fail when removing the -e

> > - uname -o is not portable. use -s when -o fails
> Ditto.
OK

> > - a bug in the sed-expression that sets the nanoseconds to 0 for a
> >   date(1) not handling %N
> So this change seems to imply that on MacOS-X or *BSD, we get:
>   > date +%N
>   N
> Right?
Right.

> And I have the tools for x86_64-linux-gnu-{gcc,ld,...}, but not the ones
> for
> x86_64-unknown-linux-gnu-{gcc,ld,...}. So it is much more reliable to ask
> gcc than to ask config.guess.
> 
> gcc -dumpmachine will tell us the tuple for which it was configured, and
> that means the prefix to use to the actual tools, which is what we need.
Hmm, I see the point. But apparently then there is an inconsistency here
on Darwin, be it in the gcc configuration or the configure (I think it
was of gmp) that failed.
Anyway, my change only is for Darwin + BSD.

> > - the compiler command line options for compiling wrapper.c crashes gcc
> >   on MacOS (and IMHO were a little bit overdone for the complexity of
> >   wrapper.c).
> Separate patch for that.
OK.

> Statically linking should hopefully speed up things. Having a /slow/
> wrapper is not very interesting, is it? Of course, the ratio
> time-in-wrapper / (time-in-wrapper + time-in-actual-tool) should be
> fairly small, except for very trivial programs, where the total time
> will anyway be almost imperceptible...
imho, statically linking will not buy you a measurable amount of time,
especially not when linking only to such mundane things like libc that
are guaranteed to be in core, anyway.

> > - under Darwin, use DYLD_LIBRARY_PATH in wrapper.c
> Separate patch for that as well.
OK. Please note that this patch requires the above cmd line patch.

> > - added printenv to the build.log (I found that helpful).
> Separate patch.
OK.

Hope it fits now for you. Please note that
- all patches (except for build-mpfr and using config.guess)
  are necessary to run crosstool-ng itself.
- all are tested except the one in populate.in

Sorry for the inconvenience that these are not mercurial-sent patches.

Regards
Titus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-mpfr-on-darwin.patch
Type: application/octet-stream
Size: 485 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: corrected-date-sed-expr.patch
Type: application/octet-stream
Size: 355 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dyld-library-path-wrapper.c.patch
Type: application/octet-stream
Size: 966 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu-tools.patch
Type: application/octet-stream
Size: 2474 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nice-to-see-all-envvars.patch
Type: application/octet-stream
Size: 464 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: readlink.patch
Type: application/octet-stream
Size: 1639 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samples.mk-sed.patch
Type: application/octet-stream
Size: 1147 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sed-portable.patch
Type: application/octet-stream
Size: 829 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uname-portable.patch
Type: application/octet-stream
Size: 591 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-configguess-on-bsd.patch
Type: application/octet-stream
Size: 802 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0009.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: whyclearCT_CFLAGS_FOR_HOST.patch
Type: application/octet-stream
Size: 520 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0010.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrapper-compile-commandline.patch
Type: application/octet-stream
Size: 896 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0011.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat-portable.patch
Type: application/octet-stream
Size: 2417 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20100202/51c921ef/attachment-0012.obj>
-------------- next part --------------
--
For unsubscribe information see http://sourceware.org/lists.html#faq


More information about the crossgcc mailing list