OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: telemetric_au on June 05, 2007, 08:02:28 pm
-
hi all,
-ive been trying to build gcc 2.95.3 with g++ natively on my collie/beta1 for an app which requires the same binary versions to compile its modules as was used to compile/make the kernel ...
-i compiled the kernel using xsdk which has arm-linux-gcc 2.95.3, such the desire for matching native bin's
- then natively with the 3.4.5 gcc i can compile gcc by itself, but as soon as i unpack the g++ code and try to compile them both, i run into errors relating to the "libiberty" section near the end where it appears to test compile itself and runs into floating point errors the likes of:
crtbegin.o uses hard floating point, whereas conftest uses soft floating point
-i also then tried installing the sucessfully built 2.95.3 gcc (only) to use to buld gcc again but with g++ code , but same errors...
ive also got sources for binutils, newlib and glibc and have compiled them before and am happy doing them again
-
hi all,
-ive been trying to build gcc 2.95.3 with g++ natively on my collie/beta1 for an app which requires the same binary versions to compile its modules as was used to compile/make the kernel ...
-i compiled the kernel using xsdk which has arm-linux-gcc 2.95.3, such the desire for matching native bin's
- then natively with the 3.4.5 gcc i can compile gcc by itself, but as soon as i unpack the g++ code and try to compile them both, i run into errors relating to the "libiberty" section near the end where it appears to test compile itself and runs into floating point errors the likes of:
crtbegin.o uses hard floating point, whereas conftest uses soft floating point
-i also then tried installing the sucessfully built 2.95.3 gcc (only) to use to buld gcc again but with g++ code , but same errors...
ive also got sources for binutils, newlib and glibc and have compiled them before and am happy doing them again
[div align=\"right\"][a href=\"index.php?act=findpost&pid=162656\"][{POST_SNAPBACK}][/a][/div]
since pdaXrom uses softfloat (vfp), its gcc toolchain (zgcc) is also vfp based. you are trying to build a 2.95 toolchain which is fpa and this cannot be mixed.
what you need to do is build the fpa 2.95 toolchain following the steps from linuxfromscratch project which builds an isolated toolchain that does not depend on the native libraries...
good luck. i was wanting to build one myself as well so i can compile kernel modules on my Z, but never had time to do it...
-
thankyou so much...my hero !! (well somehting like that...)
i actually have that link open allready in my browser (opera) as read about it in this thread, but wasnt sure it was the way to go yet...
https://www.oesf.org/forums/index.php?showt...3401&hl=softvfp (https://www.oesf.org/forums/index.php?showtopic=23401&hl=softvfp)
on my way...
-
what is " fpa 2.95 toolchain " please explain ...
-
what is " fpa 2.95 toolchain " please explain ...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=162666\"][{POST_SNAPBACK}][/a][/div]
the pdaXrom 3.4.x gcc toolchain uses soft-vfp
the 2.95 toolchain you want to build needs to be build with fpa - a floating point implementation also known as hard float
since you cannot mix and match floating point implementations in the current pdaXrom implementation, you need to isolate your 2.95 toolchain so it does not use any of the libraries build with the 3.4.x toolchain (which is basically everything) so you need to build the libraries used by gcc 2.95 using gcc 2.95... linuxfromscratch explains how to do this
-
ok, thanks again. ive just begun, and am getting the environment ready.
i just wasnt sure if you meant i had to compile the chain with some "other than default" (and possibly not mentioned in guide) option, to enable desired floating point built chain...
thanks again, and back to the rabbit hole
-
since pdaXrom uses softfloat (vfp), its gcc toolchain (zgcc) is also vfp based. you are trying to build a 2.95 toolchain which is fpa and this cannot be mixed.
what you need to do is build the fpa 2.95 toolchain following the steps from linuxfromscratch project
you recommend fpa for "my" 2.95 toolchain, does this correlate to either:
-msoft-float -> softfloat, FPA format?
or
-mhard-float -> hardfloat, FPA format ?
(i left out the "softfloat, VFP format" variant, as i assume thats the current 3.4.5 toolchain)
-
as this thread is getting top #1 page ranking in google from simple search terms i thought i might throw in some brief notes on where im at and what ive "learnt":
- gcc 2.95.3 doesn't support softfloat, such that a vfp version cant be made,
- gcc 2.95.3 is necessary to build modules with the 2.4.x kernel
- you cant mix toolchain 'component' versions
- you can check the FP properties of libraries with: # objdump -p 'library'
example:
# objdump -p gcc-build/gcc/gencheck.o
gcc-build/gcc/gencheck.o: file format elf32-littlearm
private flags = 600: [APCS-32] [VFP float format] [software FP]
#
(very handy)
currently trying to build hardfloat fpa 2.95.3 toolchain ...
-
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make CC="stage1/xgcc -Bstage1/ -B/tools/armv4l-unknown-linux-gnu/bin/" CFLAGS=" -O2 -g -O2" LDFLAGS="" libdir=/tools/lib STAGE_PREFIX=stage1/ LANGUAGES="c proto gcov "
make[2]: Entering directory `/mnt/lfs/sources/gcc-build/gcc'
(cd intl && make all)
make[3]: Entering directory `/mnt/lfs/sources/gcc-build/gcc/intl'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc/intl'
stage1/xgcc -Bstage1/ -B/tools/armv4l-unknown-linux-gnu/bin/ -c -DIN_GCC -O2 -g -O2 -DHAVE_CONFIG_H -I. -I../../gcc-2.95.3/gcc -I../../gcc-2.95.3/gcc/config -I../../gcc-2.95.3/gcc/../include \
../../gcc-2.95.3/gcc/gencheck.c
rm -f obstack.c
ln -s ../../gcc-2.95.3/gcc/../libiberty/obstack.c obstack.c
stage1/xgcc -Bstage1/ -B/tools/armv4l-unknown-linux-gnu/bin/ -c -DIN_GCC -O2 -g -O2 -DHAVE_CONFIG_H -I. -I../../gcc-2.95.3/gcc -I../../gcc-2.95.3/gcc/config -I../../gcc-2.95.3/gcc/../include obstack.c
stage1/xgcc -Bstage1/ -B/tools/armv4l-unknown-linux-gnu/bin/ -DIN_GCC -O2 -g -O2 -DHAVE_CONFIG_H -o gencheck \
gencheck.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `
/tools/armv4l-unknown-linux-gnu/bin/ld: ERROR: stage1/crtbegin.o uses FPA instructions, whereas gencheck does not
/tools/armv4l-unknown-linux-gnu/bin/ld: ERROR: stage1/crtbegin.o uses hardware FP, whereas gencheck uses software FP
/tools/armv4l-unknown-linux-gnu/bin/ld: failed to merge target specific data of file stage1/crtbegin.o
/tools/armv4l-unknown-linux-gnu/bin/ld: ERROR: gencheck.o uses FPA instructions, whereas gencheck does not
/tools/armv4l-unknown-linux-gnu/bin/ld: ERROR: gencheck.o uses hardware FP, whereas gencheck uses software FP
/tools/armv4l-unknown-linux-gnu/bin/ld: failed to merge target specific data of file gencheck.o
/tools/armv4l-unknown-linux-gnu/bin/ld: ERROR: obstack.o uses FPA instructions, whereas gencheck does not
/tools/armv4l-unknown-linux-gnu/bin/ld: ERROR: obstack.o uses hardware FP, whereas gencheck uses software FP
/tools/armv4l-unknown-linux-gnu/bin/ld: failed to merge target specific data of file obstack.o
/tools/armv4l-unknown-linux-gnu/bin/ld: ERROR: stage1/crtend.o uses FPA instructions, whereas gencheck does not
/tools/armv4l-unknown-linux-gnu/bin/ld: ERROR: stage1/crtend.o uses hardware FP, whereas gencheck uses software FP
/tools/armv4l-unknown-linux-gnu/bin/ld: failed to merge target specific data of file stage1/crtend.o
collect2: ld returned 1 exit status
make[2]: *** [gencheck] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2
lfs:/sources/gcc-build$
-
ok so you live and learn.
AFAIK it was trying to link in hard and soft float libs/ (components),
so one needs to either make or download a releveant (in this case hardfloat) libc (glibc) library. then i found there are options to pass to binutils when compiling that which can recommend it which library to use as it can get messy having more than 1 version of glibc installed ...
it seems what im trying to do is somewhere between building the native toolchain as specified in LFS and building a cross toolchain as per other guides around the web and another section on LFS.
-
[been learning alot]
one query though: (maybe you can help meanie)
if you say i need 2.95.3 gcc toolchain to work with 2.4 kernel and make modules how come you can/do configure the kernel according to guides with the cross compiler arm-linux-gcc that comes with the sdk which is gcc 3.4.5 (vfp) ??
doesnt seem a bit strange to have provided an "os/sdk" that cant compile modules ??
that brought up here's my lates issues, posted for reference purposes:
Hello,
I've been working on a native fpa toolchain including gcc-2.95.3 and glibc-2.2.5, for a strongarm sa1110 which is detected as armv4l-unknown-linux-gnu.
its currently running a vfp toolchain that can run both fpa and vfp binaries through floating point emulation.
I also have an sdk for the os it runs that comes with a vfp cross compiler. (pdaxrom beta1)
Im stuck now with trying to get glibc to compile as fpa rather than vfp, (for gcc-2.95.3 is default fpa)... the error is:
include/libc-symbols.h -o /sources/glibc-build/math/setfpucw.o
./ccdjmC0e.s: Assembler messages:
./ccdjmC0e.s:22: Error: selected processor does not support `rfs r3'
./ccdjmC0e.s:38: Error: selected processor does not support `wfs r3'
distcc[16729] ERROR: compile ../sysdeps/generic/setfpucw.c on 192.168.129.200 failed
make[2]: *** [/sources/glibc-build/math/setfpucw.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.2.5/math'
make[1]: *** [math/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.2.5'
make: *** [all] Error 2
When i supply --without-fp to the glibc compile it succeeds (under vfp toolchain) but i end up with:
# objdump -p crtend.o
crtend.o: file format elf32-littlearm
private flags = 600: [APCS-32] [VFP float format] [software FP]
When im looking for:
# objdump -p crtend.o
crtend.o: file format elf32-littlearm
private flags = 0: [APCS-32] [FPA float format]
***: Does whether im compiling glibc under a vfp crosschain or a fpa crosschain(gcc) effect this outcome?
***: Are there some extra paramaters i can pass to glibc configure to work this through ? perhaps something relating to the cpu or float preferences ?, im really just looking for a way to make a gcc-2.95.3 compatible glibc...
regards, and thankyou for your time,
Hayden Thring.
Australia.
-
[been learning alot]
one query though: (maybe you can help meanie)
if you say i need 2.95.3 gcc toolchain to work with 2.4 kernel and make modules how come you can/do configure the kernel according to guides with the cross compiler arm-linux-gcc that comes with the sdk which is gcc 3.4.5 (vfp) ??
doesnt seem a bit strange to have provided an "os/sdk" that cant compile modules ??
that brought up here's my lates issues, posted for reference purposes:
Hello,
I've been working on a native fpa toolchain including gcc-2.95.3 and glibc-2.2.5, for a strongarm sa1110 which is detected as armv4l-unknown-linux-gnu.
its currently running a vfp toolchain that can run both fpa and vfp binaries through floating point emulation.
I also have an sdk for the os it runs that comes with a vfp cross compiler. (pdaxrom beta1)
Im stuck now with trying to get glibc to compile as fpa rather than vfp, (for gcc-2.95.3 is default fpa)... the error is:
include/libc-symbols.h -o /sources/glibc-build/math/setfpucw.o
./ccdjmC0e.s: Assembler messages:
./ccdjmC0e.s:22: Error: selected processor does not support `rfs r3'
./ccdjmC0e.s:38: Error: selected processor does not support `wfs r3'
distcc[16729] ERROR: compile ../sysdeps/generic/setfpucw.c on 192.168.129.200 failed
make[2]: *** [/sources/glibc-build/math/setfpucw.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.2.5/math'
make[1]: *** [math/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.2.5'
make: *** [all] Error 2
When i supply --without-fp to the glibc compile it succeeds (under vfp toolchain) but i end up with:
# objdump -p crtend.o
crtend.o: file format elf32-littlearm
private flags = 600: [APCS-32] [VFP float format] [software FP]
When im looking for:
# objdump -p crtend.o
crtend.o: file format elf32-littlearm
private flags = 0: [APCS-32] [FPA float format]
***: Does whether im compiling glibc under a vfp crosschain or a fpa crosschain(gcc) effect this outcome?
***: Are there some extra paramaters i can pass to glibc configure to work this through ? perhaps something relating to the cpu or float preferences ?, im really just looking for a way to make a gcc-2.95.3 compatible glibc...
regards, and thankyou for your time,
Hayden Thring.
Australia.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164059\"][{POST_SNAPBACK}][/a][/div]
sashz did provide two separate cross compillers, a 3.4.x one for compiling apps and 2.95.x one for compiling kernel/modules
this is only needed for the 2.4.x based versions of pdaXrom. gcc 3.4.x can compile modules for the newer pdaXrom versions that run on 2.6 kernel ...
the reason the 2.4 kernel have to be compiled with gcc 2.95 is that some modules like the sd card module are provided by Sharp as binary only so the only way to be able to use them is to have a compatible kernel build with the same compiler options...
well, I cheated when I build a fpa toolchain. I build it under Sharp ROM which is all fpa
-
what ever happened to the 2.95.3 chain you speak of ??
as for my glib problem i worked that out by getting a 2.95.3 crosschain from handhelds.org and using that to cross compile glibc rather than the vfp one. the resulted in fpa glibc which i then copied onto the z, hooked into bootstrap gcc 2.95.3 and got working !!
no just updating my kernel as through process came to see it was miss match, and will begin final compile of toolchain.
never thought id get ther by now, but linux works !
Hayden.
-
the 2.95.3 chain is the zgcc image for pqaXqtrom
-
umm, ive ahd agreat time and learned alot by making it myself but wouldnt this have worked instead ??
-
umm, ive ahd agreat time and learned alot by making it myself but wouldnt this have worked instead ??
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164189\"][{POST_SNAPBACK}][/a][/div]
nope, mine was optimised for xscale, however, you could had used someone else's and older version of zgcc image for cacko/sharp... but those probably were all 2.95.2
-
does that mean it would run on strongarm (armv4l) ??
-
does that mean it would run on strongarm (armv4l) ??
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164192\"][{POST_SNAPBACK}][/a][/div]
no, xscale are armv5tel
-
i actually meant to say "wouldn't" instead of would theeby verifying my hunch and partiall sigh of release and success as i near completion ....
thankyou.