Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fix for kern/51772 breaks linking multi-config kernels?



In article <20170104195823.GD26839@HOME>,
Yorick Hardy  <yorickhardy%gmail.com@localhost> wrote:
>Dear Martin,
>
>On 2017-01-04, Martin Husemann wrote:
>> Can't you just use swap${.TARGET}.c instead of the wildcard?
>> 
>> Martin
>
>I don't think so, because then we pickup more than one swap*.o
>when linking (and redefinition of symbols).
>
>Or did I misunderstand? (I assumed you meant swap${.TARGET}.o).
>
>I think I have a working patch, but I think we can do better (i.e. less
>assumptions about filenames):
>
>Index: sys/conf/Makefile.kern.inc
>===================================================================
>RCS file: /cvsroot/src/sys/conf/Makefile.kern.inc,v
>retrieving revision 1.251
>diff -u -r1.251 Makefile.kern.inc
>--- sys/conf/Makefile.kern.inc	4 Jan 2017 15:43:04 -0000	1.251
>+++ sys/conf/Makefile.kern.inc	4 Jan 2017 18:12:27 -0000
>@@ -213,10 +213,10 @@
> SYSTEM_LD?=	${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
> 		${_MKSHECHO}\
> 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
>-		'$${SYSTEM_OBJ:N*swap*${.TARGET}*}' '$${EXTRA_OBJ}' vers.o \
>+		'$${SYSTEM_OBJ:Nswap*}' '$${EXTRA_OBJ}' vers.o \
> 		${OBJS:M*swap${.TARGET}.o}; \
> 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
>-		${SYSTEM_OBJ:N*swap*${.TARGET}*} ${EXTRA_OBJ} vers.o \
>+		${SYSTEM_OBJ:Nswap*} ${EXTRA_OBJ} vers.o \
> 		${OBJS:M*swap${.TARGET}.o}
> 

I thought we wanted to match the M and N modifiers so we select and deselect
the same files?

christos



Home | Main Index | Thread Index | Old Index