devel/flang: update to the latest upstream snapshot

OpenMP now works in my tests.
This commit is contained in:
Johannes M Dieterich 2019-10-21 00:23:17 +00:00
parent f8313ee80b
commit acd34c008f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=515076
9 changed files with 49 additions and 36 deletions

View File

@ -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++ \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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}

View File

@ -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