This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Zhiyong Sun <szhiyong@cs.unm.edu> wrote: > I knew my problem now. I have one question how to build toolchain > for AthlonXP. Can you please tell me which /linux/include/asm-* > for AthlonXp? The 'asm-i386' > Is asm-ppc ok to build AthlonXp? No, it is for PowerPC > Is CFLAGS="-march=athlon_xp -02" right? Can be, please check the options for your native GCC. > I tried to use "CC="gcc -m32"" to build 32 bit library for glibc. But > it still produced 64-bit lib64 library. When I used " CFLAGS="-m32 -02"" > , the error message came. May I ask why this happen? Maybe I have met Dementia Senilis, the famous Greekish lady to to put one somehow absent-minded, or something... Anyhow when now trying to start to rebuild a 32-bit glibc-2.3.2 with the x86_64 target GCC, it didn't succeed very easily, as the matter of fact not at all yet... Maybe some day I will try this again. The 'lib/32' was a symlink to the 'athlon_xp' toolchain in my current tools, so if I had built the 32-bit libraries with the 'x86_64-linux-gnu' target GCC, the glibc produced with it would have been there... So your choice (as was mine too) could be to build a separate cross-toolchain for the 'athlon_xp-linux' target. This 'one-arch' target should be quite a usual cross build. The target name 'athlon_xp-linux(-gnu)' should be approved, although the CPU-name 'athlon_xp' will be first converted into a 'i686': /home5/src/gcc-3.3.2 > ./config.sub athlon_xp-linux i686-pc-linux-gnu /home5/src/gcc-3.3.2 > ./config.sub athlon_xp-linux-gnu i686-pc-linux-gnu Later the 'gcc/config.gcc' sets the appropriate flag: i686-*-* | i786-*-*) case $target_alias in athlon_xp-*|athlon_mp-*|athlon_4-*) target_cpu_default2=TARGET_CPU_DEFAULT_athlon_sse ;; athlon_tbird-*|athlon-*) target_cpu_default2=TARGET_CPU_DEFAULT_athlon ;; ie. the 'TARGET_CPU_DEFAULT_athlon_sse' being set... About the 'x86_64' has also been told there something: x86_64-*-*) # We should have hammer chip here, but it does not exist yet and # thus it is not supported. Athlon_SSE is probably equivalent feature # wise to hammer from our point of view except for 64bit mode. target_cpu_default2=TARGET_CPU_DEFAULT_athlon_sse ;; So my thought is that the 32-bit mode in Athlon64 is very similar as the AthlonXP and libs made for AtlonXP will work optimally in the 32-bit mode, the i586 (Pentium) and i686 (Pentium-II) being not so optimal. Producing a Athlon_XP-defaulted GCC and a Athlon_XP-optimized glibc is not much extra work, especially if 'outsourcing' the glibc-build to other companies... Or you can forget the whole glibc build... I suddenly remembered there already being those Athlon64 based PCs in sale, so there must be at least one opsys available for them and this first opsys has been told many times in magazines to be the SuSE Linux 9.0 for x86_64... At the SuSE ftp-site, in : ftp://ftp.suse.com/pub/suse/x86_64/9.0/suse/i586/ are premade RPMs like 'glibc-*32bit-9.0-0.i586.rpm' and in ftp://ftp.suse.com/pub/suse/x86_64/9.0/suse/i586/ is a 'glibc-2.3.2-117.i686.rpm', so these should make the 32-bit C library for the SuSE 9.0/x86_64 distribution somehow. Taking also the 64-bit C library and using it instead of the self-built one (for plain vanilla 'generic x86_64-linux', without any bugfixes for the x86_64 from SuSE), could be more sane... One could only wonder where are those AthlonXP-optimized libraries. Ok, the SuSE 9.0/x86_32 can be optimized for i586, so the 32-bit mode has seen to be the 'compatability mode' for the 32-bit SuSE 9.0... Using prebuilt C libraries makes the build to be similar to a build for Sparc Solaris2.[7-9] with its 'lib' and 'lib/sparcv9' (32-bit as default, 'sparcv9' means the 64-bit stuff) libraries. And the 'generic target' (maybe the produced binaries will run somehow on any Linux/x86_64 soon appearing: RedHat, Mandrake, TurboLinux,...) will be changed to the custom SuSE 9.0/x86_64 target. If I had to test the produced executables on some Atlon64 based PC, I would choose to install some available Linux/x86_64 distribution there, not to start creating my own Linux/x86_64 to be installed there... Cheers, Kai ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |