Skip to content

Commit 1199bc8

Browse files
committed
Merge branch 'gcc8-CI-macOS-fix' into issue-427-fix-sendget
2 parents cbb466f + d953cb6 commit 1199bc8

File tree

14 files changed

+2581
-15
lines changed

14 files changed

+2581
-15
lines changed

.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$Format:%d%n%n$
22
# Fall back version, probably last release:
3-
2.0.0
3+
2.1.0
44

55
# OpenCoarrays version file. This project uses semantic
66
# versioning. For details see http://semver.org

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
- BUILD_TYPES="Debug RelWithDebInfo Release CodeCoverage"
1616
matrix:
1717
- GCC=6 OSX_PACKAGES="gcc@6 shellcheck" BUILD_TYPE="InstallScript"
18-
- GCC="6 7" OSX_PACKAGES="gcc gcc@6 cmake shellcheck" BUILD_TYPE="cmake"
18+
# - GCC="6 7" OSX_PACKAGES="gcc@7 gcc@6 cmake shellcheck" BUILD_TYPE="cmake"
1919

2020
matrix:
2121
fast_finish: true
@@ -83,7 +83,7 @@ before_install:
8383

8484
install:
8585
- pwd
86-
- developer-scripts/travis/install.${TRAVIS_OS_NAME}.sh
86+
- travis_wait 40 developer-scripts/travis/install.${TRAVIS_OS_NAME}.sh
8787

8888
script:
8989
- pwd

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,13 @@ else()
826826
set_property(TEST co_reduce_extension PROPERTY PASS_REGULAR_EXPRESSION "Test passed.")
827827
endif()
828828

829+
# Test bash installation scripts
829830
include(cmake/AddInstallationScriptTest.cmake )
830831
add_installation_script_test(installation-scripts.sh src/tests/installation/)
831832

