tvb377 | 1 Feb 03:25 2010
Picon
Picon

Re: Help with Building toolchain with crosstool-ng on Mac OS X 10.6.2 (Snow Leopard)

> > I recently made a patch for using crosstool-ng on mac and freebsd.
> > I will rework the cosmetics according to Yann's comments this month.
> 
> Titus, I think you are the one that can handle this stuff, as you have a

Uwe, Yann, all

here is the reworked patch for crosstool-ng on FreeBSD and MacOS against a current (31 January 23:00 CET) version.
And two new READMEs (instead of docs/MacOS-X.txt).

Almost all patch parts revolve around GNU/BSD incompatibilities.
I try to explain what I did:
- enlarge the list of configurable tools that ctng uses (for usage of GNU tools).
- also make sure that the configured tools actually get used.
- make all calls to stat(1) dependent to `uname -s` or replace the call.
- replace all calls to readlink(1GNU) with compatible variants.
  This makes the usage of wrapper.c mandatory on MacOS because there is no way known to me emulating readlink
-m without a lengthy shell script.
- uname -o is not portable. use -s when -o fails
- a bug in the sed-expression that sets the nanoseconds to 0 for a date(1) not handling %N

Notable other reasons besides GNU/BSD are:
- have to compile mpfr with --disable-thread-safe on darwin.
- "You did not specify the build system. That's OK, I can guess...":
  Under MacOS 10.6 gcc reports itself as "i686-apple-..."
  However, it's default behaviour is to generate 64bit objects.
  This clashes with some configure scripts that require "x86_64-..." for configuring for a 64bit host.
  Using CT_DoConfigGuess does the job correctly.
  Why not use that in general?
BTW, the above two changes are the only changes actually for BUILDING the toolchain, and not for porting
(Continue reading)

Richard Strand | 1 Feb 14:03 2010

[PATCH 1 of 1] libc/eglibc: Add option to optimize for size

# HG changeset patch
# User Richard Strand <richard.strand <at> icomera.com>
# Date 1265028988 0
# Node ID f1dc942a12c2d84f2b62bc336627f2f540c4bbf7
# Parent  160fc94ed49f0e7697df6427d6a9e772ef94857f
libc/eglibc: Add option to optimize for size

Add an option to eglibc to optimize for size using -Os.

Signed-off-by: Richard Strand <richard.strand <at> icomera.com>

diff -r 160fc94ed49f -r f1dc942a12c2 config/libc/eglibc.in
--- a/config/libc/eglibc.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/config/libc/eglibc.in	Mon Feb 01 12:56:28 2010 +0000
 <at>  <at>  -95,6 +95,13  <at>  <at> 
       Note that crosstool-NG will *not* update your working copy, you will
       have to do that yourself.

+config EGLIBC_OPT_SIZE
+    bool
+    prompt "optimize eglibc for size (-Os)"
+    help
+      Optimize eglibc for size using -Os instead of -O2. This will make eglibc
+      smaller but may make it slower.
+
 config EGLIBC_CUSTOM_CONFIG
     bool
     prompt "Use custom configuration file"
diff -r 160fc94ed49f -r f1dc942a12c2 scripts/build/libc/eglibc.sh
--- a/scripts/build/libc/eglibc.sh	Sun Jan 31 23:04:35 2010 +0100
(Continue reading)

Richard Strand | 1 Feb 14:03 2010

[PATCH 0 of 1] Add optimize for size (-Os) option to eglibc

Hi Yann, All,

This patch adds an option for eglibc to enable you to optimize it for
size (-Os) instead of speed (-O2).

This was a specific deisgn goal for eglibc and doesn't work with glibc.
http://www.eglibc.org/features

Regards,

Richard Strand

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

Thomas Petazzoni | 1 Feb 23:18 2010

[crosstool-ng] Issue with ltrace

Hello,

I just downloaded crosstool-ng 1.6.0 and tried to build the
arm-unknown-linux-uclibcgnueabi sample. The build fails with:

