From owner-freebsd-hackers Thu Apr 11 11:48:42 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA01032 for hackers-outgoing; Thu, 11 Apr 1996 11:48:42 -0700 (PDT) Received: from mail.think.com (Mail1.Think.COM [131.239.33.245]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA01017 for ; Thu, 11 Apr 1996 11:48:35 -0700 (PDT) Received: from Early-Bird-1.Think.COM by mail.think.com; Thu, 11 Apr 96 14:48:08 -0400 Received: from compound.think.com ([206.10.99.158]) by Early-Bird.Think.COM; Thu, 11 Apr 96 14:48:05 EDT Received: (from alk@localhost) by compound.think.com (8.7.5/8.6.112) id NAA00908; Thu, 11 Apr 1996 13:47:59 -0500 (CDT) Date: Thu, 11 Apr 1996 13:47:59 -0500 (CDT) Message-Id: <199604111847.NAA00908@compound.think.com> From: Tony Kimball To: hackers@freebsd.org Subject: pgcc kernel compiles automated Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk To eliminate those annoying manual interventions in making kernels using pgcc, here is a trivial script. I just say 'make CC=ccc' It assumes that the distribution cc is renamed to kcc, pgcc is installed as gcc # #!/bin/sh # # /usr/local/bin/ccc # # script to permit optimal compilation of the kernel using pgcc # with work-arounds for bugs and other inconveniences # for i in $* do case $i in ../../kern/kern_xxx.c) # pgcc bug -- use this as an # opportunity to hook in the # missing run-time without # touching the makefile if gcc $* ../../libkern/muldi3.c ; then echo gcc -O compile done ld -r -o kern_xxx2.o kern_xxx.o muldi3.o || exit 1 mv -f kern_xxx2.o kern_xxx.o exit 0; else echo kern_xxx gcc -O failed exit 1 fi ;; *) ;; esac done if ! gcc -O6 -fomit-frame-pointer $* ; then # pgcc bug rm -f cc1.core if ! gcc -O3 -fomit-frame-pointer$* ; then # assembly syntax problem rm -f cc1.core if ! kcc -O $* ; then # *your* problem echo All compilers failed. exit 1 else echo kcc -O compile done. fi else echo gcc -O3 compile done. fi else echo gcc -O6 compile done. fi exit 0