diff options
Diffstat (limited to 'devel/flang')
| -rw-r--r-- | devel/flang/Makefile | 27 | ||||
| -rw-r--r-- | devel/flang/distinfo | 6 | ||||
| -rw-r--r-- | devel/flang/files/patch-CMakeLists.txt | 8 | ||||
| -rw-r--r-- | devel/flang/files/patch-runtime_flang_CMakeLists.txt | 20 | ||||
| -rw-r--r-- | devel/flang/files/patch-runtime_flang_cdcos.c | 14 | ||||
| -rw-r--r-- | devel/flang/files/patch-runtime_flang_cdexp.c | 12 | ||||
| -rw-r--r-- | devel/flang/files/patch-runtime_flang_cexp.c | 12 | ||||
| -rw-r--r-- | devel/flang/files/patch-runtime_flangrti_trace__lin.c | 10 | ||||
| -rw-r--r-- | devel/flang/files/patch-runtime_include_mthdecls.h | 29 | ||||
| -rw-r--r-- | devel/flang/files/patch-tools_flang2_CMakeLists.txt | 13 | ||||
| -rw-r--r-- | devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt | 11 | ||||
| -rw-r--r-- | devel/flang/pkg-descr | 2 | ||||
| -rw-r--r-- | devel/flang/pkg-plist | 2 |
13 files changed, 72 insertions, 94 deletions
diff --git a/devel/flang/Makefile b/devel/flang/Makefile index ae730248ccb1..1a31420e1ee2 100644 --- a/devel/flang/Makefile +++ b/devel/flang/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= flang -DISTVERSION= 5.0-20171225 -PORTREVISION= 2 +DISTVERSION= 6.0-g20180904 CATEGORIES= devel MAINTAINER= jmd@FreeBSD.org @@ -12,39 +11,39 @@ COMMENT= Fortran compiler targeting LLVM LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE.txt -BUILD_DEPENDS= llvm50>=0:devel/llvm50 \ +ONLY_FOR_ARCHS= amd64 + +BUILD_DEPENDS= llvm60>=0:devel/llvm60 \ flang-clang>=0:devel/flang-clang -RUN_DEPENDS= llvm50>=0:devel/llvm50 \ +RUN_DEPENDS= llvm60>=0:devel/llvm60 \ flang-clang>=0:devel/flang-clang - -ONLY_FOR_ARCHS= amd64 -ONLY_FOR_ARCHS_REASON_amd64= for now only builds and is supported on amd64 +LIB_DEPENDS= libpgmath.so:math/libpgmath OPTIONS_DEFINE= TESTS TESTS_DESC= build unit tests for flang -USE_LDCONFIG= ${PREFIX}/flang/lib USES= cmake:outsource,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= 64189a1 +GH_TAGNAME= 53e368b -CMAKE_ARGS+= -DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config50 \ +CMAKE_ARGS+= -DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config60 \ -DCMAKE_CXX_COMPILER=${LOCALBASE}flang/bin/clang++ \ -DCMAKE_C_COMPILER=${LOCALBASE}/flang/bin/clang \ -DCMAKE_Fortran_COMPILER=${LOCALBASE}/flang/bin/flang \ - -DFLANG_LIBOMP=${LOCALBASE}/llvm50/lib/libomp.so + -DFLANG_LIBOMP=${LOCALBASE}/llvm60/lib/libomp.so \ + -DLIBPGMATH="${LOCALBASE}/lib/libpgmath.a" \ + -WWITH_ERROR=OFF CMAKE_INSTALL_PREFIX= ${PREFIX}/flang .include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MTESTS} -CMAKE_ARGS+= -DFLANG_INCLUDE_TESTS=ON -.endif +TESTS_CMAKE_ON= FLANG_INCLUDE_TESTS MAKE_JOBS_UNSAFE= yes diff --git a/devel/flang/distinfo b/devel/flang/distinfo index 9a8c848d5d2c..8f1386f72aa8 100644 --- a/devel/flang/distinfo +++ b/devel/flang/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1514225293 -SHA256 (flang-compiler-flang-5.0-20171225-64189a1_GH0.tar.gz) = 7fbb927fffbb110bb0f5cdc1175537bf10f20fec5e7bd562d624529075e1bcab -SIZE (flang-compiler-flang-5.0-20171225-64189a1_GH0.tar.gz) = 3940607 +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 diff --git a/devel/flang/files/patch-CMakeLists.txt b/devel/flang/files/patch-CMakeLists.txt index 784445f72ab8..b5a9de135900 100644 --- a/devel/flang/files/patch-CMakeLists.txt +++ b/devel/flang/files/patch-CMakeLists.txt @@ -1,6 +1,6 @@ ---- CMakeLists.txt.orig 2017-10-19 11:03:03 UTC +--- CMakeLists.txt.orig 2018-09-03 06:03:48 UTC +++ CMakeLists.txt -@@ -51,6 +51,19 @@ if( ${TARGET_OS} STREQUAL "Linux" ) +@@ -49,6 +49,19 @@ if( ${TARGET_OS} STREQUAL "Linux" ) message("Unsupported architecture: ${TARGET_ARCHITECTURE}" ) return() endif() @@ -20,7 +20,7 @@ else() message("Unsupported OS: ${TARGET_OS}" ) return() -@@ -59,7 +72,8 @@ endif() +@@ -57,7 +70,8 @@ endif() # The cmake documentation states that these are set. They are not so we # set them here set(CMAKE_HOST_SYSTEM_NAME ${TARGET_OS}) @@ -30,7 +30,7 @@ # If we are not building as a part of LLVM, build Flang as an # standalone project, using LLVM as an external library: -@@ -296,7 +310,7 @@ endif() +@@ -289,7 +303,7 @@ endif() # Add appropriate flags for GCC if (LLVM_COMPILER_IS_GCC_COMPATIBLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings") diff --git a/devel/flang/files/patch-runtime_flang_CMakeLists.txt b/devel/flang/files/patch-runtime_flang_CMakeLists.txt new file mode 100644 index 000000000000..d015c490ef53 --- /dev/null +++ b/devel/flang/files/patch-runtime_flang_CMakeLists.txt @@ -0,0 +1,20 @@ +--- runtime/flang/CMakeLists.txt.orig 2018-09-04 22:33:13 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( + + 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" diff --git a/devel/flang/files/patch-runtime_flang_cdcos.c b/devel/flang/files/patch-runtime_flang_cdcos.c deleted file mode 100644 index 55a68faf45cd..000000000000 --- a/devel/flang/files/patch-runtime_flang_cdcos.c +++ /dev/null @@ -1,14 +0,0 @@ ---- runtime/flang/cdcos.c.orig 2017-10-23 04:19:13 UTC -+++ runtime/flang/cdcos.c -@@ -25,9 +25,8 @@ ZMPLXFUNC_Z(__mth_i_cdcos) - x = cos(real) * cosh(imag); - y = -sin(real) * sinh(imag); - */ -- // x = cos(real); -- // y = sin(real); -- __mth_dsincos(real, &y, &x); -+ x = cos(real); -+ y = sin(real); - x = x * cosh(imag); - y = -y * sinh(imag); - ZRETURN_D_D(x, y); diff --git a/devel/flang/files/patch-runtime_flang_cdexp.c b/devel/flang/files/patch-runtime_flang_cdexp.c deleted file mode 100644 index 8ada6055078a..000000000000 --- a/devel/flang/files/patch-runtime_flang_cdexp.c +++ /dev/null @@ -1,12 +0,0 @@ ---- runtime/flang/cdexp.c.orig 2017-10-19 11:03:03 UTC -+++ runtime/flang/cdexp.c -@@ -24,7 +24,8 @@ ZMPLXFUNC_Z(__mth_i_cdexp) - ZMPLXARGS_Z; - double x, y, z; - x = exp(real); -- __mth_dsincos(imag, &z, &y); -+ z = sin(imag); -+ y = cos(imag); - y *= x; - z *= x; - ZRETURN_D_D(y, z); /* should leave y & z in appropriate diff --git a/devel/flang/files/patch-runtime_flang_cexp.c b/devel/flang/files/patch-runtime_flang_cexp.c deleted file mode 100644 index 64b7e06d6063..000000000000 --- a/devel/flang/files/patch-runtime_flang_cexp.c +++ /dev/null @@ -1,12 +0,0 @@ ---- runtime/flang/cexp.c.orig 2017-10-19 11:03:03 UTC -+++ runtime/flang/cexp.c -@@ -22,7 +22,8 @@ CMPLXFUNC_C(__mth_i_cexp) - CMPLXARGS_C; - float x, y, z; - x = EXPF(real); -- __mth_sincos(imag, &z, &y); -+ z = sinf(imag); -+ y = cosf(imag); - y *= x; - z *= x; - CRETURN_F_F(y, z); /* should leave y & z in appropriate diff --git a/devel/flang/files/patch-runtime_flangrti_trace__lin.c b/devel/flang/files/patch-runtime_flangrti_trace__lin.c index 90675b02beef..637f590959d9 100644 --- a/devel/flang/files/patch-runtime_flangrti_trace__lin.c +++ b/devel/flang/files/patch-runtime_flangrti_trace__lin.c @@ -1,15 +1,15 @@ ---- runtime/flangrti/trace_lin.c.orig 2017-10-19 11:03:03 UTC +--- runtime/flangrti/trace_lin.c.orig 2018-09-03 06:03:48 UTC +++ runtime/flangrti/trace_lin.c -@@ -85,7 +85,7 @@ static struct sigs sigs[] = { +@@ -87,7 +87,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 */ - /* walk the stack back */ - -@@ -99,7 +99,7 @@ __abort_trace(int skip) + extern char **__io_get_argv(); + static char ** saved_argv; +@@ -143,7 +143,7 @@ __abort_trace(int skip) char **strings; size_t i; diff --git a/devel/flang/files/patch-runtime_include_mthdecls.h b/devel/flang/files/patch-runtime_include_mthdecls.h deleted file mode 100644 index 298a460da21a..000000000000 --- a/devel/flang/files/patch-runtime_include_mthdecls.h +++ /dev/null @@ -1,29 +0,0 @@ ---- runtime/include/mthdecls.h.orig 2017-10-19 11:03:03 UTC -+++ runtime/include/mthdecls.h -@@ -536,19 +536,6 @@ double __mth_i_dbessel_y1(double arg); - double __mth_i_dbessel_yn(int n, double arg); - double __f90_dbessel_yn(int n1, int n, double d); - --#if ! defined (TARGET_X8664) && ! defined(LINUX8664) --/* -- * See explanation below for rationale behind the two flavors of __mth_sincos. -- */ --static inline void __mth_sincos(float angle, float *s, float *c) -- __attribute__((always_inline)); --static inline void __mth_dsincos(double angle, double *s, double *c) -- __attribute__((always_inline)); --#else /* ! defined (TARGET_X8664) && ! defined(LINUX8664) */ --void __mth_sincos(float, float *, float *); --void __mth_dsincos(double, double *, double *); --#endif /* ! defined (TARGET_X8664) && ! defined(LINUX8664) */ -- - FLTDECL_C(__mth_i_cabs); - CMPLXDECL_C(__mth_i_cacos); - CMPLXDECL_C(__mth_i_casin); -@@ -657,6 +644,3 @@ extern complex double ctan(complex double); - * have a version of __mth_sincos, even if it is not external available - * during the build process. - */ -- --#define __mth_sincos(_a,_s,_c) sincosf(_a,_s,_c) --#define __mth_dsincos(_a,_s,_c) sincos(_a,_s,_c) diff --git a/devel/flang/files/patch-tools_flang2_CMakeLists.txt b/devel/flang/files/patch-tools_flang2_CMakeLists.txt new file mode 100644 index 000000000000..c69cb54aad36 --- /dev/null +++ b/devel/flang/files/patch-tools_flang2_CMakeLists.txt @@ -0,0 +1,13 @@ +--- tools/flang2/CMakeLists.txt.orig 2018-09-04 22:24:01 UTC ++++ tools/flang2/CMakeLists.txt +@@ -33,8 +33,8 @@ set(FLANG2_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/ + + include_directories(${FLANG2_INCLUDE_DIR}) + +-if( ${TARGET_OS} STREQUAL "Linux" ) +- if( ${TARGET_ARCHITECTURE} STREQUAL "x86_64" ) ++if( ${TARGET_OS} STREQUAL "Linux|FreeBSD" ) ++ if( ${TARGET_ARCHITECTURE} STREQUAL "x86_64|amd64" ) + set(X86_64 ON) + set(LINUX86 ON) + endif() diff --git a/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt b/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt new file mode 100644 index 000000000000..0649b4afa889 --- /dev/null +++ b/devel/flang/files/patch-tools_flang2_flang2exe_CMakeLists.txt @@ -0,0 +1,11 @@ +--- tools/flang2/flang2exe/CMakeLists.txt.orig 2018-09-04 22:25:18 UTC ++++ tools/flang2/flang2exe/CMakeLists.txt +@@ -101,7 +101,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 diff --git a/devel/flang/pkg-descr b/devel/flang/pkg-descr index 80c1229d5d31..b96f6665e76e 100644 --- a/devel/flang/pkg-descr +++ b/devel/flang/pkg-descr @@ -1,3 +1,3 @@ Fortran compiler targeting LLVM (modified clang part) -WWW: https://github.com/flang-compiler/clang +WWW: https://github.com/flang-compiler/flang diff --git a/devel/flang/pkg-plist b/devel/flang/pkg-plist index a649000cb725..48c15eec76fa 100644 --- a/devel/flang/pkg-plist +++ b/devel/flang/pkg-plist @@ -2,7 +2,9 @@ bin/flang flang/bin/flang1 flang/bin/flang2 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 |
