Skip to Content.
Sympa Menu

baslinux - Re: [BL] uclibc static lynx 2.8.6dev16, lynx.lss and mplayer

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] uclibc static lynx 2.8.6dev16, lynx.lss and mplayer
  • Date: Thu, 19 Jan 2006 03:21:33 +0000 (UTC)

On Wed, 18 Jan 2006, David Moberg wrote:

sindi keesan wrote:
On Wed, 18 Jan 2006, David Moberg wrote:

I've uploaded it. By changing CFLAGS to -Os (in the makefiles) I
was able to reduce the size by about 30k after compression.

Please provide the URL.

What is CFLAGS and how does it affect size?

CFLAGS is a special variable that you can change in most
Makefiles. It controls the header include locations (e.g.
-I/usr/include/linux) and optimization flags (e.g. -Os -funroll-loops).

gcc accepts several different 'global' optimization flags:

-O0 no optimization
-O1 minimal optimization
-O2 even more " "
-O3 etc.
-O4 max (in recent gccs)

-Os optimize for size

-O + a number optimizes for speed mainly, but -Os optimizes
maximally for size. AFAIK you want -Os if you try Linux From
Scratch, as it will save many megs of disk space.

I thought larger code ran faster (or loaded faster).
If -Os optimizes for both size and speed, why use -02 as default?
With ordinary libraries (not uClibc) do faster executables get larger?

Apparently, -Os also produces faster code than -O3 or even
-O4 in most circumstances. That's the consensus from a
recent discussion on the Linux kernel mailing list.

Just edit all of the makefiles and change every instance of
-O2 or whatever it is to -Os. Sometimes you can also do
export CFLAGS="-Os" and then configure and make will
automatically use that setting.

Will upx files gzip any smaller?

No. That would be like taking a gzip'ed file and running it
through gzip again. It's already about as small as it can
get.

The one I downloaded got a bit smaller when I gzipped, even after upxing. Maybe 20-30K. Your optimized version probably won't.

I suggest that you cut out the middleman (I) and download the
uClibc rootfs to compile lynx yourself when the next version
arrives.

Will do, since you have demonstrated that it all works - gcc 2.95.3?

uClibc rootfs comes with gcc 3.4, which worked quite well with
lynx, openssl, dosemu, and many other packages that I have
compiled with it.

Is gcc 3.4 compiled dynamically against uClibc?

http://www.uclibc.org/downloads says it has source code

Is what I want root_fs_i386.ext2.bz2 21M?

It says you are supposed to compile it. Did you say they have a compiled version too? INSTALL says to make config and make and make install.
And that I also need to compile binutils and gcc to use with it.

They have in addition to the root-fs files, some tar.bz2 files uClibc-0.9.28.tar.bz2 etc., about 1.7MB. Are these source code and the root_fs precompiled image? I thought source code was generally bigger than the compiled program. I am utterly confused.

They also have linux-libc-headers-2.4.31 files (4MB) and gcc*.tar.bz2 10MB. Headers are not a dynamic executable so I should not need to compile them but is this executable or source code for gcc?


To use the rootfs image, you need a partition with several hundred
MB of disk space to grow into. bunzip2 it, then mount -o loop.
I am thinking about adding a 9GB scsi drive to one computer.
Does this 21MB expand to several 100MB?

Then do cp -a /mnt /newdirectory, where /mnt is where it is mounted,
and newdirectory is where you want to keep it permanently. You
can then umount /mnt and chroot to newdirectory and start building.

If I am in a directory /uClibc does it use uClibc's root_fs libc and binutils and gcc instead of the other ones on my computer? Or do I need to set up a different partition without any other glibc on it?


I think you are overestimating my understanding of linux.
The vocabulary at uclibc.org is strange to me - cross-compiling toolchains, etc.

Most programs should work fine, but you might want to set up some
symlinks such as ln -s /usr/bin/cpp /lib/cpp.

David




Archive powered by MHonArc 2.6.24.

Top of Page