Update to r65948.

Add printf0 support. [1]

Install the clang C headers (excluding std*.h since we have our own) now
that the installer puts them somewhere sane.

Submitted by:	ed
This commit is contained in:
Brooks Davis 2009-03-03 18:12:02 +00:00
parent 720437ee48
commit 45e5bc018a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=229434
7 changed files with 61 additions and 22 deletions

View file

@ -7,7 +7,6 @@
PORTNAME= llvm
DISTVERSION= 2.6.r${SVN_REV}
PORTREVISION= 1
CATEGORIES= devel lang
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= brooks
@ -26,7 +25,7 @@ BUILD_DEPENDS+= f2c:${PORTSDIR}/lang/f2c
.if defined(BOOTSTRAP)
SVN_REV!= svn info http://llvm.org/svn/llvm-project/ | grep Revision | cut -d' ' -f2
.else
SVN_REV= 65789
SVN_REV= 65948
.endif
GNU_CONFIGURE= yes
@ -118,7 +117,8 @@ build-plist:
cd ${PREFIX} && \
(ls ${MANUAL_BINS} bin/llvm* bin/ccclib/* ${MANUAL_LIBS} \
lib/LLVM* lib/libLLVM* lib/plugin_llvm* lib/libclang* ; \
${FIND} include/llvm-c -type f; ${FIND} include/llvm -type f) | \
${FIND} include/llvm-c -type f; ${FIND} include/llvm lib/clang \
-type f) | \
${SORT} >> ${PLIST}
${FIND} ${DATADIR} -type f | ${SORT} | \
${SED} -e 's|${DATADIR}|%%DATADIR%%|' >> ${PLIST}

View file

@ -1,3 +1,3 @@
MD5 (llvm-2.6.r65789.tar.bz2) = a7f60281ca6cd1e8a3ff3297c17466e8
SHA256 (llvm-2.6.r65789.tar.bz2) = 289ea550e253ecbb10d4ba088a1634edee92e3f6088cc0d37aca58f44eb144c2
SIZE (llvm-2.6.r65789.tar.bz2) = 7232241
MD5 (llvm-2.6.r65948.tar.bz2) = 48c196f89d87a5df3f8405cdf7ba4821
SHA256 (llvm-2.6.r65948.tar.bz2) = c47c1b35d5c42c60e47c5c334ebf1e6ae4f7878ff1f39949d19f841436573913
SIZE (llvm-2.6.r65948.tar.bz2) = 7246621

View file

@ -0,0 +1,14 @@
$FreeBSD$
--- tools/clang/lib/Headers/Makefile.orig
+++ tools/clang/lib/Headers/Makefile
@@ -13,7 +13,7 @@
# FIXME: Get version from a common place.
HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/1.0/include
-HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
+HEADERS := $(filter-out std%.h,$(notdir $(wildcard $(PROJ_SRC_DIR)/*.h)))
OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))

View file

@ -1,14 +0,0 @@
$FreeBSD$
--- tools/clang/lib/Makefile.orig
+++ tools/clang/lib/Makefile
@@ -8,7 +8,7 @@
##===----------------------------------------------------------------------===##
LEVEL = ../../..
-PARALLEL_DIRS = Headers Basic Lex Parse AST Sema CodeGen Analysis Rewrite Driver
+PARALLEL_DIRS = Basic Lex Parse AST Sema CodeGen Analysis Rewrite Driver
include $(LEVEL)/Makefile.common

View file

@ -3,7 +3,16 @@ $FreeBSD$
--- tools/clang/lib/Sema/SemaChecking.cpp.orig
+++ tools/clang/lib/Sema/SemaChecking.cpp
@@ -699,7 +699,6 @@
@@ -142,7 +142,7 @@
// Printf checking.
if (const FormatAttr *Format = FDecl->getAttr<FormatAttr>()) {
- if (Format->getType() == "printf") {
+ if (Format->getType() == "printf" || Format->getType() == "printf0") {
bool HasVAListArg = Format->getFirstArg() == 0;
if (!HasVAListArg) {
if (const FunctionProtoType *Proto
@@ -701,7 +701,6 @@
case 'u':
case 'x':
case 'X':
@ -11,7 +20,7 @@ $FreeBSD$
case 'O':
case 'U':
case 'e':
@@ -715,9 +714,16 @@
@@ -717,9 +716,16 @@
case 'S':
case 's':
case 'p':

View file

@ -0,0 +1,17 @@
$FreeBSD$
--- tools/clang/lib/Sema/SemaDeclAttr.cpp.orig
+++ tools/clang/lib/Sema/SemaDeclAttr.cpp
@@ -1011,7 +1011,10 @@
default: break;
case 5: Supported = !memcmp(Format, "scanf", 5); break;
case 6: Supported = !memcmp(Format, "printf", 6); break;
- case 7: Supported = !memcmp(Format, "strfmon", 7); break;
+ case 7:
+ Supported = (!memcmp(Format, "strfmon", 7) ||
+ !memcmp(Format, "printf0", 7));
+ break;
case 8:
Supported = (is_strftime = !memcmp(Format, "strftime", 8)) ||
(is_NSString = !memcmp(Format, "NSString", 8)) ||

View file

@ -208,6 +208,8 @@ include/llvm/CodeGen/ValueTypes.td
include/llvm/CompilerDriver/Action.h
include/llvm/CompilerDriver/Common.td
include/llvm/CompilerDriver/CompilationGraph.h
include/llvm/CompilerDriver/Error.h
include/llvm/CompilerDriver/Main.inc
include/llvm/CompilerDriver/Plugin.h
include/llvm/CompilerDriver/Tool.h
include/llvm/Config/alloca.h
@ -390,6 +392,16 @@ lib/LLVMSparcCodeGen.o
lib/LLVMX86AsmPrinter.o
lib/LLVMX86CodeGen.o
lib/LLVMXCore.o
lib/clang/1.0/include/emmintrin.h
lib/clang/1.0/include/float.h
lib/clang/1.0/include/iso646.h
lib/clang/1.0/include/limits.h
lib/clang/1.0/include/mm_malloc.h
lib/clang/1.0/include/mmintrin.h
lib/clang/1.0/include/pmmintrin.h
lib/clang/1.0/include/tgmath.h
lib/clang/1.0/include/tmmintrin.h
lib/clang/1.0/include/xmmintrin.h
lib/libLLVMAnalysis.a
lib/libLLVMArchive.a
lib/libLLVMAsmParser.a
@ -416,6 +428,7 @@ lib/libclangAnalysis.a
lib/libclangBasic.a
lib/libclangCodeGen.a
lib/libclangDriver.a
lib/libclangFrontend.a
lib/libclangLex.a
lib/libclangParse.a
lib/libclangRewrite.a