[Clfs-support] CLFS for ppc on LFS 6.3 host

Anthony Drake agmotorsvc at verizon.net
Thu Jul 3 08:20:01 PDT 2008


Good morning.
I'm in the process of following CLFS book 1.0.0-PowerPC in an attempt to get a cross compiler for power pc running on my LFS 6.3 host running on an i686 processor.    My goal is to get the cross compiler working, to be able to build packages to install on an embedded linux ppc target, so I really do not need to build a CLFS, merely(!) the cross compiler environment, to be able to build and update passwd and PAM library modules on the ppc target.
I have deviated from book in the respect that my LFS 6.3 host has newer than recommended gcc and GNU library, and that I am not using a separate partition for the cross compiler ie /mnt/clfs is an ordinary directory.
${CLFS} is set to /mnt/clfs, CLFS_HOST=i686-cross-linux-gnu; CLFS_TARGET=powerpc-unknown-linux-gnu.
/tools is a link to /mnt/clfs/tools
/cross-tools is a link to /mnt/clfs/cross-tools
Versions:
bash, version 3.2.17(1)-release
Binutils: version 2.17
bzip2, Version 1.0.4, 20-Dec-2006.
Coreutils: 6.9
diff (GNU diffutils) 2.8.1
GNU find version 4.2.31
GNU Awk 3.1.5
gcc (GCC) 4.1.2
GNU C Library stable release version 2.5.1,
grep (GNU grep) 2.5.1
gzip 1.3.12
GNU Make 3.81
patch 2.5.4
GNU sed version 4.1.5
tar (GNU tar) 1.18
So far, it's going pretty well, but I have run into some problems - unzipping .bz2 files in windows then copying to linux system does not work well, but is easily avoided by using bzcat piped to tar on LFS machine.  After learning to properly restore and patch packages, I was able to progress through chapter 5 to the point of building  glibc 2.4, which will not build:
make output fragment follows:make[4]: Entering directory `/mnt/clfs/sources/glibc-2.4/time'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/mnt/clfs/sources/glibc-2.4/time'
make[3]: Leaving directory `/mnt/clfs/sources/glibc-2.4/elf'
powerpc-unknown-linux-gnu-gcc tst-tlsmod1.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -mabi=ibmlongdouble -mnew-mnemonics -Wstrict-prototypes -mlong-double-128 -fpic -I../include -I/mnt/clfs/sources/glibc-build/elf -I/mnt/clfs/sources/glibc-build -I../sysdeps/powerpc/powerpc32/elf -I../sysdeps/powerpc/elf -I../sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu -I../sysdeps/powerpc/powerpc32/fpu -I../nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../nptl/sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux/powerpc -I../sysdeps/ieee754/ldbl-128ibm -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc -I../nptl/sysdeps/unix
 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/powerpc/powerpc32 -I../sysdeps/wordsize-32 -I../sysdeps/powerpc/fpu -I../nptl/sysdeps/powerpc -I../sysdeps/powerpc -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -nostdinc -isystem /mnt/clfs/cross-tools/bin/../lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include -isystem /tools/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -DNOT_IN_libc=1 -DNOT_IN_libc -o /mnt/clfs/sources/glibc-build/elf/tst-tlsmod1.os -MD -MP -MF /mnt/clfs/sources/glibc-build/elf/tst-tlsmod1.os.dt -MT /mnt/clfs/sources/glibc-build/elf/tst-tlsmod1.os
cc1: warning: Using IBM extended precision long double
In file included from tst-tlsmod1.c:6:
tls-macros.h:850:3: error: #error "No support for this architecture so far."
tst-tlsmod1.c: In function 'in_dso':
tst-tlsmod1.c:27: warning: implicit declaration of function 'TLS_IE'
tst-tlsmod1.c:27: error: 'foo' undeclared (first use in this function)
tst-tlsmod1.c:27: error: (Each undeclared identifier is reported only once
tst-tlsmod1.c:27: error: for each function it appears in.)
tst-tlsmod1.c:27: warning: assignment makes pointer from integer without a cast
tst-tlsmod1.c:28: error: 'bar' undeclared (first use in this function)
tst-tlsmod1.c:28: warning: assignment makes pointer from integer without a cast
tst-tlsmod1.c:45: warning: implicit declaration of function 'TLS_GD'
tst-tlsmod1.c:45: warning: assignment makes pointer from integer without a cast
tst-tlsmod1.c:46: warning: assignment makes pointer from integer without a cast
tst-tlsmod1.c:47: error: 'baz' undeclared (first use in this function)
tst-tlsmod1.c:47: warning: assignment makes pointer from integer without a cast
make[2]: *** [/mnt/clfs/sources/glibc-build/elf/tst-tlsmod1.os] Error 1
make[2]: Leaving directory `/mnt/clfs/sources/glibc-2.4/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/clfs/sources/glibc-2.4'
make: *** [all] Error 2
end make output fragment
Whew!  I know it's long winded - my current plan is to install gcc v4.1.1, and glibc 2.4 on my LFS 6.3 host machine, then start over on chapter 5, then see what the news is going to be.    The only catch is I'm not completely sure how to avoid calling gcc v4.1.2 on the host machine.  I built gcc v4.1.1 in a directory call /tools41, and the thought is to modify $PATH to insert /tools41 first in the path, but I am also not sure how to install glibc 2.4 on my host system, and have it used instead of the resident glibc2.5.
If anyone can see anything obvious, I'd be really glad, I'm open to any advice.   The management is really interested in being able to update these PPC embedded systems, and so am I.
Thanks,
Anthony Drake.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20080703/f36fe5e0/attachment.html>


More information about the Clfs-support mailing list