summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTomoki, Karatsu <49965247+t-karatsu@users.noreply.github.com>2020-03-11 06:21:14 +0900
committerGitHub <noreply@github.com>2020-03-10 16:21:14 -0500
commit03c684954e8d48b5845b3a80723dc55890b6ad69 (patch)
tree378602b58087a16eddd05be551aaddb9b1b8c60b /var
parent6993a82cb401489195d09005de46bf6ae911f1ea (diff)
downloadspack-03c684954e8d48b5845b3a80723dc55890b6ad69.tar.gz
spack-03c684954e8d48b5845b3a80723dc55890b6ad69.tar.bz2
spack-03c684954e8d48b5845b3a80723dc55890b6ad69.tar.xz
spack-03c684954e8d48b5845b3a80723dc55890b6ad69.zip
r: Lower optimization level when using Fujitsu compiler@4.1.0. (#15418)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/r/change_optflags_tmp.patch67
-rw-r--r--var/spack/repos/builtin/packages/r/package.py6
2 files changed, 73 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/r/change_optflags_tmp.patch b/var/spack/repos/builtin/packages/r/change_optflags_tmp.patch
new file mode 100644
index 0000000000..4e39b02be7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r/change_optflags_tmp.patch
@@ -0,0 +1,67 @@
+diff -ur R-3.6.3.org/configure R-3.6.3/configure
+--- R-3.6.3.org/configure 2020-03-09 11:09:16.060825352 +0900
++++ R-3.6.3/configure 2020-03-09 11:10:47.011280195 +0900
+@@ -6470,13 +6470,13 @@
+ CFLAGS=$ac_save_CFLAGS
+ elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+- CFLAGS="-g -O2"
++ CFLAGS="-g -O1"
+ else
+ CFLAGS="-g"
+ fi
+ else
+ if test "$GCC" = yes; then
+- CFLAGS="-O2"
++ CFLAGS="-O1"
+ else
+ CFLAGS=
+ fi
+@@ -7445,13 +7445,13 @@
+ FCFLAGS=$ac_save_FCFLAGS
+ elif test $ac_cv_prog_fc_g = yes; then
+ if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+- FCFLAGS="-g -O2"
++ FCFLAGS="-g -O1"
+ else
+ FCFLAGS="-g"
+ fi
+ else
+ if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+- FCFLAGS="-O2"
++ FCFLAGS="-O1"
+ else
+ FCFLAGS=
+ fi
+@@ -7717,13 +7717,13 @@
+ CXXFLAGS=$ac_save_CXXFLAGS
+ elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+- CXXFLAGS="-g -O2"
++ CXXFLAGS="-g -O1"
+ else
+ CXXFLAGS="-g"
+ fi
+ else
+ if test "$GXX" = yes; then
+- CXXFLAGS="-O2"
++ CXXFLAGS="-O1"
+ else
+ CXXFLAGS=
+ fi
+@@ -8336,13 +8336,13 @@
+ OBJCFLAGS=$ac_save_OBJCFLAGS
+ elif test $ac_cv_prog_objc_g = yes; then
+ if test "$GOBJC" = yes; then
+- OBJCFLAGS="-g -O2"
++ OBJCFLAGS="-g -O1"
+ else
+ OBJCFLAGS="-g"
+ fi
+ else
+ if test "$GOBJC" = yes; then
+- OBJCFLAGS="-O2"
++ OBJCFLAGS="-O1"
+ else
+ OBJCFLAGS=
+ fi
diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py
index 9257c5e733..1893aca9ac 100644
--- a/var/spack/repos/builtin/packages/r/package.py
+++ b/var/spack/repos/builtin/packages/r/package.py
@@ -86,6 +86,12 @@ class R(AutotoolsPackage):
patch('zlib.patch', when='@:3.3.2')
+ # R cannot be built with '-O2' optimization
+ # with Fujitsu Compiler @4.1.0 now.
+ # Until the Fujitsu compiler resolves this problem,
+ # temporary fix to lower the optimization level.
+ patch('change_optflags_tmp.patch', when='%fj@4.1.0')
+
filter_compiler_wrappers(
'Makeconf', relative_root=os.path.join('rlib', 'R', 'etc')
)