Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2001 23:14:31 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
Cc:        current@FreeBSD.ORG, kris@FreeBSD.ORG
Subject:   Re: secure/lib/libcrypto: "make -jX buildworld" fix
Message-ID:  <Pine.BSF.4.21.0103062246350.10668-100000@besplex.bde.org>
In-Reply-To: <20010306170740Z.matusita@jp.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 6 Mar 2001, Makoto MATSUSHITA wrote:

> I've found that current libcrypto/Makefile is not parallel make(1)
> unfriendly, since it creates a temporary file to as(1). Followings are
> sample session log with "make buildworld -j2":
> ...
> If there is no mean to create *.pl.s, how about using a pipe to pass
> an assembler code to as(1) ?

Pipes aren't so good.  They discard errors from all stages except the last.

> Index: Makefile
> ===================================================================
> RCS file: /home/ncvs/src/secure/lib/libcrypto/Makefile,v
> retrieving revision 1.35
> diff -u -r1.35 Makefile
> --- Makefile	2001/03/04 23:14:50	1.35
> +++ Makefile	2001/03/06 07:52:59
> @@ -384,12 +384,12 @@
>  .SUFFIXES:	.po .pl
>  .SUFFIXES:	.So .pl
>  .pl.o:
> -	perl -I${PERLPATH} $(.ALLSRC) elf ${CPUTYPE:Mi386:S/i//} > $(.PREFIX).pl.s ; ${AS} ${AFLAGS} $(.PREFIX).pl.s -o $(.TARGET)
> +	perl -I${PERLPATH} $(.ALLSRC) elf ${CPUTYPE:Mi386:S/i//} | ${AS} ${AFLAGS} - -o $(.TARGET)
>  
>  .pl.po:
> -	perl -I${PERLPATH} $(.ALLSRC) elf ${CPUTYPE:Mi386:S/i//} > $(.PREFIX).pl.s ; ${AS} ${AFLAGS} $(.PREFIX).pl.s -o $(.TARGET)
> +	perl -I${PERLPATH} $(.ALLSRC) elf ${CPUTYPE:Mi386:S/i//} | ${AS} ${AFLAGS} - -o $(.TARGET)
>  
>  .pl.So:
> -	perl -I${PERLPATH} $(.ALLSRC) elf ${CPUTYPE:Mi386:S/i//} > $(.PREFIX).pl.s ; ${AS} ${AFLAGS} $(.PREFIX).pl.s -o $(.TARGET)
> +	perl -I${PERLPATH} $(.ALLSRC) elf ${CPUTYPE:Mi386:S/i//} | ${AS} ${AFLAGS} - -o $(.TARGET)
>  .endif
>  

These lines have about 5 other bugs each.  Fixing some of these would
make the problem with parallel makes go away.  Note that the rules
are identical.  They say to create 3 identical .s files with the same
name (but only 1 copy will be created in the non-parallel case) and
3 identical object files with different names.  It would be better to
have only a .pl.S rule to create the assembler file and use the standard
.S.{o,po,So} rules to compile it to object files.  This would fix using
slightly wrong rules for building the object files.  The rule for building
the .po files is actually completely wrong (it is missing -DPROF ...), but
this currently makes no difference since the assembler files don't support
profiling either.

Bruce


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?Pine.BSF.4.21.0103062246350.10668-100000>