833+
# Test ISO_Fortran_binding library
834+
add_test(NAME ISO_Fortran_binding_tests COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ISO_Fortran_binding_tests")
835+
832836
# Lint the Travis-CI scripts
833837
set(TRAVIS_SCRIPTS
834838
install.linux.sh

developer-scripts/travis/install.linux.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ if [[ "${BUILD_TYPE:-}" != InstallScript ]]; then # Ubuntu on Travis-CI, NOT tes
3232
export CC=gcc-${GCC}
3333
export FC=gfortran-${GCC}
3434
(
35-
cd "${MPICH_URL_TAIL%.tar.gz}"
35+
cd "${MPICH_URL_TAIL%.tar.gz}" || exit 4
3636
echo "Configuring MPICH ..."
37-
${TRAVIS:+travis_wait} ./configure --prefix="${CACHE}" > configure_mpich.log 2>&1 || cat configure_mpich.log
37+
pwd
38+
./configure --prefix="${CACHE}"
3839
echo "Building MPICH ..."
39-
${TRAVIS:+travis_wait 30} make -j 4 > make_mpich.log 2>&1 || cat make_mpich.log
40+
make -j 4
4041
echo "Installing MPICH ..."
41-
${TRAVIS:+travis_wait} make install > install_mpich.log 2>&1 || cat install_mpich.log
42-
)
42+
make install
43+
)
4344
fi
4445
fi
4546

prerequisites/build-functions/build_and_install.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# shellcheck shell=bash
12
# Make the build directory, configure, and build
23
# shellcheck disable=SC2154
34

@@ -6,7 +7,6 @@ source "${OPENCOARRAYS_SRC_DIR}/prerequisites/build-functions/edit_GCC_download_
67

78
build_and_install()
89
{
9-
1010
num_threads=${arg_j}
1111
build_path="${OPENCOARRAYS_SRC_DIR}/prerequisites/builds/${package_to_build}-${version_to_build}"
1212

@@ -45,13 +45,22 @@ build_and_install()
4545

4646
else # ${package_to_build} == "gcc"
4747

48-
# Use GCC's contrib/download_prerequisites script after modifying it, if necessary, to use the
49-
# the preferred download mechanism set in prerequisites/build-functions/set_or_print_downloader.sh
50-
5148
info "pushd ${download_path}/${package_source_directory} "
5249
pushd "${download_path}/${package_source_directory}"
5350

54-
# Switch download mechanism, if wget is not available
51+
# Patch gfortran if necessary
52+
export patches_dir="${OPENCOARRAYS_SRC_DIR}/prerequisites/build-functions/patches/${package_to_build}/${version_to_build}"
53+
if [[ -d "${patches_dir:-}" ]]; then
54+
for patch in "${patches_dir%/}"/*.diff ; do
55+
info "Applying patch ${patch##*/} to $package_to_build ${version_to_build}."
56+
patch -p1 < "$patch"
57+
done
58+
fi
59+
60+
# Use GCC's contrib/download_prerequisites script after modifying it, if necessary, to use the
61+
# the preferred download mechanism set in prerequisites/build-functions/set_or_print_downloader.sh
62+
63+
# Switch download mechanism if wget is not available
5564
edit_GCC_download_prereqs_file_if_necessary
5665

5766
# Download GCC prerequisities
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c
2+
index 3e14ddc25d8..a0bbd584947 100644
3+
--- a/gcc/fortran/dependency.c
4+
+++ b/gcc/fortran/dependency.c
5+
@@ -2238,9 +2238,8 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
6+
break;
7+
8+
/* Exactly matching and forward overlapping ranges don't cause a
9+
- dependency, when they are not part of a coarray ref. */
10+
- if (fin_dep < GFC_DEP_BACKWARD
11+
- && lref->u.ar.codimen == 0 && rref->u.ar.codimen == 0)
12+
+ dependency. */
13+
+ if (fin_dep < GFC_DEP_BACKWARD)
14+
return 0;
15+
16+
/* Keep checking. We only have a dependency if
17+
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
18+
index 00edd447bb2..87b3ca72c05 100644
19+
--- a/gcc/fortran/trans-intrinsic.c
20+
+++ b/gcc/fortran/trans-intrinsic.c
21+
@@ -1860,7 +1860,7 @@ conv_caf_send (gfc_code *code) {
22+
23+
lhs_expr = code->ext.actual->expr;
24+
rhs_expr = code->ext.actual->next->expr;
25+
- may_require_tmp = gfc_check_dependency (lhs_expr, rhs_expr, false) == 0
26+
+ may_require_tmp = gfc_check_dependency (lhs_expr, rhs_expr, true) == 0
27+
? boolean_false_node : boolean_true_node;
28+
gfc_init_block (&block);
29+

prerequisites/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
# (3) Parse the usage information (default usage file name: current file's name with -usage appended).
3131
# (4) Parse the command line using the usage information.
3232

33-
3433
export OPENCOARRAYS_SRC_DIR="${OPENCOARRAYS_SRC_DIR:-${PWD%prerequisites*}}"
3534
export __usage=${OPENCOARRAYS_SRC_DIR}/prerequisites/build.sh-usage
3635
if [[ ! -f "${OPENCOARRAYS_SRC_DIR}/src/libcaf.h" ]]; then

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(directories_to_build mpi tests)
1+
set(directories_to_build mpi tests iso-fortran-binding)
22
foreach(directory ${directories_to_build})
33
add_subdirectory(${directory})
44
endforeach()
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
add_library(ISO_Fortran_binding SHARED ISO_Fortran_binding.c)
2+
add_library(ISO_Fortran_binding_static STATIC ISO_Fortran_binding.c)
3+
4+
set_target_properties(ISO_Fortran_binding_static PROPERTIES OUTPUT_NAME cISO_Fortran_binding)
5+
6+
set(CFI_SO_VERSION 0)
7+
if(gfortran_compiler)
8+
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0.0)
9+
set(CFI_SO_VERSION 2)
10+
elseif(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0.0)
11+
set(CFI_SO_VERSION 1)
12+
endif()
13+
endif()
14+
15+
set_target_properties( ISO_Fortran_binding
16+
PROPERTIES
17+
VERSION ${PROJECT_VERSION}
18+
SOVERSION ${CFI_SO_VERSION}
19+
PUBLIC_HEADER ISO_Fortran_binding.h
20+
)
21+
22+
set_target_properties( ISO_Fortran_binding_static
23+
PROPERTIES
24+
VERSION ${PROJECT_VERSION}
25+
SOVERSION ${CFI_SO_VERSION}
26+
PUBLIC_HEADER ISO_Fortran_binding.h
27+
)
28+
29+
install(DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" FILES_MATCHING PATTERN "*.h")
30+
31+
install( TARGETS ISO_Fortran_binding
32+
EXPORT OpenCoarraysTargets
33+
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
34+
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
35+
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
36+
)
37+
install( TARGETS ISO_Fortran_binding_static
38+
EXPORT OpenCoarraysTargets
39+
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
40+
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
41+
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
42+
)

0 commit comments

Comments
 (0)