summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes M Dieterich <jmd@FreeBSD.org>2019-10-21 00:23:17 +0000
committerJohannes M Dieterich <jmd@FreeBSD.org>2019-10-21 00:23:17 +0000
commitacd34c008fddcec982950debf27dc6c151ff50e7 (patch)
tree963e34ead6867cc2b74897f0506ad8f0c654b3c7
parentdevel/flang-clang: Update to the lastest llvm7 (diff)
devel/flang: update to the latest upstream snapshot
OpenMP now works in my tests.
-rw-r--r--devel/flang/Makefile7
-rw-r--r--devel/flang/distinfo6
-rw-r--r--devel/flang/files/patch-runtime_flang_CMakeLists.txt27
-rw-r--r--devel/flang/files/patch-runtime_flangrti_iostdinit.c6
-rw-r--r--devel/flang/files/patch-runtime_flangrti_mpmalloc.c11
-rw-r--r--devel/flang/files/patch-runtime_flangrti_trace__lin.c17
-rw-r--r--devel/flang/files/patch-runtime_flangrti_x86__64-Linux_dumpregs.c4
-rw-r--r--devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt4
-rw-r--r--devel/flang/pkg-plist3
9 files changed, 49 insertions, 36 deletions
diff --git a/devel/flang/Makefile b/devel/flang/Makefile
index ef30e0f0c336..e374f0a369e0 100644
--- a/devel/flang/Makefile
+++ b/devel/flang/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= flang
-DISTVERSION= 6.0-g20180904
-PORTREVISION= 4
+DISTVERSION= 7.0-g20191020
CATEGORIES= devel
MAINTAINER= jmd@FreeBSD.org
@@ -14,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
ONLY_FOR_ARCHS= amd64
-LLVM_VER= 60
+LLVM_VER= 70
BUILD_DEPENDS= llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER} \
flang-clang>=0:devel/flang-clang
RUN_DEPENDS= llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER} \
@@ -29,7 +28,7 @@ USE_LDCONFIG= ${PREFIX}/flang/lib
USE_GITHUB= yes
GH_ACCOUNT= flang-compiler
-GH_TAGNAME= 53e368b
+GH_TAGNAME= d07daf3
CMAKE_ARGS+= -DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_VER} \
-DCMAKE_CXX_COMPILER=${LOCALBASE}flang/bin/clang++ \
diff --git a/devel/flang/distinfo b/devel/flang/distinfo
index 8f1386f72aa8..9eaab3b724db 100644
--- a/devel/flang/distinfo
+++ b/devel/flang/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1536093717
-SHA256 (flang-compiler-flang-6.0-g20180904-53e368b_GH0.tar.gz) = e9cf2589c6cbad3ec953f4622ee60f7746c6921518d6905aef0526705d83c888
-SIZE (flang-compiler-flang-6.0-g20180904-53e368b_GH0.tar.gz) = 4603486
+TIMESTAMP = 1571593984
+SHA256 (flang-compiler-flang-7.0-g20191020-d07daf3_GH0.tar.gz) = 24c54eaad89d1bc3a30fd50b5cd4aa5a563ef8377157c246781681297e19a893
+SIZE (flang-compiler-flang-7.0-g20191020-d07daf3_GH0.tar.gz) = 133245436
diff --git a/devel/flang/files/patch-runtime_flang_CMakeLists.txt b/devel/flang/files/patch-runtime_flang_CMakeLists.txt
index d015c490ef53..09b63683b190 100644
--- a/devel/flang/files/patch-runtime_flang_CMakeLists.txt
+++ b/devel/flang/files/patch-runtime_flang_CMakeLists.txt
@@ -1,20 +1,11 @@
---- runtime/flang/CMakeLists.txt.orig 2018-09-04 22:33:13 UTC
+--- runtime/flang/CMakeLists.txt.orig 2019-10-09 20:28:35 UTC
+++ runtime/flang/CMakeLists.txt
-@@ -420,7 +420,7 @@ set(I8_FILES_DIR I8_sources)
- # Fortran files with macros as module names need to be preprocessed.
- add_custom_command(
- OUTPUT "${I8_FILES_DIR}/ieee_arithmetic.F95"
-- COMMAND "${CMAKE_C_COMPILER}" -E
-+ COMMAND "${CMAKE_C_COMPILER}" -E -x c
- "${CMAKE_CURRENT_SOURCE_DIR}/ieee_arithmetic.F95" -DDESC_I8
- > "${I8_FILES_DIR}/ieee_arithmetic.F95"
- COMMENT "Preprocessing ieee_arithmetic.F95"
-@@ -429,7 +429,7 @@ add_custom_command(
+@@ -18,7 +18,7 @@ enable_language(C ASM Fortran) # Enable assembly and F
- add_custom_command(
- OUTPUT "${I8_FILES_DIR}/ieee_exceptions.F95"
-- COMMAND "${CMAKE_C_COMPILER}" -E
-+ COMMAND "${CMAKE_C_COMPILER}" -E -x c
- "${CMAKE_CURRENT_SOURCE_DIR}/ieee_exceptions.F95" -DDESC_I8
- > "${I8_FILES_DIR}/ieee_exceptions.F95"
- COMMENT "Preprocessing ieee_exceptions.F95"
+ SET(ASM_OPTIONS "-DLINUX_ELF")
+ SET(CMAKE_ASM_FLAGS "${CFLAGS} ${ASM_OPTIONS}" )
+-SET(CMAKE_SHARED_LINKER_FLAGS "-no-flang-libs")
++SET(CMAKE_SHARED_LINKER_FLAGS "-no-flang-libs -L/usr/lib")
+
+ # We are using Fortran driver to build this library with fresh compiler
+ # components, so point its binary directory to the build directory to pick up
diff --git a/devel/flang/files/patch-runtime_flangrti_iostdinit.c b/devel/flang/files/patch-runtime_flangrti_iostdinit.c
index d1b8bebbc3ac..c36429a28f0b 100644
--- a/devel/flang/files/patch-runtime_flangrti_iostdinit.c
+++ b/devel/flang/files/patch-runtime_flangrti_iostdinit.c
@@ -1,6 +1,6 @@
---- runtime/flangrti/iostdinit.c.orig 2017-10-19 11:03:03 UTC
+--- runtime/flangrti/iostdinit.c.orig 2019-10-09 20:28:35 UTC
+++ runtime/flangrti/iostdinit.c
-@@ -160,7 +160,7 @@ __io_ferror(void *p)
+@@ -163,7 +163,7 @@ __io_ferror(void *p)
int
__io_getfd(void *fp)
{
@@ -9,7 +9,7 @@
}
/* is a tty? */
-@@ -270,14 +270,14 @@ extern long *_imp___timezone_dll; /* for crtdll.dll */
+@@ -273,14 +273,14 @@ extern long *_imp___timezone_dll; /* for crtdll.dll */
#define timezone _timezone /* cygnus, timezone is usually a function */
#endif
diff --git a/devel/flang/files/patch-runtime_flangrti_mpmalloc.c b/devel/flang/files/patch-runtime_flangrti_mpmalloc.c
new file mode 100644
index 000000000000..7047d6388c14
--- /dev/null
+++ b/devel/flang/files/patch-runtime_flangrti_mpmalloc.c
@@ -0,0 +1,11 @@
+--- runtime/flangrti/mpmalloc.c.orig 2019-10-09 20:28:35 UTC
++++ runtime/flangrti/mpmalloc.c
+@@ -17,7 +17,7 @@
+
+ /* mp-safe wrappers for malloc, etc. */
+
+-#ifdef TARGET_LINUX
++#if defined TARGET_LINUX && !defined(__FreeBSD__)
+ #include <features.h>
+ #endif
+
diff --git a/devel/flang/files/patch-runtime_flangrti_trace__lin.c b/devel/flang/files/patch-runtime_flangrti_trace__lin.c
index 637f590959d9..fa886d6fd5e5 100644
--- a/devel/flang/files/patch-runtime_flangrti_trace__lin.c
+++ b/devel/flang/files/patch-runtime_flangrti_trace__lin.c
@@ -1,6 +1,15 @@
---- runtime/flangrti/trace_lin.c.orig 2018-09-03 06:03:48 UTC
+--- runtime/flangrti/trace_lin.c.orig 2019-10-09 20:28:35 UTC
+++ runtime/flangrti/trace_lin.c
-@@ -87,7 +87,7 @@ static struct sigs sigs[] = {
+@@ -25,7 +25,7 @@
+ #include <string.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <linux/limits.h>
++#include <limits.h>
+ #include <inttypes.h>
+
+ /* codes and strings for signals */
+@@ -92,7 +92,7 @@ static struct sigs sigs[] = {
{0, CODNULL, NULL} /* end of list */
};
@@ -8,8 +17,8 @@
+static void *regs; /* pointer to regs at signal */
extern char **__io_get_argv();
- static char ** saved_argv;
-@@ -143,7 +143,7 @@ __abort_trace(int skip)
+ static char ** saved_argv = NULL;
+@@ -182,7 +182,7 @@ __abort_trace(int skip)
char **strings;
size_t i;
diff --git a/devel/flang/files/patch-runtime_flangrti_x86__64-Linux_dumpregs.c b/devel/flang/files/patch-runtime_flangrti_x86__64-Linux_dumpregs.c
index 25663e437b48..3252ebc55dbe 100644
--- a/devel/flang/files/patch-runtime_flangrti_x86__64-Linux_dumpregs.c
+++ b/devel/flang/files/patch-runtime_flangrti_x86__64-Linux_dumpregs.c
@@ -1,6 +1,6 @@
---- runtime/flangrti/x86_64-Linux/dumpregs.c.orig 2017-10-19 11:03:03 UTC
+--- runtime/flangrti/x86_64-Linux/dumpregs.c.orig 2019-10-09 20:28:35 UTC
+++ runtime/flangrti/x86_64-Linux/dumpregs.c
-@@ -40,7 +40,7 @@
+@@ -42,7 +42,7 @@
#define RSP 15
#define RIP 16
diff --git a/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt b/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt
index 0649b4afa889..6a8d72a406ac 100644
--- a/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt
+++ b/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt
@@ -1,6 +1,6 @@
---- tools/flang2/flang2exe/CMakeLists.txt.orig 2018-09-04 22:25:18 UTC
+--- tools/flang2/flang2exe/CMakeLists.txt.orig 2019-10-09 20:28:35 UTC
+++ tools/flang2/flang2exe/CMakeLists.txt
-@@ -101,7 +101,7 @@ set(INCLUDE_DIRS
+@@ -98,7 +98,7 @@ set(INCLUDE_DIRS
${FLANG_SOURCE_DIR}/lib/scutil
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
diff --git a/devel/flang/pkg-plist b/devel/flang/pkg-plist
index 5f27fe163212..6dac786420a5 100644
--- a/devel/flang/pkg-plist
+++ b/devel/flang/pkg-plist
@@ -1,5 +1,7 @@
flang/bin/flang1
flang/bin/flang2
+flang/include/__norm2.mod
+flang/include/__norm2_i8.mod
flang/include/ieee_arithmetic.mod
flang/include/ieee_arithmetic_la.mod
flang/include/ieee_exceptions.mod
@@ -19,3 +21,4 @@ flang/lib/libflangrti.a
flang/lib/libflangrti.so
flang/lib/libompstub.a
flang/lib/libompstub.so
+libdata/ldconfig/flang