update llvm to 4.0.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

update llvm to 4.0.0

Robert Nagy
Hi

This diff updates llvm to 4.0.0 in ports. I've also changed the port to
use the official distfiles instead of our own crafted one, because I
prefer it this way.

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/llvm/Makefile,v
retrieving revision 1.137
diff -u -p -u -r1.137 Makefile
--- Makefile 1 Mar 2017 08:55:28 -0000 1.137
+++ Makefile 14 Mar 2017 17:45:37 -0000
@@ -11,16 +11,18 @@ MULTI_PACKAGES = -main -python
 COMMENT-main = modular, fast C/C++/ObjC compiler, static analyzer and tools
 COMMENT-python = Python bindings for Clang
 
-LLVM_V = 4.0.0rc2
+LLVM_V = 4.0.0
 DISTNAME = llvm-${LLVM_V}.src
 PKGNAME = llvm-${LLVM_V}
 PKGNAME-main = llvm-${LLVM_V}
 PKGNAME-python = py-llvm-${LLVM_V}
-REVISION-main = 4
 CATEGORIES = devel
-DISTFILES = llvm-${LLVM_V}.src${EXTRACT_SUFX}
-MASTER_SITES = http://comstyle.com/source/
+DISTFILES = llvm-${LLVM_V}.src${EXTRACT_SUFX} \
+ cfe-${LLVM_V}.src${EXTRACT_SUFX} \
+ lld-${LLVM_V}.src${EXTRACT_SUFX}
+MASTER_SITES = http://releases.llvm.org/${LLVM_V}/
 EXTRACT_SUFX = .tar.xz
+DIST_SUBDIR = llvm
 
 SHARED_LIBS = clang 5.0 \
  LTO 2.0
