pkgsrc/lang/mpd/patches/patch-at
2015-12-29 23:34:43 +00:00

41 lines
1.1 KiB
Text

$NetBSD: patch-at,v 1.2 2015/12/29 23:34:52 dholland Exp $
Build with optimization.
Hardwire asm.o to be built from the netbsd context switch code.
Link in a static copy of libpthread.
XXX: The logic here should probably be revisited.
--- csw/Makefile.orig 1999-07-30 05:01:50.000000000 +0000
+++ csw/Makefile
@@ -1,6 +1,6 @@
## Makefile for the MPD context switch routines.
-CFLAGS = -g
+CFLAGS = -O3
SHELL = /bin/sh
SRC = alpha.s ap3000.s bobcat.s encore.s i386.s m68k.s m88k.s mips.s \
@@ -27,19 +27,15 @@ cstest: cstest.o asm.o
# csloop is a timing program, built only on request
csloop: csloop.o asm.o
- . ../paths.sh; $(CC) -O -o csloop csloop.o asm.o $$LIBR $$LIBC
+ . ../paths.sh; $(CC) -g -o csloop csloop.o asm.o $$LIBR $$LIBC
csloop.o: csloop.c
$(CC) -O -c csloop.c
-# asm.o holds the actual context switch code
-
-asm.o: asm.c ../arch.h $(SRC)
- $(CC) $(CFLAGS) -E asm.c | \
- sed -e '/^ *$$/d' -e '/^#/'d -e 's/ :/:/' >asm.s
- as -o asm.o asm.s
-
+asm.o: netbsd.c
+ $(CC) $(CFLAGS) -c netbsd.c
+ $(LD) -r -o asm.o netbsd.o /usr/lib/libpthread.a
# miscellaneous utility targets