Index: head/devel/flang/Makefile =================================================================== --- head/devel/flang/Makefile (revision 515075) +++ head/devel/flang/Makefile (revision 515076) @@ -1,55 +1,54 @@ # Created by: Johannes M Dieterich # $FreeBSD$ PORTNAME= flang -DISTVERSION= 6.0-g20180904 -PORTREVISION= 4 +DISTVERSION= 7.0-g20191020 CATEGORIES= devel MAINTAINER= jmd@FreeBSD.org COMMENT= Fortran compiler targeting LLVM LICENSE= APACHE20 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} \ flang-clang>=0:devel/flang-clang LIB_DEPENDS= libpgmath.so:math/libpgmath USES= cmake:noninja compiler:c++11-lib libedit perl5 tar:xz \ shebangfix _USES_PYTHON?= python:build USES+= ${_USES_PYTHON} 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++ \ -DCMAKE_C_COMPILER=${LOCALBASE}/flang/bin/clang \ -DCMAKE_Fortran_COMPILER=${LOCALBASE}/flang/bin/flang \ -DFLANG_LIBOMP=${LOCALBASE}/llvm${LLVM_VER}/lib/libomp.so \ -DLIBPGMATH="${LOCALBASE}/lib/libpgmath.a" \ -WWITH_ERROR=OFF CMAKE_INSTALL_PREFIX= ${PREFIX}/flang MAKE_JOBS_UNSAFE= yes OPTIONS_DEFINE= TESTS TESTS_DESC= build unit tests for flang TESTS_CMAKE_BOOL= FLANG_INCLUDE_TESTS post-patch: @${CP} -r ${WRKSRC}/tools/flang2/flang2exe/x86_64-Linux ${WRKSRC}/tools/flang2/flang2exe/x86_64-FreeBSD .include Index: head/devel/flang/distinfo =================================================================== --- head/devel/flang/distinfo (revision 515075) +++ head/devel/flang/distinfo (revision 515076) @@ -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 Index: head/devel/flang/files/patch-runtime_flang_CMakeLists.txt =================================================================== --- head/devel/flang/files/patch-runtime_flang_CMakeLists.txt (revision 515075) +++ head/devel/flang/files/patch-runtime_flang_CMakeLists.txt (revision 515076) @@ -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 Index: head/devel/flang/files/patch-runtime_flangrti_iostdinit.c =================================================================== --- head/devel/flang/files/patch-runtime_flangrti_iostdinit.c (revision 515075) +++ head/devel/flang/files/patch-runtime_flangrti_iostdinit.c (revision 515076) @@ -1,28 +1,28 @@ ---- 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) { - return (((FILE *)fp)->_fileno); + return (((FILE *)fp)->_file); } /* 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 -#elif !defined(DEC) && !defined(IBM) && !defined(ST100_V1_2) && !defined(OSX86) /* !defined(WINNT) */ +#elif !defined(DEC) && !defined(IBM) && !defined(ST100_V1_2) && !defined(OSX86) && !defined(__FreeBSD__) /* !defined(WINNT) */ extern time_t timezone; /* for the rest */ #endif int __io_timezone(void *tm) { -#if defined(SUN4) || defined(PPC) || defined(OSX86) +#if defined(SUN4) || defined(PPC) || defined(OSX86) || defined(__FreeBSD__) return ((struct tm *)tm)->tm_gmtoff; #elif defined(WINNT) || defined(WIN64) || defined(WIN32) return (0); Index: head/devel/flang/files/patch-runtime_flangrti_mpmalloc.c =================================================================== --- head/devel/flang/files/patch-runtime_flangrti_mpmalloc.c (nonexistent) +++ head/devel/flang/files/patch-runtime_flangrti_mpmalloc.c (revision 515076) @@ -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 + #endif + Property changes on: head/devel/flang/files/patch-runtime_flangrti_mpmalloc.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/flang/files/patch-runtime_flangrti_trace__lin.c =================================================================== --- head/devel/flang/files/patch-runtime_flangrti_trace__lin.c (revision 515075) +++ head/devel/flang/files/patch-runtime_flangrti_trace__lin.c (revision 515076) @@ -1,20 +1,29 @@ ---- 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 + #include + #include +-#include ++#include + #include + + /* codes and strings for signals */ +@@ -92,7 +92,7 @@ static struct sigs sigs[] = { {0, CODNULL, NULL} /* end of list */ }; -static gregset_t *regs; /* pointer to regs at signal */ +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; - if (regs != (gregset_t *)0) { + if (regs != (void *)0) { dumpregs(regs); } Index: head/devel/flang/files/patch-runtime_flangrti_x86__64-Linux_dumpregs.c =================================================================== --- head/devel/flang/files/patch-runtime_flangrti_x86__64-Linux_dumpregs.c (revision 515075) +++ head/devel/flang/files/patch-runtime_flangrti_x86__64-Linux_dumpregs.c (revision 515076) @@ -1,11 +1,11 @@ ---- 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 -#if defined(TARGET_OSX) || defined(TARGET_WIN) +#if defined(TARGET_OSX) || defined(TARGET_WIN) || defined(__FreeBSD__) /* no gregs and/or ucontext defined in for OSX or Windows */ void * getRegs(void *u) Index: head/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt =================================================================== --- head/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt (revision 515075) +++ head/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt (revision 515076) @@ -1,11 +1,11 @@ ---- 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} - ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_ARCHITECTURE}-${TARGET_OS} + ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_ARCHITECTURE}-Linux ${UTILS_SYMTAB_BIN_DIR} # Symbol table headers ${UTILS_ILI_BIN_DIR} # ILI IR headers ${UTILS_ILM_BIN_DIR} # ILM IR headers Index: head/devel/flang/pkg-plist =================================================================== --- head/devel/flang/pkg-plist (revision 515075) +++ head/devel/flang/pkg-plist (revision 515076) @@ -1,21 +1,24 @@ 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 flang/include/ieee_exceptions_la.mod flang/include/ieee_features.mod flang/include/iso_c_binding.mod flang/include/iso_fortran_env.mod flang/include/omp_lib.h flang/include/omp_lib.mod flang/include/omp_lib_kinds.mod flang/lib/libflang.a flang/lib/libflang.so flang/lib/libflangADT.a flang/lib/libflangArgParser.a flang/lib/libflangmain.a flang/lib/libflangrti.a flang/lib/libflangrti.so flang/lib/libompstub.a flang/lib/libompstub.so +libdata/ldconfig/flang