This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Compiling glibc for AMD K6-III


Hi,

I don't know if this counts as a new platform, I'm hoping someone can give
me a little guidance -- if only to tell me to stop it, right now.

I have had this computer for several years now and am rather fond of it -- it 
has a K6-III cpu, and 2MB pipeline-burst 'level 3' cache on the motherboard.  
I have installed Gentoo with everything compiled as i686 except glibc.  This 
enables me to view DVD's without dropping frames, though cpu utilisation is 
rather high.

If I try to compile glibc with CHOST=i686-pc-linux-gnu, the error I get is;-
CPP='gcc -E -x c-header'  /var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/elf/ld-linux.so.2 --library-path /var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/math:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/elf:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/dlfcn:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/nss:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/nis:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/rt:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/resolv:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/crypt:/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/linuxthreads /var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/sunrpc/xbootparam_prot.T
make[2]: *** [/var/tmp/portage/glibc-2.3.3.20040420/work/glibc-2.3.2/buildhere/sunrpc/xbootparam_prot.stmp] Illegal instruction

I can get 'round this error if I change;-
  ...elf/ld-linux.so.2
to /lib/ld-linux.so.2
 (to use the boot-strapped linker (i386) instead of the i686 one just built)
*and*
 remove ...work/glibc-2.3.2/buildhere/ from the library-path
I then get an error on the next line (I haven't tried removing all the errors).
You are probably not surprised that this doesn't give an error, and I guess it
isn't useful.

I suspect that what is stopping glibc compiling as i686 is a lack of
3DNow! extended instructions -- my cpu flags are;-
       fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr
Maybe there is a bit of hand-coded assembler being selected.  I've tried
using an editor that understands binary executables to find 3DNow! extended
instructions, but I must be looking in the wrong place.
Also I don't have the cmov flag, but I don't know what this indicates.

I would like to get the most efficient performance that this cpu can achieve, 
and maybe glibc won't make much difference, but "uname -p" is refusing to 
report "i686", so I have to persuade the rest of the system to compile as 
i686 -- not very elegant.

I'd like to build a version of glibc that includes all the options that my cpu can
make use of, and not the ones that it can't.

Is the error generated by gcc, ld-linux.so.2, make?
And which piece of code, ld-linux.so.2, bootparam_prot.x?

Please can someone point me in the right direction as glibc is a big and
scary place.

TIA
Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]