Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Oct 1998 14:09:53 -0700
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        freebsd-current@FreeBSD.ORG, jb@cimlogic.com.au
Subject:   gnu/usr.bin/cc/cc_tools/Makefile bug? (was Re: filesystem safety and SCSI disk write caching)
Message-ID:  <199810122109.OAA12095@salsa.gv.tsc.tdk.com>

next in thread | raw e-mail | index | archive | help
>From a thread I started on the scsi and fs lists ...

On Oct 12,  6:18am, Don Lewis wrote:
} Subject: Re: filesystem safety and SCSI disk write caching

} I haven't yet had time to try to track down why "make -j4 buildworld"
} fails with the standard mount options.

Found it.

--- gcc.o ---
In file included from /usr/src/gnu/usr.bin/cc/cc/../../../../contrib/gcc/gcc.c:706:
/usr/obj/elf/usr/src/gnu/usr.bin/cc/cc/../cc_tools/specs.h:2: `lude' undeclared here (not in a function)
/usr/obj/elf/usr/src/gnu/usr.bin/cc/cc/../cc_tools/specs.h:2: initializer element for `default_compilers[21]' is not constant
/usr/obj/elf/usr/src/gnu/usr.bin/cc/cc/../cc_tools/specs.h:2: parse error before string constant
In file included from /usr/obj/elf/usr/src/gnu/usr.bin/cc/cc/../cc_tools/specs.h:3,
                 from /usr/src/gnu/usr.bin/cc/cc/../../../../contrib/gcc/gcc.c:706:
/usr/src/gnu/usr.bin/cc/cc/f2c-specs.h:3: parse error before `{'
*** Error code 1
1 error
*** Error code 2
1 error


Taking a look at specs.h:

% cat /usr/obj/elf/usr/src/gnu/usr.bin/cc/cc/../cc_tools/specs.h
#include "cp/lang-specs.h"
lude "f2c-specs.h"
#include "f2c-specs.h"

Taking a look at the log file from make -j4 buildworld:

===> cc_tools
--- config.h ---
--- hconfig.h ---
--- tconfig.h ---
--- options.h ---
--- config.h ---
echo '#include "i386/freebsd.h"'     > tm.h
echo '#include "i386/xm-freebsd.h"'  > config.h
echo '#include "i386/xm-freebsd.h"'  > hconfig.h
--- hconfig.h ---
echo '#include "i386/freebsd.h"'     > tm.h
echo '#include "i386/xm-freebsd.h"'  > config.h
--- tconfig.h ---
echo '#include "i386/freebsd.h"'     > tm.h
--- options.h ---
echo '#include "i386/freebsd.h"'     > tm.h
--- tconfig.h ---
echo '#include "i386/xm-freebsd.h"'  > config.h
--- hconfig.h ---
echo '#include "i386/xm-freebsd.h"'  > hconfig.h
--- options.h ---
echo '#include "i386/xm-freebsd.h"'  > config.h
--- tconfig.h ---
echo '#include "i386/xm-freebsd.h"'  > hconfig.h
--- config.h ---
echo '#include "i386/xm-freebsd.h"'  > tconfig.h
--- hconfig.h ---
echo '#include "i386/xm-freebsd.h"'  > tconfig.h
--- tconfig.h ---
echo '#include "i386/xm-freebsd.h"'  > tconfig.h
--- options.h ---
echo '#include "i386/xm-freebsd.h"'  > hconfig.h
--- config.h ---
echo '#include "cp/lang-options.h"'             > options.h
--- hconfig.h ---
echo '#include "cp/lang-options.h"'             > options.h
--- options.h ---
echo '#include "i386/xm-freebsd.h"'  > tconfig.h
--- tconfig.h ---
echo '#include "cp/lang-options.h"'             > options.h
--- config.h ---
echo '#include "cp/lang-specs.h"'               > specs.h
--- hconfig.h ---
echo '#include "cp/lang-specs.h"'               > specs.h
--- options.h ---
echo '#include "cp/lang-options.h"'             > options.h
--- tconfig.h ---        
echo '#include "cp/lang-specs.h"'               > specs.h
--- config.h ---         
echo '#include "f2c-specs.h"'                   >> specs.h
--- hconfig.h ---        
echo '#include "f2c-specs.h"'                   >> specs.h
--- bi-parser.c ---      
--- tconfig.h ---  
echo '#include "f2c-specs.h"'                   >> specs.h
--- options.h ---        
echo '#include "cp/lang-specs.h"'               > specs.h
--- bi-parser.c ---      
bison  -d /usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcc/bi-parser.y -o
bi-parser.c
--- options.h ---        
echo '#include "f2c-specs.h"'                   >> specs.h


Taking a look at gnu/usr.bin/cc/cc_tools/Makefile:

# the host/target compiler config.
 
COMMONHDRS=     config.h hconfig.h tconfig.h tm.h options.h specs.h
 
${COMMONHDRS}: 
        echo '#include "${MACHINE_ARCH}/freebsd.h"'     > tm.h
        echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > config.h
        echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > hconfig.h
        echo '#include "${MACHINE_ARCH}/xm-freebsd.h"'  > tconfig.h
        echo '#include "cp/lang-options.h"'             > options.h
        echo '#include "cp/lang-specs.h"'               > specs.h
        echo '#include "f2c-specs.h"'                   >> specs.h

GENSRCS+=       ${COMMONHDRS}


It sure looks like if you do a parallel make, these .h files get built
in parallel multiple times.  Most of the time we appear to get lucky
and they happen to come out correct.  If we don't want to rely on luck,
then this Makefile should have a separate rule for each of these .h files.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810122109.OAA12095>