aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Berezin <tobez@FreeBSD.org>2014-12-17 11:15:13 +0000
committerAnton Berezin <tobez@FreeBSD.org>2014-12-17 11:15:13 +0000
commit3375afb87ac257b0153f16b332013e760e34887f (patch)
tree4c86f84ac22140c33a756b337d3feaf8e255b8a6
parentc5fc7b300ce6deaa154a11227548c17ac0575902 (diff)
downloadports-3375afb87ac257b0153f16b332013e760e34887f.tar.gz
ports-3375afb87ac257b0153f16b332013e760e34887f.zip
Notes
-rw-r--r--devel/st/Makefile4
-rw-r--r--devel/st/files/Makefile.main2
-rw-r--r--devel/st/files/patch-md.h22
3 files changed, 25 insertions, 3 deletions
diff --git a/devel/st/Makefile b/devel/st/Makefile
index e2f7a7e36b2a..889580626cf0 100644
--- a/devel/st/Makefile
+++ b/devel/st/Makefile
@@ -3,11 +3,11 @@
PORTNAME= st
PORTVERSION= 1.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= SF/${PORTNAME}ate-threads/${PORTNAME}ate-threads/${PORTVERSION}
-MAINTAINER= lippe@FreeBSD.org
+MAINTAINER= tobez@FreeBSD.org
COMMENT= State Threads Library for Internet Applications
USES= uidfix
diff --git a/devel/st/files/Makefile.main b/devel/st/files/Makefile.main
index d20460abea3a..bac98362edd1 100644
--- a/devel/st/files/Makefile.main
+++ b/devel/st/files/Makefile.main
@@ -9,6 +9,6 @@ LIB= st
NO_PROFILE= yes
SRCS= io.c key.c sched.c stk.c sync.c event.c
-CFLAGS+= -DFREEBSD
+CFLAGS+= -DFREEBSD -DMD_HAVE_KQUEUE
.include <bsd.lib.mk>
diff --git a/devel/st/files/patch-md.h b/devel/st/files/patch-md.h
new file mode 100644
index 000000000000..c423b4501f63
--- /dev/null
+++ b/devel/st/files/patch-md.h
@@ -0,0 +1,22 @@
+--- md.h 2009-10-01 20:46:43.000000000 +0200
++++ md.h 2014-12-16 22:52:34.000000000 +0100
+@@ -161,6 +161,19 @@
+ #define MD_JB_SP 34
+ #elif defined(__amd64__)
+ #define MD_JB_SP 2
++/*
++ * The following comment is taken from src/lib/libc/amd64/gen/makecontext.c
++ * It explains why we specifically break the alignment to 64 byte boundary
++ * that is unconditionally enforced by sched.c, by setting MD_STACK_PAD_SIZE
++ * to this funky value.
++ * Without this, anything using va_start() & friends fails unpredictably.
++ */
++ /*
++ * Account for arguments on stack and do the funky C entry alignment.
++ * This means that we need an 8-byte-odd alignment since the ABI expects
++ * the return address to be pushed, thus breaking the 16 byte alignment.
++ */
++#define MD_STACK_PAD_SIZE 8
+ #else
+ #error Unknown CPU architecture
+ #endif