3.4.3 toolchain build/LOS178 Makefile global clean/clobber
- As Moscow had checked in changes I was instructed to reattempt to build 3.4.3 toolchain again. Toolchain builds on both RH 8.0 and 9.0 but LOS178 fails to build
- Made changes to LOS178 top level Makefile to support global clean and clobber targets. Need CR to check this in...
3.4.3 Toolchain builds
Vinnie So wrote:OK.Andrew,
On the other part I just wrote the high level instruction you know what to do.
--Vinnie
1. check out compiler TOT from t3:/cvs/gcc-cvs
# cvs co -P toolchain
2. Apply tag DEV_LOS178_3p0p0_ppc_20050609
To the toolchain?!?
3. check out los178 & check out bin-image (TOT)
# cvs co -P bin-image # cvs co -P los178
OK.
4. Apply tag DEV....... you know what this is
I assume you mean to los178... (bin-image?)
5. extract linux cdk (98r2) into the los178 build tree
t3:/export/dev_archive/los178/2p0p0/20050228/solaris/media/ppc/1033-00.cdklinux.tar.gz
OK
6. extract sys/miscgcc from bin-image/ppc.cdksol.tar.gz into los178 build tree
# gnutar zxpf bin-image/ppc.cdksol.tar.gz sys/miscgccThis is needed since kernel is still xcoff. Once kernel is elf you will need elf miscgcc object files.
OK.
7. In the los178 build tree source SETUP.bash
OK.
8. Change to the toolchain directory & do whatever setup is needed and build the compiler
OK. Damn it worked! (RH 9.0 - still waiting for RH 8.0...)
9. package the toolchain & extract into the los178 build tree
OK
10. build the los178
Experienced problems. First problem is that cdk/linux-elf-ppc lacked a bin directory, therefore $ENV_PREFIX/cdk/linux-elf-ppc/bin/make did not exist. Looking at linux-xcoff-ppc/bin I see that some files are simply symlinks to ../usr/bin/
So recreating (symlinking symlinks and copying files) $ENV_PREFIX/cdk/linux-xcoff-ppc/bin -> $ENV_PREFIX/cdk/linux-elf-ppc/bin and attempting the build yielded errors. Discussing this with Vinnie we performed the following actions:
- Copied cdk/linux-elf-ppc/usr/lib/gcc/powerpc-lynx-lynxos178/3.4.3/libgcc.a -> $ENV_PREFIX/lib
- Created the /usr/los178/2.0.0/ppc_dev/cdk/linux-xcoff-ppc/bin directory and placed a copy of bison.simple from cdk/linux-xcoff-ppc/bin into that directory
- Reperformed the build of LOS178
Now, on Europa - a RH 8.0 machine - I have many errors all stating:
/build/los178/cdk/linux-xcoff-ppc/bin/ar: /build/los178/sys/lib/libdrivers.a: File format is ambiguous /build/los178/cdk/linux-xcoff-ppc/bin/ar: Matching formats: elf32-powerpc elf32-little elf32-big make[5]: *** [/build/los178/sys/lib/libdrivers.a(rddrvr.o)] Error 1
The log file is on europa:/build/los178/install.log
Global clean and clobber targets
In order to support global clean and clobber targets on LOS178's top level Makefile the following changes need to be done:
- Add clean and clobber to .PHONY
- Change help target to describe new targets
- Add clean and clobber targets that essentially loop through $(DIRS) and perform make [clean|clobber]
Via cvs diff:
Index: Makefile =================================================================== RCS file: /cvs/los178-cvs/los178/Makefile,v retrieving revision 1.7 diff -r1.7 Makefile 22c22 < .PHONY: help all install setup asmstat asmstatclean --- > .PHONY: help all install setup asmstat asmstatclean clean clobber 24a25 > @echo "This Makefile is use to build the entire LOS178, for example:" 26,27d26 < @echo "This Makefile is use to build the entire LOS178" < @echo " for example:" 31c30,33 < --- > @echo "Additionally the following targets are supported" > @echo "" > @echo " make clean" > @echo " make clobber" 55a58,66 > > # Global clean and clobber targets > clean: > @for dir in $(DIRS); do \ > (cd $$dir && make clean); done > > clobber: > @for dir in $(DIRS); do \ > (cd $$dir && make clobber); done