maintainer mode
Alexandre Oliva
oliva at dcc.unicamp.br
Sat Oct 31 13:24:49 GMT 1998
On Oct 31, 1998, Andrew Tridgell <tridge at samba.anu.edu.au> wrote:
>> several C compilers do not accept `-c' and `-o' together...
> yes, Dave Dykstra fixed this in rsync recently using the following:
> c.o:
> @OBJ_SAVE@
> $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
> @OBJ_RESTORE@
Starting to get unreadable, huh? :-D
>> And all the burden of avoiding trouble with parallel
>> builds falls upon the Makefile writer.
> why is a single Makefile more of a problem with parallel builds?
assume you have foo/x.c and bar/x.c; try to compile them both at once
without `-c -o'. Unless @OBJ_SAVE@ and @OBJ_RESTORE@ do some kind of
locking to avoid trouble, it will probably break.
> I think the best way of avoiding problems on those systems is to
> define CC to be a call to a script that handles the -c and -o
> problem. That way "normal" systems work unimpeded.
It's not easy to write a portable script that takes care of this
problem. We're discussing this very issue in the libtool mailing
list, and, IMO, I'd prefer not to rely on shell-script based locking
to avoid problems in parallel builds...
--
Alexandre Oliva
mailto:oliva at dcc.unicamp.br mailto:oliva at gnu.org mailto:aoliva at acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the samba-technical
mailing list