tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pcc and build system



> How should alternative compilers be integrated into the build system?
> Can patches like the one below be sprinkled round the the build tree
> and bsd.own.mk changed later to define HAVE_PCC?

In general, it would be nice if changes could be centralised, such as by
adding appropriate macros to <sys/cdefs.h>, and having other code use
such macros.  I don't mind seeing a maze of #if (this_compiler) && !
(that_compiler) || (other_compiler) in sys/cdefs.h, but I don't want to
see it replicated in many Makefiles or other headers.

I agree. Most occurrences of HAVE_GCC are actually testing for use of compiler warning flags, like -Wno-pointer-sign. Maybe there is a better mechanism we can use to solve this?

Maybe HAVE_GCC should be GCC_VERSION and another variable should be introduced to indicate which compiler.

COMPILER=gcc
GCC_VERSION=4

COMPILER=pcc
PCC_VERSION=1

Here's a list of the files which will require changes:

./bin/csh/Makefile:.if ${HAVE_GCC} == 4 && ${MACHINE_ARCH} == "vax"
./bin/ed/Makefile:.if ${HAVE_GCC} == 4
./distrib/sets/Makefile:        @echo ${HAVE_GCC}
./distrib/utils/x_dhclient/Makefile:.if ${HAVE_GCC} == 4
./etc/Makefile:         DESTDIR EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \
./games/bcd/Makefile:.if ${HAVE_GCC} == 4
./games/pom/Makefile:.if ${HAVE_GCC} == 4
./lib/i18n_module/UTF7/Makefile:.if ${MACHINE_ARCH} == "vax" && $ {HAVE_GCC} > 3
./lib/libbz2/Makefile:    ${HAVE_GCC} == 4
./lib/libcrypt/Makefile:.if ${HAVE_GCC} == 4
./lib/libdns/Makefile:.if ${HAVE_GCC} == 4
./lib/libgssapi/Makefile:.if ${HAVE_GCC} == 4
./lib/libhdb/Makefile:.if ${HAVE_GCC} == 4
./lib/libheimntlm/Makefile:.if ${HAVE_GCC} == 4
./lib/libhx509/Makefile:.if ${HAVE_GCC} == 4
./lib/libkadm5clnt/Makefile:.if ${HAVE_GCC} == 4
./lib/libkadm5srv/Makefile:.if ${HAVE_GCC} == 4
./lib/libm/Makefile:.if ${HAVE_GCC} == 4
./lib/libpcap/Makefile:.elif defined(HAVE_GCC)
./lib/libssh/Makefile:.if ${HAVE_GCC} == 4
./lib/libtelnet/Makefile:.if ${HAVE_GCC} == 4
./libexec/ipropd-master/Makefile:.if ${HAVE_GCC} == 4
./libexec/ipropd-slave/Makefile:.if ${HAVE_GCC} == 4
./libexec/kadmind/Makefile:.if ${HAVE_GCC} == 4
./libexec/kpasswdd/Makefile:.if ${HAVE_GCC} == 4
./Makefile:.if ${HAVE_GCC} == "3"
./Makefile:.if (${HAVE_GCC} == "3" || ${HAVE_GCC} == "4")
./regress/sys/kern/ras/ras1/Makefile:.if ${HAVE_GCC} == 4
./regress/sys/kern/ras/ras2/Makefile:.if ${HAVE_GCC} == 4
./regress/sys/kern/ras/ras3/Makefile:.if ${HAVE_GCC} == 4
./sbin/atactl/Makefile:.if ${HAVE_GCC} == 4
./sbin/cgdconfig/Makefile:.if ${HAVE_GCC} == 4
./sbin/clri/Makefile:.if ${HAVE_GCC} == 4
./sbin/dkctl/Makefile:.if ${HAVE_GCC} == 4
./sbin/dump/Makefile:.if ${HAVE_GCC} == 4
./sbin/fsck_ext2fs/Makefile:.if ${HAVE_GCC} == 4
./sbin/fsck_ffs/Makefile:.if ${HAVE_GCC} == 4
./sbin/fsdb/Makefile:.if ${HAVE_GCC} == 4
./sbin/mount_smbfs/Makefile:.if ${HAVE_GCC} == 4
./sbin/newfs/Makefile:.if ${HAVE_GCC} == 4
./sbin/newfs_sysvbfs/Makefile:.if ${HAVE_GCC} == 4
./sbin/restore/Makefile:.if ${HAVE_GCC} == 4
./sbin/veriexecctl/Makefile:.if ${HAVE_GCC} == 4
./sys/arch/hp700/stand/xxboot/Makefile:.if ${HAVE_GCC} != 4
./sys/lib/libsa/Makefile:.if ${HAVE_GCC} == 4
./tools/gcc/Makefile:.if ${HAVE_GCC} == 4
./tools/Makefile:.if ${HAVE_GCC} == "4"
./usr.bin/awk/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/crontab/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/ctags/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/gzip/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/nvi/build/Makefile:#.if ${HAVE_GCC} == 4
./usr.bin/ssh/sftp/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/ssh/ssh/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/telnet/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/tn3270/tn3270/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/tr/Makefile:.if ${HAVE_GCC} == 4
./usr.bin/vi/build/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/amd/amd/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/amd/amq/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/amd/libamu/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/amd/pawd/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/bind/named/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/bootp/bootptest/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/chrtbl/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/cron/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/dumplfs/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/hprop/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/installboot/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/iprop-log/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/isdn/isdnd/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/isdn/isdnmonitor/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/isdn/isdntel/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/isdn/isdntrace/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/makefs/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/mopd/common/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/mopd/mopd/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/mopd/mopprobe/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/mscdlabel/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/pppd/pppd/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/rarpd/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/rbootd/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/rpc.pcnfsd/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/rtadvd/Makefile:.if (${HAVE_GCC} == 4)
./usr.sbin/tcpdump/Makefile:.if ${HAVE_GCC} == 4
./usr.sbin/wiconfig/Makefile:.if ${HAVE_GCC} == 4



Home | Main Index | Thread Index | Old Index