3.4.3 toolchain build/LOS178 Makefile global clean/clobber

  • Added CR 636: LOS178 3.0.0 build fails with new 3.4.3 gcc
  • Reproduced make clobber problem
  • Added 637: 3.4.3 toolchain does not package properly

Make clobber problem

When a make clobber is performed in sys the make is propagated downward through the sub makes. However the sys level Makefile starts it's clobber target with: rm $(ENV_PREFIX)/sys/lib/* to remove all of the libraries in sys/lib.

When the make clobber gets propagated down to drivers/arinc653 the following happens:

    make -f Makefile.real DRV_IS_DLDD=no clobber
    make[1]: Entering directory `/build/los178/sys/drivers/arinc653'
    /bin/rm -f arinc653drvr.lint
    /build/los178/cdk/linux-elf-ppc/usr/bin/ar d /build/los178/sys/lib/libdrivers.a arinc653drvr.o
    make[1]: Leaving directory `/build/los178/sys/drivers/arinc653'
    make -f Makefile.real DRV_IS_DLDD=yes clobber
    make[1]: Entering directory `/build/los178/sys/drivers/arinc653'
    /bin/rm -f arinc653.*.o arinc653.*.bin arinc653.pre arinc653.import
    /bin/rm -f arinc653.dldd arinc653.info
    make[1]: Leaving directory `/build/los178/sys/drivers/arinc653'

At this point a small libdrivers.a is left in sys/lib:

    europa:ll ../../lib/libdrivers.a
    -rw-rw-r--    1 adefaria staff         170 Jun 13 13:02 ../../lib/libdrivers.a

Similar things happen in:

  • sys/drivers/mem
  • sys/driverspmac_g5/is_sungem
  • sys/drivers.vmpc/rs232
  • sys/drivers.vmpc/bdlan
  • sys/drivers.vmpc/if_dec21040

When we are done with a clobber we are left with:

    europa:ll ../../lib/
    total 20
    drwxrwxr-x    2 adefaria staff        4096 Jun 13 13:16 ./
    drwxrwxr-x   26 adefaria staff        4096 Jun 13 13:16 ../
    -rw-rw-r--    1 adefaria staff         170 Jun 13 13:16 libdrivers.a
    -rw-rw-r--    1 adefaria staff           8 Jun 13 13:16 libdrivers_pmac_g5.a
    -rw-rw-r--    1 adefaria staff           8 Jun 13 13:16 libdrivers_vmpc.a

This eventually screws up the build. Doing a make clobber followed by rm lib/* then a make install works OK...