diff options
author | tnn <tnn@pkgsrc.org> | 2015-03-04 09:59:57 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2015-03-04 09:59:57 +0000 |
commit | b47ca70b2a0c87d3a3a6c7111afce220497ff983 (patch) | |
tree | 170039972e7df31fbc3ecd328228cf40582dfd2d /lang/clang | |
parent | 50196da386d0309f116486df6e2590a141d6770b (diff) | |
download | pkgsrc-b47ca70b2a0c87d3a3a6c7111afce220497ff983.tar.gz |
convert to Makefile.common-style package so libLLVM can reference this
Diffstat (limited to 'lang/clang')
-rw-r--r-- | lang/clang/Makefile | 99 | ||||
-rw-r--r-- | lang/clang/Makefile.common | 101 | ||||
-rw-r--r-- | lang/clang/PLIST.shlib | 2 |
3 files changed, 105 insertions, 97 deletions
diff --git a/lang/clang/Makefile b/lang/clang/Makefile index 2fda33edb71..60bec320ad1 100644 --- a/lang/clang/Makefile +++ b/lang/clang/Makefile @@ -1,97 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2015/03/03 16:27:33 tnn Exp $ +# $NetBSD: Makefile,v 1.37 2015/03/04 09:59:57 tnn Exp $ -DISTNAME= clang-3.6.0 -CATEGORIES= lang -MASTER_SITES= http://llvm.org/releases/${PKGVERSION_NOREV}/ -DISTFILES= llvm-${PKGVERSION_NOREV}.src.tar.xz \ - libcxx-${PKGVERSION_NOREV}.src.tar.xz \ - cfe-${PKGVERSION_NOREV}.src.tar.xz \ - compiler-rt-${PKGVERSION_NOREV}.src.tar.xz - -MAINTAINER= adam.hoka@gmail.com -HOMEPAGE= http://llvm.org/ -COMMENT= Low Level Virtual Machine compiler infrastructure -LICENSE= modified-bsd - -WRKSRC= ${WRKDIR}/llvm-${PKGVERSION_NOREV}.src - -USE_LANGUAGES= c c++ -USE_TOOLS+= chown gmake groff pod2html pod2man -GCC_REQD+= 4.7 4.8 -GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --disable-assertions -CONFIGURE_ARGS+= --disable-bindings # disable OCaml -CONFIGURE_ARGS+= --disable-timestamps -CONFIGURE_ARGS+= --enable-optimized - -MAKE_DIRS+= etc/llvm - -INSTALLATION_DIRS= bin lib libexec - -CHECK_PORTABILITY_SKIP= utils/buildit/build_llvm - -TEST_TARGET= check unittests - -.include "../../mk/bsd.prefs.mk" - -.if ${_OPSYS_SHLIB_TYPE} == "dylib" -PLIST_SUBST+= SOEXT="dylib" -.else -PLIST_SUBST+= SOEXT="so" -.endif - -.include "../../mk/compiler.mk" - -.if ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc) -# This should probably be in hacks, but since clang hardcodes gcc paths -# put this here so it can be removed when clang matures. -# cxa_finalize.o is no longer necessary with libc.so >= ILLUMOS_0.5 -TEST_ILLUMOS_3849!=\ - if /usr/bin/elfdump -v /lib/libc.so | \ - ${GREP} -q 'ILLUMOS_0.5' ; then ${ECHO} 1; \ - else ${ECHO} 0; \ - fi - -#doesn't seem to be needed anymore, but may be dependent on -#a recent version of solaris (illumos) ld. -# -#CFLAGS.SunOS+= -mimpure-text - -SUBST_CLASSES+= fix-paths -SUBST_STAGE.fix-paths= pre-configure -SUBST_MESSAGE.fix-paths= Fixing absolute gcc paths for SunOS. -SUBST_FILES.fix-paths= tools/clang/lib/Driver/Tools.cpp -. if defined(_GCC_ARCHDIR) -SUBST_SED.fix-paths= -e 's,/usr/gcc/4.5/lib/gcc/,${_GCC_ARCHDIR}/,g' -. else -LIBGCCDIR!= ${CC} -print-libgcc-file-name -ARCHDIR:= ${LIBGCCDIR:H} -SUBST_SED.fix-paths= -e 's,/usr/gcc/4.5/lib/gcc/,${ARCHDIR}/,g' -. endif -SUBST_SED.fix-paths+= -e '/^.*i386.*getVendorName.*$$/{d;}' -SUBST_SED.fix-paths+= -e '/^.*GCCLibPath +=$$/d' -SUBST_SED.fix-paths+= -e 's,/4.5.2/amd64/,amd64/,g' -SUBST_SED.fix-paths+= -e 's,"as","gas",g' -. if exists(/usr/bin/ld) -SUBST_SED.fix-paths+= -e 's,getToolChain().GetProgramPath("ld"),"/usr/bin/ld",g' -. else -SUBST_SED.fix-paths+= -e 's,getToolChain().GetProgramPath("ld"),"/usr/ccs/bin/ld",g' -. endif -. if ${TEST_ILLUMOS_3849} -SUBST_SED.fix-paths+= -e 's,^.*cxa_finalize.*$$, ; //cxa_finalize.o,g' -. endif -.endif - -.include "options.mk" - -post-extract: - mv ${WRKDIR}/libcxx-${PKGVERSION_NOREV}.src ${WRKSRC}/projects/libcxx - mv ${WRKDIR}/compiler-rt-${PKGVERSION_NOREV}.src ${WRKSRC}/projects/compiler-rt - mv ${WRKDIR}/cfe-${PKGVERSION_NOREV}.src ${WRKSRC}/tools/clang -.if ${OPSYS} == "SunOS" - ${ECHO} "int sun_ld_needs_a_symbol=0;" >> ${WRKSRC}/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.cpp -.endif - -.include "../../lang/python/tool.mk" -.include "../../textproc/libxml2/buildlink3.mk" -.include "../../mk/bsd.pkg.mk" +.include "../../lang/clang/options.mk" +.include "../../lang/clang/Makefile.common" diff --git a/lang/clang/Makefile.common b/lang/clang/Makefile.common new file mode 100644 index 00000000000..30ba2df624a --- /dev/null +++ b/lang/clang/Makefile.common @@ -0,0 +1,101 @@ +# $NetBSD: Makefile.common,v 1.1 2015/03/04 09:59:57 tnn Exp $ +# +# used by lang/clang/Makefile +# used by lang/libLLVM/Makefile + +DISTNAME= clang-3.6.0 +CATEGORIES= lang +MASTER_SITES= http://llvm.org/releases/${PKGVERSION_NOREV}/ +DISTFILES= llvm-${PKGVERSION_NOREV}.src.tar.xz \ + libcxx-${PKGVERSION_NOREV}.src.tar.xz \ + cfe-${PKGVERSION_NOREV}.src.tar.xz \ + compiler-rt-${PKGVERSION_NOREV}.src.tar.xz + +MAINTAINER= adam.hoka@gmail.com +HOMEPAGE= http://llvm.org/ +COMMENT= Low Level Virtual Machine compiler infrastructure +LICENSE= modified-bsd + +WRKSRC= ${WRKDIR}/llvm-${PKGVERSION_NOREV}.src + +USE_LANGUAGES= c c++ +USE_TOOLS+= chown gmake groff pod2html pod2man +GCC_REQD+= 4.7 4.8 +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --disable-assertions +CONFIGURE_ARGS+= --disable-bindings # disable OCaml +CONFIGURE_ARGS+= --disable-timestamps +CONFIGURE_ARGS+= --enable-optimized + +MAKE_DIRS+= etc/llvm + +INSTALLATION_DIRS= bin lib libexec + +CHECK_PORTABILITY_SKIP= utils/buildit/build_llvm + +TEST_TARGET= check unittests + +DISTINFO_FILE= ${.CURDIR}/../../lang/clang/distinfo +PATCHDIR= ${.CURDIR}/../../lang/clang/patches + +.include "../../mk/bsd.prefs.mk" + +.if ${_OPSYS_SHLIB_TYPE} == "dylib" +PLIST_SUBST+= SOEXT="dylib" +.else +PLIST_SUBST+= SOEXT="so" +.endif + +.include "../../mk/compiler.mk" + +.if ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc) +# This should probably be in hacks, but since clang hardcodes gcc paths +# put this here so it can be removed when clang matures. +# cxa_finalize.o is no longer necessary with libc.so >= ILLUMOS_0.5 +TEST_ILLUMOS_3849!=\ + if /usr/bin/elfdump -v /lib/libc.so | \ + ${GREP} -q 'ILLUMOS_0.5' ; then ${ECHO} 1; \ + else ${ECHO} 0; \ + fi + +#doesn't seem to be needed anymore, but may be dependent on +#a recent version of solaris (illumos) ld. +# +#CFLAGS.SunOS+= -mimpure-text + +SUBST_CLASSES+= fix-paths +SUBST_STAGE.fix-paths= pre-configure +SUBST_MESSAGE.fix-paths= Fixing absolute gcc paths for SunOS. +SUBST_FILES.fix-paths= tools/clang/lib/Driver/Tools.cpp +. if defined(_GCC_ARCHDIR) +SUBST_SED.fix-paths= -e 's,/usr/gcc/4.5/lib/gcc/,${_GCC_ARCHDIR}/,g' +. else +LIBGCCDIR!= ${CC} -print-libgcc-file-name +ARCHDIR:= ${LIBGCCDIR:H} +SUBST_SED.fix-paths= -e 's,/usr/gcc/4.5/lib/gcc/,${ARCHDIR}/,g' +. endif +SUBST_SED.fix-paths+= -e '/^.*i386.*getVendorName.*$$/{d;}' +SUBST_SED.fix-paths+= -e '/^.*GCCLibPath +=$$/d' +SUBST_SED.fix-paths+= -e 's,/4.5.2/amd64/,amd64/,g' +SUBST_SED.fix-paths+= -e 's,"as","gas",g' +. if exists(/usr/bin/ld) +SUBST_SED.fix-paths+= -e 's,getToolChain().GetProgramPath("ld"),"/usr/bin/ld",g' +. else +SUBST_SED.fix-paths+= -e 's,getToolChain().GetProgramPath("ld"),"/usr/ccs/bin/ld",g' +. endif +. if ${TEST_ILLUMOS_3849} +SUBST_SED.fix-paths+= -e 's,^.*cxa_finalize.*$$, ; //cxa_finalize.o,g' +. endif +.endif + +post-extract: + mv ${WRKDIR}/libcxx-${PKGVERSION_NOREV}.src ${WRKSRC}/projects/libcxx + mv ${WRKDIR}/compiler-rt-${PKGVERSION_NOREV}.src ${WRKSRC}/projects/compiler-rt + mv ${WRKDIR}/cfe-${PKGVERSION_NOREV}.src ${WRKSRC}/tools/clang +.if ${OPSYS} == "SunOS" + ${ECHO} "int sun_ld_needs_a_symbol=0;" >> ${WRKSRC}/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.cpp +.endif + +.include "../../lang/python/tool.mk" +.include "../../textproc/libxml2/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/lang/clang/PLIST.shlib b/lang/clang/PLIST.shlib index 875cc4f0d74..b9235dd2a0f 100644 --- a/lang/clang/PLIST.shlib +++ b/lang/clang/PLIST.shlib @@ -1,4 +1,4 @@ -@comment $NetBSD@ +@comment $NetBSD: PLIST.shlib,v 1.2 2015/03/04 09:59:57 tnn Exp $ lib/libLLVM-3.6.0.${SOEXT} lib/libLLVM-3.6.${SOEXT} lib/libLLVMAArch64AsmParser.${SOEXT} |