Any idea on how to get libstdc++ (needed by mysql and many others unslung optware) support in the actual toolchain ?
Incentive for someone to contribute the MySQL support?Originally Posted by Jethro
-- Rod
Any idea on how to get libstdc++ (needed by mysql and many others unslung optware) support in the actual toolchain ?
The idea is to recompile everything with latest uclibc.
It's possible, but requires some time, which I do not have at the moment.
You have my blessing. I'll be patiently awaiting this version.Originally Posted by Oleg
Could you give some hints to achieve this ?Originally Posted by Oleg
I build a fresh toolchain using uclibc buildroot but it doesn't let me choose kernel 2.4.20. The minimum that be be used is 2.4.25... As for gcc / binutils, oldest ones I can use are 3.3.5 / 2.14.90.0.8. The final toolchain doesn't build the firmware, as expected
Questions are :
1) Since Asus tarball uses a modified 2.4.20 kernel, I think I can't use an other one for my toolchain, correct ? other idea : are kernel sources involved in toolchain setup ?
2) Is there a particular gcc / binutils version that should be used to create the toolchain ?
3) Is my way the good way (i.e rebuild a full toolchain from scratch) or should I only try to build a uclibc toolchain using uclibc 0.9.28 ?
Thank ou for your help,
JF
Kernel version only make sense for include files, so you could safely use 2.4.25. My original idea was to use gcc and binutils which are supplied by broadcom and compile toolchain with uclibc 0.9.27.Originally Posted by Jean-Fabrice
Actual kernel headers are not used, so use 2.4.25.1) Since Asus tarball uses a modified 2.4.20 kernel, I think I can't use an other one for my toolchain, correct ? other idea : are kernel sources involved in toolchain setup ?
Perhaps the same as supplied by broadcom in the source dir.2) Is there a particular gcc / binutils version that should be used to create the toolchain ?
You mean 0.9.27? Anyway, the only way with latest uclibcs is to rebuild toolchain from scratch. Once you will do this, post here - I will then adjust firmware.3) Is my way the good way (i.e rebuild a full toolchain from scratch) or should I only try to build a uclibc toolchain using uclibc 0.9.28 ?
okay, here is what I did since my last post
My goal is to build a completely new uclibc toolchain based on uclibc 0.9.27, binutils 2.6.12, gcc 3.2.3 and kernel 2.4.25.
I'm using uclibc buildroot to build the new toolchain. Since latest snapshot of buildroot doesn't let me choose binutils 2.6.12 and gcc 3.2.3, I applied some patches to it to be able to do so.
My latest tests gave me the following results :
1. binutils build fine
2. first pass of gcc ( --disable-shared ) builds fine
3a. uclibc does'nt build if I let the option 'Support global constructors and destructors' defaultly selected (UCLIBC_CTOR_DTOR=y). The build of uclibc terminates with 'crtbeginS.o : no such file or directory'. It seems that crtbeginS.o is not generated by the previous gcc build stage. Dunno why ! but since crtbeginS.o is not present in the broadcom toolchain, I thought I was walking the wrong way.
3b. uclibc builds if I don't select the UCLIBC_CTOR_DTOR option
==> At this point, in order to continue, I decided to use 3b.
4. second pass of gcc (with --enable-shared) fails with some errors on decl.c ("decl.c:561: invalid lvalue in assignment")
5. no more I can't continue
Any idea how I could solve 4 or maybe 3a ?
Attached are my buildroot patch and .config, uclibc's .config is the default generated one.
JF
okay, 4. solved thanks to http://66.102.9.104/search?q=cache:r...signment&hl=frOriginally Posted by Jean-Fabrice
now gcc build ends with
any idea ?Code:/home/buildroot/build_mipsel/staging_dir/mipsel-linux-uclibc/bin/ld: libgcc/./_muldi3.o: compiled for a little endian system and target is big endian File in wrong format: failed to merge target specific data of file libgcc/./_muldi3.o
Problem solved again using 'mips' as ARCH (not MIPSEL) at the buildroot 'make menuconfig' stage. (This should be a problem since MIPS is big endian while MIPSEL is a shorcut for MIPS Little Endian)
So compilation restarts... and now fails with :
As usual, no crtbeginS.o in my toolchain's dirs.Code:/home/buildroot/toolchain_build_mips/gcc-3.2.3-final/gcc/xgcc -B/home/buildroot/toolchain_build_mips/gcc-3.2.3-final/gcc/ -B/home/buildroot/build_mips/staging_dir/mips-linux-uclibc/bin/ -B/home/buildroot/build_mips/staging_dir/mips-linux-uclibc/lib/ -isystem /home/buildroot/build_mips/staging_dir/mips-linux-uclibc/include -O2 -DIN_GCC -DCROSS_COMPILE -DUSE_UCLIBC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o libgcc_s.so.1 libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_exit.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_pack_sf.o libgcc/./_unpack_sf.o libgcc/./_addsub_sf.o libgcc/./_mul_sf.o libgcc/./_div_sf.o libgcc/./_fpcmp_parts_sf.o libgcc/./_compare_sf.o libgcc/./_eq_sf.o libgcc/./_ne_sf.o libgcc/./_gt_sf.o libgcc/./_ge_sf.o libgcc/./_lt_sf.o libgcc/./_le_sf.o libgcc/./_unord_sf.o libgcc/./_si_to_sf.o libgcc/./_sf_to_si.o libgcc/./_negate_sf.o libgcc/./_make_sf.o libgcc/./_sf_to_df.o libgcc/./_thenan_sf.o libgcc/./_sf_to_usi.o libgcc/./_usi_to_sf.o libgcc/./_pack_df.o libgcc/./_unpack_df.o libgcc/./_addsub_df.o libgcc/./_mul_df.o libgcc/./_div_df.o libgcc/./_fpcmp_parts_df.o libgcc/./_compare_df.o libgcc/./_eq_df.o libgcc/./_ne_df.o libgcc/./_gt_df.o libgcc/./_ge_df.o libgcc/./_lt_df.o libgcc/./_le_df.o libgcc/./_unord_df.o libgcc/./_si_to_df.o libgcc/./_df_to_si.o libgcc/./_negate_df.o libgcc/./_make_df.o libgcc/./_df_to_sf.o libgcc/./_thenan_df.o libgcc/./_df_to_usi.o libgcc/./_usi_to_df.o libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde.o libgcc/./unwind-sjlj.o -lc && rm -f libgcc_s.so && ln -s libgcc_s.so.1 libgcc_s.so /home/buildroot/build_mips/staging_dir/mips-linux-uclibc/bin/ld: cannot open crtbeginS.o: No such file or directory
I wasn't able to get rid of the crtbeginS.o problem
So I start a new way :
I rebuild a full libc toolchain using gcc 3.2.3, binutils 2.13.2.1 and glibc 2.2.5.
This seems to be ok after some hard work and many hours...
Now, how can I build mipsel-uclibc-gcc since compiling latest uclibc doesn't create it ? uclibc building only produce libs.
JF
JF, no way. You've to use uclibc instead of glibc...Originally Posted by Jean-Fabrice
BTW, have you checked openwrt buildroot for correct uclibc config? We should use the same. As for gcc/binutils - well, we would probably switch to gcc-3.3.x then...
P.S. Sorry for delay, I've missed this post somehow.
I was trying a glibc toolchain since broadcom uclibc toolchain seems to make use of the glibc one they provide (mipsel-uclibc-gcc is very small. is it a wrapper for mipsel-linux-gcc which links against uclibc ?)
I'll give a look at openwrt uclibc and check their config file.
I'm now making a last try with gcc 3.2.3 & uclibc snapshot and switch to gcc 3.3 if no success.
JF
Yes, this is a wrapper. Actually, uclibc switched from wrappers to real toolchain at some point.Originally Posted by Jean-Fabrice
P.S. uclibc 0.9.28 released a few days ago.