File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
easybuild/toolchains/compiler Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 3030:author: Miguel Dias Costa (National University of Singapore)
3131"""
3232import os
33+ import re
3334
3435import easybuild .tools .environment as env
3536import easybuild .tools .systemtools as systemtools
@@ -88,6 +89,13 @@ class FujitsuCompiler(Compiler):
8889 def prepare (self , * args , ** kwargs ):
8990 super (FujitsuCompiler , self ).prepare (* args , ** kwargs )
9091
92+ # fcc doesn't accept e.g. -std=c++11 or -std=gnu++11, only -std=c11 or -std=gnu11
93+ pattern = r'-std=(gnu|c)\+\+(\d+)'
94+ if re .search (pattern , self .vars ['CFLAGS' ]):
95+ self .log .debug ("Found '-std=(gnu|c)++' in CFLAGS, fcc doesn't accept '++' here, removing it" )
96+ self .vars ['CFLAGS' ] = re .sub (pattern , r'-std=\1\2' , self .vars ['CFLAGS' ])
97+ self ._setenv_variables ()
98+
9199 # make sure the fujitsu module libraries are found (and added to rpath by wrapper)
92100 library_path = os .getenv ('LIBRARY_PATH' , '' )
93101 libdir = os .path .join (os .getenv (TC_CONSTANT_MODULE_VAR ), 'lib64' )
You can’t perform that action at this time.
0 commit comments