[EXTRA]    Building ltrace
[ERROR]    events.c:95: error: 'PTRACE_EVENT_FORK' undeclared (first use in this function)
[ERROR]    events.c:95: error: (Each undeclared identifier is reported only once
[ERROR]    events.c:95: error: for each function it appears in.)
[ERROR]    events.c:95: error: 'PTRACE_EVENT_VFORK' undeclared (first use in this function)
[ERROR]    events.c:95: error: 'PTRACE_EVENT_CLONE' undeclared (first use in this function)
[ERROR]    events.c:97: error: 'PTRACE_GETEVENTMSG' undeclared (first use in this function)
[ERROR]    events.c:103: error: 'PTRACE_EVENT_EXEC' undeclared (first use in this function)
[ERROR]    make[2]: *** [events.o] Error 1
[ERROR]    make[1]: *** [sysdeps/sysdep.o] Error 2
[ERROR]    Build failed in step 'Installing ltrace'

The sample selects ltrace 0.5.2, while a newer version, 0.5.3 is
available. This newer version seems to have a fix for this issue, in
the form of a patch already included in crosstool-ng:

 patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch

So this fix should be included for ltrace 0.5.2 as well. But why aren't
these defines available in the C library ?

Cheers,

Thomas
--

-- 
(Continue reading)

Khem Raj | 1 Feb 23:26 2010
Picon

Re: [crosstool-ng] Issue with ltrace

On Mon, Feb 1, 2010 at 2:18 PM, Thomas Petazzoni
<thomas.petazzoni <at> free-electrons.com> wrote:
> Hello,
>
> I just downloaded crosstool-ng 1.6.0 and tried to build the
> arm-unknown-linux-uclibcgnueabi sample. The build fails with:
>
> [EXTRA]    Building ltrace
> [ERROR]    events.c:95: error: 'PTRACE_EVENT_FORK' undeclared (first use in this function)
> [ERROR]    events.c:95: error: (Each undeclared identifier is reported only once
> [ERROR]    events.c:95: error: for each function it appears in.)
> [ERROR]    events.c:95: error: 'PTRACE_EVENT_VFORK' undeclared (first use in this function)
> [ERROR]    events.c:95: error: 'PTRACE_EVENT_CLONE' undeclared (first use in this function)
> [ERROR]    events.c:97: error: 'PTRACE_GETEVENTMSG' undeclared (first use in this function)
> [ERROR]    events.c:103: error: 'PTRACE_EVENT_EXEC' undeclared (first use in this function)
> [ERROR]    make[2]: *** [events.o] Error 1
> [ERROR]    make[1]: *** [sysdeps/sysdep.o] Error 2
> [ERROR]    Build failed in step 'Installing ltrace'
>
> The sample selects ltrace 0.5.2, while a newer version, 0.5.3 is
> available. This newer version seems to have a fix for this issue, in
> the form of a patch already included in crosstool-ng:
>
>  patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch
>
> So this fix should be included for ltrace 0.5.2 as well. But why aren't
> these defines available in the C library ?

you must be using old version of GNU C library or uclibc.

(Continue reading)

Yann E. MORIN | 1 Feb 23:42 2010
Picon

Re: [crosstool-ng] Issue with ltrace

Thomas, All,

On Monday 01 February 2010 23:18:33 Thomas Petazzoni wrote:
> I just downloaded crosstool-ng 1.6.0 and tried to build the
> arm-unknown-linux-uclibcgnueabi sample. The build fails with:
> [EXTRA]    Building ltrace
> [ERROR]    events.c:95: error: 'PTRACE_EVENT_FORK' undeclared (first use in this function)
> [ERROR]    events.c:95: error: (Each undeclared identifier is reported only once
> [ERROR]    events.c:95: error: for each function it appears in.)
> [ERROR]    events.c:95: error: 'PTRACE_EVENT_VFORK' undeclared (first use in this function)
> [ERROR]    events.c:95: error: 'PTRACE_EVENT_CLONE' undeclared (first use in this function)
> [ERROR]    events.c:97: error: 'PTRACE_GETEVENTMSG' undeclared (first use in this function)
> [ERROR]    events.c:103: error: 'PTRACE_EVENT_EXEC' undeclared (first use in this function)
> [ERROR]    make[2]: *** [events.o] Error 1
> [ERROR]    make[1]: *** [sysdeps/sysdep.o] Error 2
> [ERROR]    Build failed in step 'Installing ltrace'

