From: Wolfgang Denk <wd@denx.de>
To: "DI BACCO ANTONIO - technolabs" <Antonio.DiBacco@technolabs.it>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Avoid using libm in rootfs
Date: Thu, 29 Mar 2007 21:29:32 +0200 [thread overview]
Message-ID: <20070329192932.98FBD353A6C@atlas.denx.de> (raw)
In-Reply-To: Your message of "Thu, 29 Mar 2007 12:39:11 +0200." <F1F6EC0C8B75034F9E3A79FC85122E8E71CD4A@aquib01a>
In message <F1F6EC0C8B75034F9E3A79FC85122E8E71CD4A@aquib01a> you wrote:
>
> Is it possible to avoid using libm in my roofs? Why a simple application
Yes, this is possible.
> always need it? Is it needed by libc or libstdc++?
Simple applications don't need no libm. Neither libc nor libstdc++
per se require libm.
It is your code and the library functions you call which causes such
dependencies. Note that you have to be aware that even innocent
looking calls like a
printf ("Hello World\n");
may be the culprits
Example:
-> cat foo.c
#include <unistd.h>
int main (void)
{
(void)write (1, "Hello World\n", 12);
return 0;
}
-> export CROSS_COMPILE=ppc_6xx-
-> ppc_6xx-gcc -Wall -pedantic -o foo foo.c
-> ppc_6xx-ldd foo
libc.so.6 => /opt/eldk/ppc_6xx/lib/libc.so.6
ld.so.1 => /opt/eldk/ppc_6xx/lib/ld.so.1
You see: no libm needed.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Too much of anything, even love, isn't necessarily a good thing.
-- Kirk, "The Trouble with Tribbles", stardate 4525.6
next prev parent reply other threads:[~2007-03-29 19:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-29 10:39 Avoid using libm in rootfs DI BACCO ANTONIO - technolabs
2007-03-29 19:29 ` Wolfgang Denk [this message]
2007-03-29 20:45 ` Thomas Maenner
2007-03-29 21:27 ` Wolfgang Denk
2007-03-30 5:59 ` Thomas Maenner
2007-03-31 3:51 ` PPC login puzzle Charles Krinke
2007-03-31 3:53 ` Bill Gatliff
2007-03-31 4:02 ` Charles Krinke
2007-03-31 16:20 ` Steve Iribarne (GMail)
2007-03-31 17:06 ` Charles Krinke
2007-03-31 17:32 ` Bill Gatliff
2007-04-01 18:00 ` Steve Iribarne (GMail)
2007-04-01 22:31 ` Eric Nuckols
2007-03-31 23:04 ` Wolfgang Denk
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=20070329192932.98FBD353A6C@atlas.denx.de \
--to=wd@denx.de \
--cc=Antonio.DiBacco@technolabs.it \
--cc=linuxppc-embedded@ozlabs.org \
/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 NNTP newsgroup(s).