aboutsummaryrefslogtreecommitdiff
path: root/devel/llvm
diff options
context:
space:
mode:
authorHye-Shik Chang <perky@FreeBSD.org>2006-08-08 13:21:16 +0000
committerHye-Shik Chang <perky@FreeBSD.org>2006-08-08 13:21:16 +0000
commit80c18ac72f7dd38687a3786e2feb3d39f167a92e (patch)
tree55756fa1c57d843791fad20d5d6d429e7426c709 /devel/llvm
parent84f007086f5e0fbf8e399f02633bf8e3a3258f01 (diff)
downloadports-80c18ac72f7dd38687a3786e2feb3d39f167a92e.tar.gz
ports-80c18ac72f7dd38687a3786e2feb3d39f167a92e.zip
Notes
Diffstat (limited to 'devel/llvm')
-rw-r--r--devel/llvm/Makefile8
-rw-r--r--devel/llvm/files/patch-include-llvm-Modules.h56
2 files changed, 63 insertions, 1 deletions
diff --git a/devel/llvm/Makefile b/devel/llvm/Makefile
index 33b80054d6f2..7a9c1acb9076 100644
--- a/devel/llvm/Makefile
+++ b/devel/llvm/Makefile
@@ -28,6 +28,12 @@ MAN1= analyze.1 bugpoint.1 gccas.1 gccld.1 llc.1 lli.1 llvm-ar.1 \
llvm-prof.1 llvm-ranlib.1 llvmc.1 llvmgcc.1 llvmgxx.1 \
opt.1 stkrc.1
+.include <bsd.port.pre.mk>
+
+.if ${PERL_LEVEL} < 500800
+BROKEN= does not compile with perl ${PERL_VERSION}
+.endif
+
post-patch:
${REINPLACE_CMD} -e 's,\(OPTIONAL_DIRS.*\)examples,\1,g' \
${WRKSRC}/Makefile
@@ -38,4 +44,4 @@ post-patch:
post-install:
${RM} -f ${PREFIX}/bin/.dir ${PREFIX}/lib/.dir
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/devel/llvm/files/patch-include-llvm-Modules.h b/devel/llvm/files/patch-include-llvm-Modules.h
new file mode 100644
index 000000000000..ff2c1638a42b
--- /dev/null
+++ b/devel/llvm/files/patch-include-llvm-Modules.h
@@ -0,0 +1,56 @@
+--- include/llvm/Module.h.orig Wed Mar 8 18:38:51 2006
++++ include/llvm/Module.h Tue Aug 8 11:26:39 2006
+@@ -24,6 +24,53 @@
+ #include "llvm/ADT/SetVector.h"
+ #include "llvm/Support/DataTypes.h"
+
++// Workarounds for FreeBSD 4
++#include <osreldate.h>
++#if __FreeBSD_version < 500000
++#ifndef INT8_MIN
++#define INT8_MIN (-0x7f-1)
++#endif
++#ifndef INT16_MIN
++#define INT16_MIN (-0x7fff-1)
++#endif
++#ifndef INT32_MIN
++#define INT32_MIN (-0x7fffffff-1)
++#endif
++#ifndef INT64_MIN
++#define INT64_MIN (-0x7fffffffffffffffL-1)
++#endif
++#ifndef INT8_MAX
++#define INT8_MAX 0x7f
++#endif
++#ifndef INT16_MAX
++#define INT16_MAX 0x7fff
++#endif
++#ifndef INT32_MAX
++#define INT32_MAX 0x7fffffff
++#endif
++#ifndef INT64_MAX
++#define INT64_MAX 0x7fffffffffffffffL
++#endif
++#ifndef UINT8_MAX
++#define UINT8_MAX 0xff
++#endif
++#ifndef UINT16_MAX
++#define UINT16_MAX 0xffff
++#endif
++#ifndef UINT32_MAX
++#define UINT32_MAX 0xffffffffU
++#endif
++#ifndef UINT64_MAX
++#define UINT64_MAX 0xffffffffffffffffUL
++#endif
++
++static inline long long
++llabs(long long x)
++{
++ return x > 0 ? x : -x;
++}
++#endif
++
+ namespace llvm {
+
+ class GlobalVariable;