svn commit: r308181 - in head: . share/mk

Jonathan Anderson jonathan at FreeBSD.org
Wed Nov 2 07:24:16 UTC 2016


Hi,

On 1 Nov 2016, at 21:10, Dimitry Andric wrote:

> Please note, I reverted r307823 (which changed the suffixes from .bco
> and .llo to .bc and .ll) in r308003, since it caused a number of ports
> failures.  These ports were already using .ll as a suffix for C++ lex
> scripts.

The changes to bsd.suffixes-posix.mk (included by sys.mk) would have affected anything compiled with bmake, and indeed, I'd imagine that adding a .c->.ll rule alongside .c->.o could cause problems with C++ lex rules. In fact, part of brooks' original motivation for introducing .llo suffixes was to avoid name conflicts (although conflicts with program IR like we're introducing in this commit). The changes in this commit should only be picked up by things that explicit include bsd.{lib,prog}.mk, however, and they also have slightly more esoteric names (e.g., progname.full.ll) that are less likely to cause a conflict. Perhaps I ought to have done an exp-run, but I suspect that this commit will cause much less / no fallout. I don't suppose you have a list of the ports that failed after your r307823 change so that I could do spot checks?


>> # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
>> # .pico used for PIC object files
>> -.SUFFIXES: .out .o .po .pico .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln
>> +.SUFFIXES: .out .o .bc .ll .po .pico .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln
>
> So here, please use .bco and .llo.

The "o" in the suffix indicates that the file is analogous to an object file, which is not really the case with the rules added here in r308181. I'd be happy to consider a different suffix if we get ports fallout, but I'd like to wait for evidence of such fallout before renaming these suffixes away from upstream's usage. I think that we should stick with the upstream suffixes unless there's a good reason not to (such as collisions with lex things as affected r307823).


>> @@ -199,6 +199,18 @@ lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS}
>> 	${RANLIB} ${RANLIBFLAGS} ${.TARGET}
>> .endif
>>
>> +.if defined(LLVM_LINK)
>> +BCOBJS=		${OBJS:.o=.bco} ${STATICOBJS:.o=.bco}
>> +LLOBJS=		${OBJS:.o=.llo} ${STATICOBJS:.o=.llo}
>
> But apparently you already used those suffixes here.

Yup, because of the "object file" analogy.


>> -.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .ln .s .S .asm
>> +.SUFFIXES: .out .o .bc .c .cc .cpp .cxx .C .m .y .l .ll .ln .s .S .asm
>
> But not here, these should also be changed.  Sorry for any confusion.

The .bco and .llo suffixes should already be included because of bsd.suffixes-posix.mk (included from sys.mk). This SUFFIXES change, on the other hand, is to add the .ll and .bc suffixes for the final build products (IR "binaries" and "libraries").

I hope this clears up any confusion,


Jon
--
Jonathan Anderson
jonathan at FreeBSD.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20161102/de448187/attachment.sig>


More information about the svn-src-all mailing list