> You may also consider reading the following document if you're
> interested in more detail.  Probably take you a while though. :)
>
> http://www.skyfree.org/linux/references/ELF_Format.pdf

I shall.

> Thanks for the info; I'll keep this in mind for future builds.  It's
> certainly easier to use the '-s' flag than selectively stripping
> later and might shave some time off the builds on slower systems.

Then the following info will help you too.

1. Remember to use -s in LDFLAGS as well as CFLAGS and CXXFLAGS.

2. Some packages don't use *FLAGS set in the environment. For example, 
to compile bzip2 with custom CFLAGS and LDFLAGS one should use the 
following make command:
# make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
GCC must be compiled with something like
# make CFLAGS="$CFLAGS" BOOT_CFLAGS="$CFLAGS" LIBCFLAGS=...
Some other packages use more complicated ways of setting custom FLAGS.

3. You still have to remove debug symbols from .a files by hand, for 
example:
# find /lib -name '*.a' -exec strip --strip-debug {} \;

4. I'm not sure, but... some packages at the end of the chapter 6 seem 
to not use LDFLAGS from the environment while using CFLAGS and 
CXXFLAGS. The result binaries must be also stripped.

But don't worry about the cases (except the first one) because the most 
packages process all FLAGS as it's expected and you'll get a stripped 
system without stripping :)

--
Nothing but perfection
pv
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to