List Info

Thread: Trouble with libc / common makefiles




Trouble with libc / common makefiles
country flaguser name
United States
2008-04-16 14:48:43
I'm trying to disable the asm mem* files in powerpc/string
from being compiled,
and I'm having a bit of trouble with it.

If I modify lib/libc/arch/powerpc/string/Makefile.inc  to do
something like:

.if $ == "evbppc"
SRCS+=  bzero.S ffs.S strlen.S memcmp.c bcopy.c
.else
SRCS+=  bzero.S ffs.S strlen.S memcmp.S bcopy.S memcpy.S
memmove.S
.endif

It still builds bcopy.S.  I've tested that evbppc is set,
because if I add
nonexistent files to that section, it tries to build them
and fails.

Any idea what is wrong here?  Is there any way to disable
these from being
built short of deleting them?

---
Tim Rightnour <rootgarbled.net>
NetBSD: Free multi-architecture OS http://www.netbsd.org/
Genecys: Open Source 3D MMORPG: http://www.genecys.org/

Re: Trouble with libc / common makefiles
country flaguser name
South Africa
2008-04-17 03:12:05
On Thu, 17 Apr 2008, Valeriy E. Ushakov wrote:
> I guess you are tricked by the suffix rules.  Iirc,
SRCS itself is not
> used except to generate OBJS, at that point your OBJS
contains bcopy.o
> and you have both bcopy.S and bcopy.c in path.  For
whatever reason .S
> wins (comes earlier .SUFFIXES, probably).

In that case, something like this might fix it:

	.if whatever
	# Require bcopy.o to be built from bcopy.c (not from
bcopy.S),
	# but still rely on the builtin ".c.o" rules for
the details.
	bcopy.o: bcopy.c
	.endif

--apb (Alan Barrett)

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )