Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: uclibc toolchains, buildroot rootfs tarballs< Next Oldest | Next Newest >
stupid_idiot Offline





Group: Members
Posts: 344
Joined: Oct. 2006
Posted: Sep. 07 2007,20:41 QUOTE

Last updated: 12 Sep 2007
uClibc is a small, glibc-compatible C library.
Buildroot is used to build toolchains and root filesystems with uClibc.
This is for people using older PCs who want to compile software under uclibc.
Code Sample
I'm revising everything. Actually, I'm trying to keep things as small as possible so I can post it on one of the one-click hosts instead of leaving my machine on all the time for a torrent. This will take a while. Sorry for the inconvenience!
Back to top
Profile PM 
stupid_idiot Offline





Group: Members
Posts: 344
Joined: Oct. 2006
Posted: Sep. 07 2007,20:52 QUOTE

Notes:
(1)
Code Sample
buildroot's 'make menuconfig' allows you to set compiler optimizations; for example, the default is '-Os -pipe'. This is saved in the variable $BR2_TARGET_OPTIMIZATION. This is then passed on to 'configure' as part of the $CC variable (in the form of 'gcc -Os -pipe')  when configuring packages. BR2_TARGET_OPTIMIZATION is supposed to replace CFLAGS/CXXFLAGS. When you run 'make', a script checks if CFLAGS/CXXFLAGS are clean. If not, the build is stopped and you are told to 'unset' the variable(s). This is probably to prevent you from running 'make' while unaware that CFLAGS is set to a bad value.
The problem is, most 'configure' scripts also check for CFLAGS; if $CFLAGS is empty, the default (usually '-g -O2') is used. Since 'configure' always puts $CFLAGS after $CC, you get this: 'gcc -Os -pipe -g -O2'.
In short, $BR2_TARGET_OPTIMIZATION always gets overridden by the default $CFLAGS stored in 'configure'.
To solve the problem:
1. In the main buildroot directory, edit 'Makefile' and add these 3 lines:
CFLAGS:=-Os
CXXFLAGS:=-Os
export CFLAGS CXXFLAGS
This sets CFLAGS and CXXFLAGS to '-Os' when you run 'make'.
2. cd 'toolchain/dependencies/' and edit 'dependencies.sh'. Delete these 2 sections:
if test -n "$CFLAGS"; then
echo "CFLAGS clean: FALSE"
/bin/echo -e "\n\nYou must run 'unset CFLAGS' so buildroot can run with";
/bin/echo -e "a clean environment on your build machine\n";
exit 1;
fi;
echo "CFLAGS clean: Ok"
if test -n "$CXXFLAGS"; then
echo "CXXFLAGS clean: FALSE"
/bin/echo -e "\n\nYou must run 'unset CXXFLAGS' so buildroot can run with";
/bin/echo -e "a clean environment on your build machine\n";
exit 1;
fi;
echo "CXXFLAGS clean: Ok"
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Sep. 08 2007,11:45 QUOTE

So you're back at it?

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
stupid_idiot Offline





Group: Members
Posts: 344
Joined: Oct. 2006
Posted: Sep. 08 2007,12:36 QUOTE

No, I don't have the time to work on anything big; just thought this might be useful for compiling under uclibc on older hardware. I do want to try adding in xlibs and Xorg as well.
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Sep. 23 2007,07:57 QUOTE

Just want to warn ya.

Seems the current uClibc, 0.9.29, is broken. They broke some things, that in turn broke others, and even with all the patches they've made for those, even their own buildroot cannot compile everything it lists.

Even gcc 4.2 has trouble, though the gcc devs included extra much uclibc support in that ver.
The last uclibc that worked for the HLFS guys was 0.9.28.3 with gcc 3.3.6, after the uclibc update lots has gone wrong. Stuff doesn't compile. Weird seg faults. Static linking not functional.

So, for reasons I think are justifiable, I am gonna wait for the next uclibc before I do anything. It just doesn't seem worth all the trouble right now.


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
5 replies since Sep. 07 2007,20:41 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: uclibc toolchains

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code