It just occured to me that I forgot to 'saveconfig' some of the samples
(many of them, actually), after I re-built them... Sigh... That's what
I deserve for rolling out a release at midnight... :-(

> The sample selects ltrace 0.5.2, while a newer version, 0.5.3 is
> available. This newer version seems to have a fix for this issue, in
> the form of a patch already included in crosstool-ng:
>  patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch

Go ahead with ltrace-0.5.3, it should buid (built just OK here).

Regards,
Yann E. MORIN.
(Continue reading)

Yann E. MORIN | 2 Feb 19:16 2010
Picon

Re: Help with Building toolchain with crosstool-ng on Mac OS X 10.6.2 (Snow Leopard)

Titus, All,

On Monday 01 February 2010 03:25:56 tvb377 <at> gmx.de wrote:
> here is the reworked patch for crosstool-ng on FreeBSD and MacOS

This patch is still very large, and contains unrelated changes.
It is thus hard to see the implications of each change.

Please, split the patch into self-contained patches that each add a
single change, as I suggested ealier. For example:
- the sed->$(sed) change in samples.mk on its own
- the configure+Makefile.in changes into their own (one for libtool, one
  for objcopy, ...)
- one for Darwin/*BSD vs. GNU
- and so on...

Having each change in a separate patch will help with review. Small patches
(few-liners) will most probably pass in a blink of an eye. When they get
applied, they will each yield a new changeset in the tree, and that would
be easier to revert the one(s) that is(are) faulty without having to revert
the whole stuff.

Also, if you would provide mercurial patches, it would be easier to work
with. See docs/overview.txt, section "Contributing".

> And two new READMEs (instead of docs/MacOS-X.txt).

Good. :-)

> Almost all patch parts revolve around GNU/BSD incompatibilities.
(Continue reading)

Uwe Papengut | 2 Feb 16:18 2010
Picon

Building toolchain with crosstool-ng on Mac OS X 10.6.2 (SL) - libtool error

Hi Titus, Yann and all,

I wrote a short script for MacOS SL and crosstool-ng-1.6.0. I got an error with libtool, because the
crosstool-ng/configure wrote:

  Checking for 'libtool'... no
  libtool 1.5.26 or above was not found

I used the newest version of libtool 2.2.6b_0. Script and log-file see attachment.

Can anyone please help me?

Attachment (MacOS_SL): application/octet-stream, 851 bytes
Attachment (MacOS_SL.log): application/octet-stream, 2795 bytes

Best Regards,
Uwe

Am 01.02.2010 um 03:25 schrieb tvb377 <at> gmx.de:

>>> I recently made a patch for using crosstool-ng on mac and freebsd.
>>> I will rework the cosmetics according to Yann's comments this month.
>> 
>> Titus, I think you are the one that can handle this stuff, as you have a
> 
> Uwe, Yann, all
> 
> here is the reworked patch for crosstool-ng on FreeBSD and MacOS against a current (31 January 23:00 CET) version.
(Continue reading)

Yann E. MORIN | 2 Feb 19:38 2010
Picon

Re: [PATCH 1 of 1] libc/eglibc: Add option to optimize for size

Richard, All,

On Monday 01 February 2010 14:03:34 Richard Strand wrote:
> libc/eglibc: Add option to optimize for size

Applied as f1dc942a12c2. Thank you!

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

Thomas Petazzoni | 2 Feb 20:28 2010

Re: [crosstool-ng] Issue with ltrace

On Mon, 1 Feb 2010 14:26:11 -0800
Khem Raj <raj.khem <at> gmail.com> wrote:

> you must be using old version of GNU C library or uclibc.

Happens on an Ubuntu 9.10 host, fully up-to-date. It uses glibc 2.10,
so not that old.

Sincerely,

Thomas
--

-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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


Gmane