@@ -86,6 +88,10 @@ GCC_CONFIG = ${MACHINE_ARCH}-unknown-op
 .endif
 CLANG_INCLUDE_PATH = lib/clang/${LLVM_V:S/rc2//}/include
 SUBST_VARS += CLANG_INCLUDE_PATH LLVM_V GCC_VER GCC_CONFIG
+
+post-extract:
+ @mv ${WRKDIR}/cfe-${LLVM_V}.src ${WRKSRC}/tools/clang
+ @mv ${WRKDIR}/lld-${LLVM_V}.src ${WRKSRC}/tools/lld
 
 pre-configure:
  @${SUBST_CMD} ${WRKSRC}/tools/clang/lib/Driver/ToolChains.cpp \
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/llvm/distinfo,v
retrieving revision 1.20
diff -u -p -u -r1.20 distinfo
--- distinfo 10 Feb 2017 09:37:43 -0000 1.20
+++ distinfo 14 Mar 2017 17:45:37 -0000
@@ -1,2 +1,6 @@
-SHA256 (llvm-4.0.0rc2.src.tar.xz) = dPSlLc7j5BTaUNB2sugoQMRRI66n4/PC1WmFyzOrk1g=
-SIZE (llvm-4.0.0rc2.src.tar.xz) = 30756712
+SHA256 (llvm/cfe-4.0.0.src.tar.xz) = zqX4jr3bMOKWyokTDIO51GwtgzaF4pEjA8goBUxNyYo=
+SHA256 (llvm/lld-4.0.0.src.tar.xz) = M+BkV7nOBWPImxHMx8yr+c/3G4NXGYWlv4aEyRUOdQI=
+SHA256 (llvm/llvm-4.0.0.src.tar.xz) = jRBRHfluc7j/nnq7+01NQy7b2+ll8fTwevrzcLilM74=
+SIZE (llvm/cfe-4.0.0.src.tar.xz) = 10900916
+SIZE (llvm/lld-4.0.0.src.tar.xz) = 592728
+SIZE (llvm/llvm-4.0.0.src.tar.xz) = 21016340
Index: patches/patch-tools_clang_lib_Driver_Tools_cpp
===================================================================
RCS file: /cvs/ports/devel/llvm/patches/patch-tools_clang_lib_Driver_Tools_cpp,v
retrieving revision 1.39
diff -u -p -u -r1.39 patch-tools_clang_lib_Driver_Tools_cpp
--- patches/patch-tools_clang_lib_Driver_Tools_cpp 20 Feb 2017 07:04:00 -0000 1.39
+++ patches/patch-tools_clang_lib_Driver_Tools_cpp 14 Mar 2017 17:45:37 -0000
@@ -1,4 +1,4 @@
-$OpenBSD: patch-tools_clang_lib_Driver_Tools_cpp,v 1.39 2017/02/20 07:04:00 ajacoutot Exp $
+$OpenBSD$
 
 - Select proper SPARCv9 variant for the external assembler
 - For now, force soft-float on ARM
@@ -8,8 +8,8 @@ $OpenBSD: patch-tools_clang_lib_Driver_T
 - Always use --eh-frame-hdr on OpenBSD, even for -static
 - Link static PIE programs against rcrt0.o on OpenBSD
 
---- tools/clang/lib/Driver/Tools.cpp.orig Wed Feb  8 20:35:18 2017
-+++ tools/clang/lib/Driver/Tools.cpp Sun Feb 19 17:41:04 2017
+--- tools/clang/lib/Driver/Tools.cpp.orig Tue Feb 21 20:11:22 2017
++++ tools/clang/lib/Driver/Tools.cpp Tue Mar 14 17:35:43 2017
 @@ -79,7 +79,7 @@ static const char *getSparcAsmModeForCPU(StringRef Nam
            .Case("niagara2", "-Av9b")
            .Case("niagara3", "-Av9d")
@@ -101,18 +101,7 @@ $OpenBSD: patch-tools_clang_lib_Driver_T
      CmdArgs.push_back("-Bdynamic");
      if (Args.hasArg(options::OPT_shared)) {
        CmdArgs.push_back("-shared");
-@@ -8937,6 +8950,10 @@ void openbsd::Linker::ConstructJob(Compilation &C, con
-       if (Args.hasArg(options::OPT_pg))
-         CmdArgs.push_back(
-             Args.MakeArgString(getToolChain().GetFilePath("gcrt0.o")));
-+      else if (Args.hasArg(options::OPT_static) &&
-+               !Args.hasArg(options::OPT_nopie))
-+        CmdArgs.push_back(
-+            Args.MakeArgString(getToolChain().GetFilePath("rcrt0.o")));
-       else
-         CmdArgs.push_back(
-             Args.MakeArgString(getToolChain().GetFilePath("crt0.o")));
-@@ -8948,15 +8965,17 @@ void openbsd::Linker::ConstructJob(Compilation &C, con
+@@ -8952,12 +8965,6 @@ void openbsd::Linker::ConstructJob(Compilation &C, con
      }
    }
 
@@ -125,6 +114,21 @@ $OpenBSD: patch-tools_clang_lib_Driver_T
    Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
                              options::OPT_e, options::OPT_s, options::OPT_t,
                              options::OPT_Z_Flag, options::OPT_r});
+@@ -9067,6 +9074,10 @@ void bitrig::Linker::ConstructJob(Compilation &C, cons
+       if (Args.hasArg(options::OPT_pg))
+         CmdArgs.push_back(
+             Args.MakeArgString(getToolChain().GetFilePath("gcrt0.o")));
++      else if (Args.hasArg(options::OPT_static) &&
++               !Args.hasArg(options::OPT_nopie))
++        CmdArgs.push_back(
++            Args.MakeArgString(getToolChain().GetFilePath("rcrt0.o")));
+       else
+         CmdArgs.push_back(
+             Args.MakeArgString(getToolChain().GetFilePath("crt0.o")));
+@@ -9641,6 +9652,14 @@ void netbsd::Linker::ConstructJob(Compilation &C, cons
+   Args.AddAllArgs(CmdArgs, options::OPT_t);
+   Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag);
+   Args.AddAllArgs(CmdArgs, options::OPT_r);
 +
 +  std::string Triple = getToolChain().getTripleString();
 +  if (Triple.substr(0, 5) == "amd64")
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/devel/llvm/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -u -r1.2 PLIST-main
--- pkg/PLIST-main 10 Feb 2017 09:37:43 -0000 1.2
+++ pkg/PLIST-main 14 Mar 2017 17:45:37 -0000
@@ -1255,6 +1255,7 @@ include/llvm/Linker/Linker.h
 include/llvm/MC/
 include/llvm/MC/ConstantPools.h
 include/llvm/MC/LaneBitmask.h
+include/llvm/MC/MCAnalysis/
 include/llvm/MC/MCAsmBackend.h
 include/llvm/MC/MCAsmInfo.h
 include/llvm/MC/MCAsmInfoCOFF.h
@@ -1688,7 +1689,7 @@ include/llvm/XRay/YAMLXRayRecord.h
 lib/BugpointPasses.so
 lib/LLVMHello.so
 lib/clang/
-lib/clang/4.0.0/
+lib/clang/${LLVM_V}/
 ${CLANG_INCLUDE_PATH}/
 ${CLANG_INCLUDE_PATH}/__clang_cuda_builtin_vars.h
 ${CLANG_INCLUDE_PATH}/__clang_cuda_cmath.h

Reply | Threaded
Open this post in threaded view
|

Re: update llvm to 4.0.0

Antoine Jacoutot-7
On March 14, 2017 6:46:17 PM GMT+01:00, Robert Nagy <[hidden email]> wrote:

>Hi
>
>This diff updates llvm to 4.0.0 in ports. I've also changed the port to
>use the official distfiles instead of our own crafted one, because I
>prefer it this way.
>
>Index: Makefile
>===================================================================
>RCS file: /cvs/ports/devel/llvm/Makefile,v
>retrieving revision 1.137
>diff -u -p -u -r1.137 Makefile
>--- Makefile 1 Mar 2017 08:55:28 -0000 1.137
>+++ Makefile 14 Mar 2017 17:45:37 -0000
>@@ -11,16 +11,18 @@ MULTI_PACKAGES = -main -python
>COMMENT-main = modular, fast C/C++/ObjC compiler, static analyzer and
>tools
> COMMENT-python = Python bindings for Clang
>
>-LLVM_V = 4.0.0rc2
>+LLVM_V = 4.0.0
> DISTNAME = llvm-${LLVM_V}.src
> PKGNAME = llvm-${LLVM_V}
> PKGNAME-main = llvm-${LLVM_V}
> PKGNAME-python = py-llvm-${LLVM_V}
>-REVISION-main = 4
> CATEGORIES = devel
>-DISTFILES = llvm-${LLVM_V}.src${EXTRACT_SUFX}
>-MASTER_SITES = http://comstyle.com/source/
>+DISTFILES = llvm-${LLVM_V}.src${EXTRACT_SUFX} \
>+ cfe-${LLVM_V}.src${EXTRACT_SUFX} \
>+ lld-${LLVM_V}.src${EXTRACT_SUFX}
>+MASTER_SITES = http://releases.llvm.org/${LLVM_V}/
> EXTRACT_SUFX = .tar.xz
>+DIST_SUBDIR = llvm
>
> SHARED_LIBS = clang 5.0 \
> LTO 2.0
>@@ -86,6 +88,10 @@ GCC_CONFIG = ${MACHINE_ARCH}-unknown-op
> .endif
> CLANG_INCLUDE_PATH = lib/clang/${LLVM_V:S/rc2//}/include
> SUBST_VARS += CLANG_INCLUDE_PATH LLVM_V GCC_VER GCC_CONFIG
>+
>+post-extract:
>+ @mv ${WRKDIR}/cfe-${LLVM_V}.src ${WRKSRC}/tools/clang
>+ @mv ${WRKDIR}/lld-${LLVM_V}.src ${WRKSRC}/tools/lld
>
> pre-configure:
> @${SUBST_CMD} ${WRKSRC}/tools/clang/lib/Driver/ToolChains.cpp \
>Index: distinfo
>===================================================================
>RCS file: /cvs/ports/devel/llvm/distinfo,v
>retrieving revision 1.20
>diff -u -p -u -r1.20 distinfo
>--- distinfo 10 Feb 2017 09:37:43 -0000 1.20
>+++ distinfo 14 Mar 2017 17:45:37 -0000
>@@ -1,2 +1,6 @@
>-SHA256 (llvm-4.0.0rc2.src.tar.xz) =
>dPSlLc7j5BTaUNB2sugoQMRRI66n4/PC1WmFyzOrk1g=
>-SIZE (llvm-4.0.0rc2.src.tar.xz) = 30756712
>+SHA256 (llvm/cfe-4.0.0.src.tar.xz) =
>zqX4jr3bMOKWyokTDIO51GwtgzaF4pEjA8goBUxNyYo=
>+SHA256 (llvm/lld-4.0.0.src.tar.xz) =
>M+BkV7nOBWPImxHMx8yr+c/3G4NXGYWlv4aEyRUOdQI=
>+SHA256 (llvm/llvm-4.0.0.src.tar.xz) =
>jRBRHfluc7j/nnq7+01NQy7b2+ll8fTwevrzcLilM74=
>+SIZE (llvm/cfe-4.0.0.src.tar.xz) = 10900916
>+SIZE (llvm/lld-4.0.0.src.tar.xz) = 592728
>+SIZE (llvm/llvm-4.0.0.src.tar.xz) = 21016340
>Index: patches/patch-tools_clang_lib_Driver_Tools_cpp
>===================================================================
>RCS file:
>/cvs/ports/devel/llvm/patches/patch-tools_clang_lib_Driver_Tools_cpp,v
>retrieving revision 1.39
>diff -u -p -u -r1.39 patch-tools_clang_lib_Driver_Tools_cpp
>--- patches/patch-tools_clang_lib_Driver_Tools_cpp 20 Feb 2017 07:04:00
>-0000 1.39
>+++ patches/patch-tools_clang_lib_Driver_Tools_cpp 14 Mar 2017 17:45:37
>-0000
>@@ -1,4 +1,4 @@
>-$OpenBSD: patch-tools_clang_lib_Driver_Tools_cpp,v 1.39 2017/02/20
>07:04:00 ajacoutot Exp $
>+$OpenBSD$
>
> - Select proper SPARCv9 variant for the external assembler
> - For now, force soft-float on ARM
>@@ -8,8 +8,8 @@ $OpenBSD: patch-tools_clang_lib_Driver_T
> - Always use --eh-frame-hdr on OpenBSD, even for -static
> - Link static PIE programs against rcrt0.o on OpenBSD
>
>---- tools/clang/lib/Driver/Tools.cpp.orig Wed Feb  8 20:35:18 2017
>-+++ tools/clang/lib/Driver/Tools.cpp Sun Feb 19 17:41:04 2017
>+--- tools/clang/lib/Driver/Tools.cpp.orig Tue Feb 21 20:11:22 2017
>++++ tools/clang/lib/Driver/Tools.cpp Tue Mar 14 17:35:43 2017
>@@ -79,7 +79,7 @@ static const char *getSparcAsmModeForCPU(StringRef
>Nam
>            .Case("niagara2", "-Av9b")
>            .Case("niagara3", "-Av9d")
>@@ -101,18 +101,7 @@ $OpenBSD: patch-tools_clang_lib_Driver_T
>      CmdArgs.push_back("-Bdynamic");
>      if (Args.hasArg(options::OPT_shared)) {
>        CmdArgs.push_back("-shared");
>-@@ -8937,6 +8950,10 @@ void openbsd::Linker::ConstructJob(Compilation
>&C, con
>-       if (Args.hasArg(options::OPT_pg))
>-         CmdArgs.push_back(
>-            
>Args.MakeArgString(getToolChain().GetFilePath("gcrt0.o")));
>-+      else if (Args.hasArg(options::OPT_static) &&
>-+               !Args.hasArg(options::OPT_nopie))
>-+        CmdArgs.push_back(
>-+          
>Args.MakeArgString(getToolChain().GetFilePath("rcrt0.o")));
>-       else
>-         CmdArgs.push_back(
>-            
>Args.MakeArgString(getToolChain().GetFilePath("crt0.o")));
>-@@ -8948,15 +8965,17 @@ void openbsd::Linker::ConstructJob(Compilation
>&C, con
>+@@ -8952,12 +8965,6 @@ void openbsd::Linker::ConstructJob(Compilation
>&C, con
>      }
>    }
>  
>@@ -125,6 +114,21 @@ $OpenBSD: patch-tools_clang_lib_Driver_T
>    Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
>                        options::OPT_e, options::OPT_s, options::OPT_t,
>                              options::OPT_Z_Flag, options::OPT_r});
>+@@ -9067,6 +9074,10 @@ void bitrig::Linker::ConstructJob(Compilation
>&C, cons
>+       if (Args.hasArg(options::OPT_pg))
>+         CmdArgs.push_back(
>+            
>Args.MakeArgString(getToolChain().GetFilePath("gcrt0.o")));
>++      else if (Args.hasArg(options::OPT_static) &&
>++               !Args.hasArg(options::OPT_nopie))
>++        CmdArgs.push_back(
>++          
>Args.MakeArgString(getToolChain().GetFilePath("rcrt0.o")));
>+       else
>+         CmdArgs.push_back(
>+            
>Args.MakeArgString(getToolChain().GetFilePath("crt0.o")));
>+@@ -9641,6 +9652,14 @@ void netbsd::Linker::ConstructJob(Compilation
>&C, cons
>+   Args.AddAllArgs(CmdArgs, options::OPT_t);
>+   Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag);
>+   Args.AddAllArgs(CmdArgs, options::OPT_r);
> +
> +  std::string Triple = getToolChain().getTripleString();
> +  if (Triple.substr(0, 5) == "amd64")
>Index: pkg/PLIST-main
>===================================================================
>RCS file: /cvs/ports/devel/llvm/pkg/PLIST-main,v
>retrieving revision 1.2
>diff -u -p -u -r1.2 PLIST-main
>--- pkg/PLIST-main 10 Feb 2017 09:37:43 -0000 1.2
>+++ pkg/PLIST-main 14 Mar 2017 17:45:37 -0000
>@@ -1255,6 +1255,7 @@ include/llvm/Linker/Linker.h
> include/llvm/MC/
> include/llvm/MC/ConstantPools.h
> include/llvm/MC/LaneBitmask.h
>+include/llvm/MC/MCAnalysis/
> include/llvm/MC/MCAsmBackend.h
> include/llvm/MC/MCAsmInfo.h
> include/llvm/MC/MCAsmInfoCOFF.h
>@@ -1688,7 +1689,7 @@ include/llvm/XRay/YAMLXRayRecord.h
> lib/BugpointPasses.so
> lib/LLVMHello.so
> lib/clang/
>-lib/clang/4.0.0/
>+lib/clang/${LLVM_V}/
> ${CLANG_INCLUDE_PATH}/
> ${CLANG_INCLUDE_PATH}/__clang_cuda_builtin_vars.h
> ${CLANG_INCLUDE_PATH}/__clang_cuda_cmath.h

It's been updated minutes before I got your mail :)
Could you provide a diff to the intree version ?


--
Antoine
Reply | Threaded
Open this post in threaded view
|

Re: update llvm to 4.0.0

Robert Nagy
On (2017-03-14 18:50), Antoine Jacoutot wrote:
> It's been updated minutes before I got your mail :)
> Could you provide a diff to the intree version ?

Haha, sure:

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/llvm/Makefile,v
retrieving revision 1.138
diff -u -p -u -r1.138 Makefile
--- Makefile 14 Mar 2017 17:29:45 -0000 1.138
+++ Makefile 14 Mar 2017 17:56:34 -0000
@@ -20,6 +20,7 @@ CATEGORIES = devel
 DISTFILES = llvm-${LLVM_V}.src${EXTRACT_SUFX} \
  cfe-${LLVM_V}.src${EXTRACT_SUFX} \
  lld-${LLVM_V}.src${EXTRACT_SUFX}
+DIST_SUBDIR = llvm
 MASTER_SITES = http://www.llvm.org/releases/${LLVM_V}/
 EXTRACT_SUFX = .tar.xz
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/llvm/distinfo,v
retrieving revision 1.21
diff -u -p -u -r1.21 distinfo
--- distinfo 14 Mar 2017 17:29:45 -0000 1.21
+++ distinfo 14 Mar 2017 17:56:34 -0000
@@ -1,6 +1,6 @@
-SHA256 (cfe-4.0.0.src.tar.xz) = zqX4jr3bMOKWyokTDIO51GwtgzaF4pEjA8goBUxNyYo=
-SHA256 (lld-4.0.0.src.tar.xz) = M+BkV7nOBWPImxHMx8yr+c/3G4NXGYWlv4aEyRUOdQI=
-SHA256 (llvm-4.0.0.src.tar.xz) = jRBRHfluc7j/nnq7+01NQy7b2+ll8fTwevrzcLilM74=
-SIZE (cfe-4.0.0.src.tar.xz) = 10900916
-SIZE (lld-4.0.0.src.tar.xz) = 592728
-SIZE (llvm-4.0.0.src.tar.xz) = 21016340
+SHA256 (llvm/cfe-4.0.0.src.tar.xz) = zqX4jr3bMOKWyokTDIO51GwtgzaF4pEjA8goBUxNyYo=
+SHA256 (llvm/lld-4.0.0.src.tar.xz) = M+BkV7nOBWPImxHMx8yr+c/3G4NXGYWlv4aEyRUOdQI=
+SHA256 (llvm/llvm-4.0.0.src.tar.xz) = jRBRHfluc7j/nnq7+01NQy7b2+ll8fTwevrzcLilM74=
+SIZE (llvm/cfe-4.0.0.src.tar.xz) = 10900916
+SIZE (llvm/lld-4.0.0.src.tar.xz) = 592728
+SIZE (llvm/llvm-4.0.0.src.tar.xz) = 21016340