* Let gmake to find files in BUILDLINK_DIR
* honor PTHREAD_* flags. * Pass CFLAGS/LDFLAGS to make PR 46445, patch-aa is regenerated.
This commit is contained in:
parent
8716a755d2
commit
e16fd2ca99
3 changed files with 32 additions and 27 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.35 2012/05/26 02:46:02 obache Exp $
|
||||
# $NetBSD: Makefile,v 1.36 2012/05/26 08:50:53 obache Exp $
|
||||
#
|
||||
|
||||
DISTNAME= simhv39-0
|
||||
|
@ -28,6 +28,9 @@ BUILDLINK_TRANSFORM+= rm:-O2
|
|||
INSTALLATION_DIRS= bin share/simh share/doc/simh
|
||||
|
||||
MAKE_FILE= makefile
|
||||
MAKE_ENV+= BUILDLINK_DIR=${BUILDLINK_DIR:Q}
|
||||
MAKE_ENV+= GCC=${CC:Q}
|
||||
MAKE_ENV+= OS_LDFLAGS=${LDFLAGS:Q} CFLAGS_O=${CFLAGS:Q}
|
||||
|
||||
post-extract:
|
||||
${MKDIR} ${WRKSRC}/BIN
|
||||
|
@ -44,4 +47,5 @@ do-install:
|
|||
done)
|
||||
|
||||
.include "../../net/libpcap/buildlink3.mk"
|
||||
.include "../../mk/pthread.buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.17 2012/05/04 09:38:23 hans Exp $
|
||||
$NetBSD: distinfo,v 1.18 2012/05/26 08:50:53 obache Exp $
|
||||
|
||||
SHA1 (simhv39-0.zip) = 1de3938f0dcb51d55b0e53aea8ae9769ccc57bdb
|
||||
RMD160 (simhv39-0.zip) = a464e7d1fc6d58dd23a3ef623c3c018d5d60b050
|
||||
Size (simhv39-0.zip) = 3103657 bytes
|
||||
SHA1 (patch-aa) = c2f9eda37314040fd4405d9d04567bc5023d42fa
|
||||
SHA1 (patch-ab) = c82bb9a1ca5f149e994e1894a1753a99bccdec89
|
||||
SHA1 (patch-ac) = 16673f3bb5c42cdfd0497cd1f0657cbbe3bbecdb
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
$NetBSD: patch-aa,v 1.9 2010/05/28 13:21:26 tsutsui Exp $
|
||||
$NetBSD: patch-aa,v 1.10 2012/05/26 08:50:53 obache Exp $
|
||||
|
||||
--- makefile.orig 2008-11-19 12:53:48.000000000 +0000
|
||||
--- makefile.orig 2012-04-23 07:28:04.000000000 +0000
|
||||
+++ makefile
|
||||
@@ -5,17 +5,17 @@
|
||||
#Unix Environments
|
||||
ifneq (,$(findstring solaris,$(OSTYPE)))
|
||||
OS_CCDEFS = -lm -lsocket -lnsl -lrt -lpthread -D_GNU_SOURCE
|
||||
+ else ifneq (,$(findstring darwin,$(OSTYPE)))
|
||||
+ OS_CCDEFS = -D_GNU_SOURCE
|
||||
+ else ifneq (,$(findstring linux,$(OSTYPE)))
|
||||
+ OS_CCDEFS = -lrt -lm -D_GNU_SOURCE
|
||||
else
|
||||
- ifneq (,$(findstring darwin,$(OSTYPE)))
|
||||
- OS_CCDEFS = -D_GNU_SOURCE
|
||||
- else
|
||||
- OS_CCDEFS = -lrt -lm -D_GNU_SOURCE
|
||||
- endif
|
||||
+ OS_CCDEFS = -lm -D_GNU_SOURCE
|
||||
@@ -72,8 +72,8 @@ ifeq ($(WIN32),) #*nix Environments (&&
|
||||
endif
|
||||
OS_LDFLAGS = -lm
|
||||
else # Non-Android Builds
|
||||
- INCPATH:=/usr/include
|
||||
- LIBPATH:=/usr/lib
|
||||
+ INCPATH:=${BUILDLINK_DIR}/include /usr/include
|
||||
+ LIBPATH:=${BUILDLINK_DIR}/lib /usr/lib
|
||||
OS_CCDEFS = -D_GNU_SOURCE
|
||||
GCC_OPTIMIZERS_CMD = $(GCC) -v --help 2>&1
|
||||
GCC_WARNINGS_CMD = $(GCC) -v --help 2>&1
|
||||
@@ -141,11 +141,11 @@ ifeq ($(WIN32),) #*nix Environments (&&
|
||||
endif
|
||||
- CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I .
|
||||
+ CC = gcc -std=c99 -U__STRICT_ANSI__ -g -O2 $(OS_CCDEFS) -I .
|
||||
ifeq ($(USE_NETWORK),)
|
||||
else
|
||||
- NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a
|
||||
+ NETWORK_OPT = -DUSE_NETWORK -lpcap
|
||||
ifneq (,$(call find_lib,pthread))
|
||||
ifneq (,$(call find_include,pthread))
|
||||
- OS_CCDEFS += -DUSE_READER_THREAD
|
||||
+ OS_CCDEFS += -DUSE_READER_THREAD ${PTHREAD_CFLAGS}
|
||||
ifeq (,$(NOASYNCH))
|
||||
OS_CCDEFS += -DSIM_ASYNCH_IO
|
||||
endif
|
||||
- OS_LDFLAGS += -lpthread
|
||||
+ OS_LDFLAGS += ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
|
||||
$(info using libpthread: $(call find_lib,pthread) $(call find_include,pthread))
|
||||
endif
|
||||
endif
|
||||
else
|
||||
#Win32 Environments
|
||||
|
|
Loading…
Reference in a new issue