This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Attachment: build-mpfr-on-darwin.patch
Description: Binary data

Attachment: corrected-date-sed-expr.patch
Description: Binary data

Attachment: dyld-library-path-wrapper.c.patch
Description: Binary data

Attachment: gnu-tools.patch
Description: Binary data

Attachment: nice-to-see-all-envvars.patch
Description: Binary data

Attachment: readlink.patch
Description: Binary data

Attachment: samples.mk-sed.patch
Description: Binary data

Attachment: sed-portable.patch
Description: Binary data

Attachment: uname-portable.patch
Description: Binary data

Attachment: use-configguess-on-bsd.patch
Description: Binary data

Attachment: whyclearCT_CFLAGS_FOR_HOST.patch
Description: Binary data

Attachment: wrapper-compile-commandline.patch
Description: Binary data

Attachment: stat-portable.patch
Description: Binary data

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]