diff options
| -rw-r--r-- | openmp/runtime/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | openmp/runtime/cmake/PerlFlags.cmake | 3 | ||||
| -rw-r--r-- | openmp/runtime/cmake/SourceFiles.cmake | 2 | ||||
| -rw-r--r-- | openmp/runtime/src/makefile.mk | 16 | ||||
| -rwxr-xr-x | openmp/runtime/tools/build.pl | 2 |
5 files changed, 18 insertions, 11 deletions
diff --git a/openmp/runtime/CMakeLists.txt b/openmp/runtime/CMakeLists.txt index 9841f0161f0..6d824abbe13 100644 --- a/openmp/runtime/CMakeLists.txt +++ b/openmp/runtime/CMakeLists.txt @@ -60,7 +60,7 @@ include(GetArchitecture) # get_architecture() set(os_possible_values lin mac win) set(arch_possible_values 32e 32 arm ppc64 ppc64le aarch64 mic) set(build_type_possible_values release debug relwithdebinfo) -set(omp_version_possible_values 40 30) +set(omp_version_possible_values 41 40 30) set(lib_type_possible_values normal profile stubs) set(mic_arch_possible_values knf knc) @@ -86,7 +86,7 @@ set(os ${temp_os} CACHE STRING "The operating system to build for set(arch ${detected_arch} CACHE STRING "The architecture to build for (32e/32/arm/ppc64/ppc64le/aarch64/mic). 32e is Intel(R) 64 architecture, 32 is IA-32 architecture") set(lib_type normal CACHE STRING "Performance,Profiling,Stubs library (normal/profile/stubs)") set(version 5 CACHE STRING "Produce libguide (version 4) or libiomp5 (version 5)") -set(omp_version 40 CACHE STRING "The OpenMP version (40/30)") +set(omp_version 41 CACHE STRING "The OpenMP version (41/40/30)") set(mic_arch knc CACHE STRING "Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) (knf/knc). Ignored if not Intel(R) MIC Architecture build.") set(create_fortran_modules false CACHE BOOL "Create Fortran module files? (requires fortran compiler)") @@ -312,7 +312,7 @@ if(NOT "${cmake_build_type_lowercase}" STREQUAL "release") string(SUBSTRING "${cmake_build_type_lowercase}" 0 3 build_type_suffix) set(suffix "${suffix}.${build_type_suffix}") endif() -if(NOT "${omp_version}" STREQUAL "40") +if(NOT "${omp_version}" STREQUAL "41") set(suffix "${suffix}.${omp_version}") endif() if(${STATS_GATHERING}) diff --git a/openmp/runtime/cmake/PerlFlags.cmake b/openmp/runtime/cmake/PerlFlags.cmake index c34d29d84e5..978b72fbc45 100644 --- a/openmp/runtime/cmake/PerlFlags.cmake +++ b/openmp/runtime/cmake/PerlFlags.cmake @@ -71,6 +71,9 @@ function(set_gd_flags input_gd_flags) elseif(${STUBS_LIBRARY}) append_gd_flags("-D stub") endif() + if(${omp_version} GREATER 41 OR ${omp_version} EQUAL 41) + append_gd_flags("-D OMP_41") + endif() if(${omp_version} GREATER 40 OR ${omp_version} EQUAL 40) append_gd_flags("-D OMP_40") endif() diff --git a/openmp/runtime/cmake/SourceFiles.cmake b/openmp/runtime/cmake/SourceFiles.cmake index 7c0de6cab72..c9d4a3210fe 100644 --- a/openmp/runtime/cmake/SourceFiles.cmake +++ b/openmp/runtime/cmake/SourceFiles.cmake @@ -78,7 +78,7 @@ function(set_cpp_files input_cpp_source_files) append_cpp_source_file("kmp_dispatch.cpp") append_cpp_source_file("kmp_lock.cpp") append_cpp_source_file("kmp_sched.cpp") - if("${omp_version}" STREQUAL "40") + if(${omp_version} GREATER 40 OR ${omp_version} EQUAL 40) append_cpp_source_file("kmp_taskdeps.cpp") append_cpp_source_file("kmp_cancel.cpp") endif() diff --git a/openmp/runtime/src/makefile.mk b/openmp/runtime/src/makefile.mk index 8c75f19f340..c3af9937ca5 100644 --- a/openmp/runtime/src/makefile.mk +++ b/openmp/runtime/src/makefile.mk @@ -64,7 +64,7 @@ LIB_TYPE := $(call check_variable,LIB_TYPE,norm prof stub) # Type of library: dynamic or static linking. LINK_TYPE := $(call check_variable,LINK_TYPE,dyna stat) # Supported OpenMP version, 2.5 or 3.0. -OMP_VERSION := $(call check_variable,OMP_VERSION,40 30 25) +OMP_VERSION := $(call check_variable,OMP_VERSION,41 40 30 25) # Generate optimized code. OPTIMIZATION := $(call check_variable,OPTIMIZATION,off on) # Library version: 4 -- legacy, 5 -- compat. @@ -646,11 +646,15 @@ gd-flags += -D $(LIB_TYPE) ifeq "$(HAVE_QUAD)" "1" gd-flags += -D HAVE_QUAD endif -ifeq "$(OMP_VERSION)" "40" - gd-flags += -D OMP_40 -D OMP_30 +ifeq "$(OMP_VERSION)" "41" + gd-flags += -D OMP_41 -D OMP_40 -D OMP_30 else - ifeq "$(OMP_VERSION)" "30" - gd-flags += -D OMP_30 + ifeq "$(OMP_VERSION)" "40" + gd-flags += -D OMP_40 -D OMP_30 + else + ifeq "$(OMP_VERSION)" "30" + gd-flags += -D OMP_30 + endif endif endif ifneq "$(VERSION)" "4" @@ -756,7 +760,7 @@ else # norm or prof kmp_sched \ $(empty) -ifeq "$(OMP_VERSION)" "40" +ifeq ($(OMP_VERSION),$(filter $(OMP_VERSION),40 41)) lib_cpp_items += kmp_taskdeps lib_cpp_items += kmp_cancel endif diff --git a/openmp/runtime/tools/build.pl b/openmp/runtime/tools/build.pl index d6bc5a990b0..53027a57907 100755 --- a/openmp/runtime/tools/build.pl +++ b/openmp/runtime/tools/build.pl @@ -62,7 +62,7 @@ my $opts = { "lib-type" => { targets => "rtl", base => 1, parms => { normal => "*", stubs => "" }, }, "link-type" => { targets => "rtl", base => 1, parms => { dynamic => "*", static => "" }, }, "mode" => { targets => "rtl,dsl,timelimit", base => 0, parms => { release => "*", diag => "", debug => "" }, suffix => sub { substr( $_[ 0 ], 0, 3 ); } }, - "omp-version" => { targets => "rtl", base => 0, parms => { 40 => "*", 30 => "" }, suffix => sub { $_[ 0 ]; } }, + "omp-version" => { targets => "rtl", base => 0, parms => { 40 => "", 30 => "", 41 => "*" }, suffix => sub { $_[ 0 ]; } }, "coverage" => { targets => "rtl", base => 0, parms => { off => "*", on => "" }, suffix => sub { $_[ 0 ] eq "on" ? "c1" : "c0"; } }, "stats" => { targets => "rtl", base => 0, parms => { off => "*", on => "" }, suffix => sub { $_[ 0 ] eq "on" ? "s1" : "s0"; } }, "ompt-support" => { targets => "rtl", base => 0, parms => { off => "*", on => "" }, suffix => sub { $_[ 0 ] eq "on" ? "ompt" : "" } }, |

