Enabling the user to choose the devtoolset it needs.
* Change: In boostrap/ccb.py, change the devtoolset argument from a fixed behavior "--devtoolset-2" to a selecting one "--devtoolset=X" where X is the requested version of the devtoolset. Modify coriolisEnv.py to dynamically detect with which devtoolset we have been compiled. Idem for Makefile.package and FindBootstrap.cmake.
This commit is contained in:
parent
fac01b10aa
commit
05a7af886c
9
Makefile
9
Makefile
|
@ -1,15 +1,16 @@
|
||||||
|
|
||||||
UNAME_S = $(shell uname -s)
|
UNAME_S = $(shell uname -s)
|
||||||
UNAME_R = $(shell uname -r)
|
UNAME_R = $(shell uname -r)
|
||||||
|
DEVTOOLSET_VERSION = 7
|
||||||
|
|
||||||
# We must use devtoolset-2 only under RHEL6 & clones.
|
# We must use devtoolset only under RHEL6 & clones.
|
||||||
DEVTOOLSET_OPTION =
|
DEVTOOLSET_OPTION =
|
||||||
ifeq ($(UNAME_S),Linux)
|
ifeq ($(UNAME_S),Linux)
|
||||||
ifneq ($(findstring .el6.,$(UNAME_R)),)
|
ifneq ($(findstring .el7.,$(UNAME_R)),)
|
||||||
DEVTOOLSET_OPTION = --devtoolset-2
|
DEVTOOLSET_OPTION = --devtoolset=$(DEVTOOLSET_VERSION)
|
||||||
endif
|
endif
|
||||||
ifneq ($(findstring .slsoc6.,$(UNAME_R)),)
|
ifneq ($(findstring .slsoc6.,$(UNAME_R)),)
|
||||||
DEVTOOLSET_OPTION = --devtoolset-2
|
DEVTOOLSET_OPTION = --devtoolset=$(DEVTOOLSET_VERSION)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,10 @@ build: FORCE
|
||||||
esac; \
|
esac; \
|
||||||
case "$${X_SCLS}" in \
|
case "$${X_SCLS}" in \
|
||||||
*"devtoolset"*) \
|
*"devtoolset"*) \
|
||||||
|
version="`echo $${X_SCLS} | sed 's,devtoolset-,,'`"; \
|
||||||
cmakeArgs="$${cmakeArgs} -D Boost_NO_SYSTEM_PATHS:STRING=TRUE"; \
|
cmakeArgs="$${cmakeArgs} -D Boost_NO_SYSTEM_PATHS:STRING=TRUE"; \
|
||||||
BOOST_INCLUDEDIR="/opt/rh/devtoolset-2/root/usr/include"; \
|
BOOST_INCLUDEDIR="/opt/rh/devtoolset-$${version}/root/usr/include"; \
|
||||||
BOOST_LIBRARYDIR="/opt/rh/devtoolset-2/root/usr/lib"; \
|
BOOST_LIBRARYDIR="/opt/rh/devtoolset-$${version}/root/usr/lib"; \
|
||||||
export BOOST_INCLUDEDIR BOOST_LIBRARYDIR; \
|
export BOOST_INCLUDEDIR BOOST_LIBRARYDIR; \
|
||||||
echo "** Using $${X_SCLS}."; \
|
echo "** Using $${X_SCLS}."; \
|
||||||
;; \
|
;; \
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Builder:
|
||||||
self._clang = False
|
self._clang = False
|
||||||
self._noSystemBoost = False
|
self._noSystemBoost = False
|
||||||
self._macports = False
|
self._macports = False
|
||||||
self._devtoolset2 = False
|
self._devtoolset = 0
|
||||||
self._qt5 = False
|
self._qt5 = False
|
||||||
self._openmp = False
|
self._openmp = False
|
||||||
self._enableShared = "ON"
|
self._enableShared = "ON"
|
||||||
|
@ -66,9 +66,9 @@ class Builder:
|
||||||
elif attribute == "macports":
|
elif attribute == "macports":
|
||||||
self._macports = value
|
self._macports = value
|
||||||
if value: self._noSystemBoost = True
|
if value: self._noSystemBoost = True
|
||||||
elif attribute == "devtoolset2":
|
elif attribute == "devtoolset":
|
||||||
self._devtoolset2 = value
|
self._devtoolset = value
|
||||||
if value: self._noSystemBoost = True
|
#if value: self._noSystemBoost = True
|
||||||
elif attribute == "qt5": self._qt5 = value
|
elif attribute == "qt5": self._qt5 = value
|
||||||
elif attribute == "openmp": self._openmp = value
|
elif attribute == "openmp": self._openmp = value
|
||||||
elif attribute == "enableDoc": self._enableDoc = value
|
elif attribute == "enableDoc": self._enableDoc = value
|
||||||
|
@ -132,14 +132,14 @@ class Builder:
|
||||||
|
|
||||||
|
|
||||||
def _execute ( self, command, error ):
|
def _execute ( self, command, error ):
|
||||||
if self._devtoolset2 == True:
|
if self._devtoolset:
|
||||||
print 'Using devtoolset-2 (scl enable devtoolset-2 ...)'
|
print 'Using devtoolset-%(v)d (scl enable devtoolset-%(v)d ...)' % {'v':self._devtoolset}
|
||||||
commandAsString = ''
|
commandAsString = ''
|
||||||
for i in range(len(command)):
|
for i in range(len(command)):
|
||||||
if i: commandAsString += ' '
|
if i: commandAsString += ' '
|
||||||
if ' ' in command[i]: commandAsString += '"'+command[i]+'"'
|
if ' ' in command[i]: commandAsString += '"'+command[i]+'"'
|
||||||
else: commandAsString += command[i]
|
else: commandAsString += command[i]
|
||||||
command = [ 'scl', 'enable', 'devtoolset-2', commandAsString ]
|
command = [ 'scl', 'enable', 'devtoolset-%d' % self._devtoolset, commandAsString ]
|
||||||
|
|
||||||
#print command
|
#print command
|
||||||
sys.stdout.flush ()
|
sys.stdout.flush ()
|
||||||
|
@ -295,9 +295,9 @@ class Builder:
|
||||||
if self._clang:
|
if self._clang:
|
||||||
self._environment[ 'CC' ] = '/usr/bin/clang'
|
self._environment[ 'CC' ] = '/usr/bin/clang'
|
||||||
self._environment[ 'CXX' ] = '/usr/bin/clang++'
|
self._environment[ 'CXX' ] = '/usr/bin/clang++'
|
||||||
if self._devtoolset2:
|
if self._devtoolset:
|
||||||
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/rh/devtoolset-2/root/usr/include'
|
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/rh/devtoolset-%d/root/usr/include' % self._devtoolset
|
||||||
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/rh/devtoolset-2/root/usr/lib'
|
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/rh/devtoolset-%d/root/usr/lib' % self._devtoolset
|
||||||
if self._macports:
|
if self._macports:
|
||||||
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/local/include'
|
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/local/include'
|
||||||
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/local/lib'
|
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/local/lib'
|
||||||
|
@ -430,8 +430,8 @@ class Builder:
|
||||||
, "--define", "_tmppath %s" % self.tmppathDir
|
, "--define", "_tmppath %s" % self.tmppathDir
|
||||||
#, "--define", "_enable_debug_packages 0"
|
#, "--define", "_enable_debug_packages 0"
|
||||||
, "--with", "binarytar" ]
|
, "--with", "binarytar" ]
|
||||||
if self._devtoolset2 == True:
|
if self._devtoolset:
|
||||||
command += [ "--define", "scl devtoolset-2" ]
|
command += [ "--define", "scl devtoolset-%d"%self._devtoolset ]
|
||||||
command += [ "-ba", "--clean", rpmSpecFile ]
|
command += [ "-ba", "--clean", rpmSpecFile ]
|
||||||
|
|
||||||
self._execute ( command, "Rebuild rpm packages" )
|
self._execute ( command, "Rebuild rpm packages" )
|
||||||
|
|
|
@ -142,7 +142,7 @@ class CompileWidget ( QWidget ):
|
||||||
#if self.options.svnUpdate: command += [ '--svn-update' ]
|
#if self.options.svnUpdate: command += [ '--svn-update' ]
|
||||||
#if self.options.svnStatus: command += [ '--svn-update' ]
|
#if self.options.svnStatus: command += [ '--svn-update' ]
|
||||||
if self.options.enableDoc: command += [ '--doc' ]
|
if self.options.enableDoc: command += [ '--doc' ]
|
||||||
if self.options.devtoolset2: command += [ '--devtoolset-2' ]
|
if self.options.devtoolset: command += [ '--devtoolset-8' ]
|
||||||
if self.options.qt5: command += [ '--qt5' ]
|
if self.options.qt5: command += [ '--qt5' ]
|
||||||
if self.options.noCache: command += [ '--no-cache' ]
|
if self.options.noCache: command += [ '--no-cache' ]
|
||||||
if self.options.rmBuild: command += [ '--rm-build' ]
|
if self.options.rmBuild: command += [ '--rm-build' ]
|
||||||
|
|
|
@ -65,7 +65,7 @@ class OptionsWidget ( QWidget ):
|
||||||
#self._svnStatus = QCheckBox( 'SVN Status' )
|
#self._svnStatus = QCheckBox( 'SVN Status' )
|
||||||
self._make = QCheckBox( 'Build' )
|
self._make = QCheckBox( 'Build' )
|
||||||
self._enableDoc = QCheckBox( 'Build Documentation' )
|
self._enableDoc = QCheckBox( 'Build Documentation' )
|
||||||
self._devtoolset2 = QCheckBox( 'Build with devtoolset 2' )
|
self._devtoolset = QCheckBox( 'Build with devtoolset 8' )
|
||||||
self._qt5 = QCheckBox( 'Build with Qt 5 (Qt 4 default)' )
|
self._qt5 = QCheckBox( 'Build with Qt 5 (Qt 4 default)' )
|
||||||
self._noCache = QCheckBox( 'Remove previous CMake cache' )
|
self._noCache = QCheckBox( 'Remove previous CMake cache' )
|
||||||
self._rmBuild = QCheckBox( 'Cleanup Build Directory' )
|
self._rmBuild = QCheckBox( 'Cleanup Build Directory' )
|
||||||
|
@ -91,7 +91,7 @@ class OptionsWidget ( QWidget ):
|
||||||
vLayout = QVBoxLayout()
|
vLayout = QVBoxLayout()
|
||||||
vLayout.addWidget( self._buildMode )
|
vLayout.addWidget( self._buildMode )
|
||||||
vLayout.addWidget( self._enableDoc )
|
vLayout.addWidget( self._enableDoc )
|
||||||
vLayout.addWidget( self._devtoolset2 )
|
vLayout.addWidget( self._devtoolset )
|
||||||
vLayout.addWidget( self._qt5 )
|
vLayout.addWidget( self._qt5 )
|
||||||
vLayout.addWidget( self._noCache )
|
vLayout.addWidget( self._noCache )
|
||||||
vLayout.addWidget( self._rmBuild )
|
vLayout.addWidget( self._rmBuild )
|
||||||
|
@ -130,7 +130,7 @@ class OptionsWidget ( QWidget ):
|
||||||
#def _getSvnStatus ( self ): return self._svnStatus.isChecked()
|
#def _getSvnStatus ( self ): return self._svnStatus.isChecked()
|
||||||
def _getMake ( self ): return self._make.isChecked()
|
def _getMake ( self ): return self._make.isChecked()
|
||||||
def _getEnableDoc ( self ): return self._enableDoc.isChecked()
|
def _getEnableDoc ( self ): return self._enableDoc.isChecked()
|
||||||
def _getDevtoolset2 ( self ): return self._devtoolset2.isChecked()
|
def _getDevtoolset ( self ): return self._devtoolset.isChecked()
|
||||||
def _getQt5 ( self ): return self._qt5.isChecked()
|
def _getQt5 ( self ): return self._qt5.isChecked()
|
||||||
def _getNoCache ( self ): return self._noCache.isChecked()
|
def _getNoCache ( self ): return self._noCache.isChecked()
|
||||||
def _getRmBuild ( self ): return self._rmBuild.isChecked()
|
def _getRmBuild ( self ): return self._rmBuild.isChecked()
|
||||||
|
@ -143,7 +143,7 @@ class OptionsWidget ( QWidget ):
|
||||||
#svnStatus = property( _getSvnStatus )
|
#svnStatus = property( _getSvnStatus )
|
||||||
make = property( _getMake )
|
make = property( _getMake )
|
||||||
enableDoc = property( _getEnableDoc )
|
enableDoc = property( _getEnableDoc )
|
||||||
devtoolset2 = property( _getDevtoolset2 )
|
devtoolset = property( _getDevtoolset )
|
||||||
qt5 = property( _getQt5 )
|
qt5 = property( _getQt5 )
|
||||||
noCache = property( _getNoCache )
|
noCache = property( _getNoCache )
|
||||||
rmBuild = property( _getRmBuild )
|
rmBuild = property( _getRmBuild )
|
||||||
|
@ -156,7 +156,7 @@ class OptionsWidget ( QWidget ):
|
||||||
#self._svnStatus .setChecked( settings.value('builder/svnStatus').toBool() )
|
#self._svnStatus .setChecked( settings.value('builder/svnStatus').toBool() )
|
||||||
self._make .setChecked( settings.value('builder/make' ).toBool() )
|
self._make .setChecked( settings.value('builder/make' ).toBool() )
|
||||||
self._enableDoc .setChecked( settings.value('builder/enableDoc').toBool() )
|
self._enableDoc .setChecked( settings.value('builder/enableDoc').toBool() )
|
||||||
self._devtoolset2.setChecked( settings.value('builder/devtoolset2').toBool() )
|
self._devtoolset .setChecked( settings.value('builder/devtoolset').toBool() )
|
||||||
self._qt5 .setChecked( settings.value('builder/qt5').toBool() )
|
self._qt5 .setChecked( settings.value('builder/qt5').toBool() )
|
||||||
self._noCache .setChecked( settings.value('builder/noCache' ).toBool() )
|
self._noCache .setChecked( settings.value('builder/noCache' ).toBool() )
|
||||||
self._rmBuild .setChecked( settings.value('builder/rmBuild' ).toBool() )
|
self._rmBuild .setChecked( settings.value('builder/rmBuild' ).toBool() )
|
||||||
|
@ -180,7 +180,7 @@ class OptionsWidget ( QWidget ):
|
||||||
#settings.setValue('builder/svnStatus' , self._svnStatus .isChecked() )
|
#settings.setValue('builder/svnStatus' , self._svnStatus .isChecked() )
|
||||||
settings.setValue('builder/make' , self._make .isChecked() )
|
settings.setValue('builder/make' , self._make .isChecked() )
|
||||||
settings.setValue('builder/enableDoc' , self._enableDoc .isChecked() )
|
settings.setValue('builder/enableDoc' , self._enableDoc .isChecked() )
|
||||||
settings.setValue('builder/devtoolset2', self._devtoolset2.isChecked() )
|
settings.setValue('builder/devtoolset', self._devtoolset.isChecked() )
|
||||||
settings.setValue('builder/qt5' , self._qt5 .isChecked() )
|
settings.setValue('builder/qt5' , self._qt5 .isChecked() )
|
||||||
settings.setValue('builder/buildMode' , self._buildMode .currentText() )
|
settings.setValue('builder/buildMode' , self._buildMode .currentText() )
|
||||||
settings.setValue('builder/noCache' , self._noCache .isChecked() )
|
settings.setValue('builder/noCache' , self._noCache .isChecked() )
|
||||||
|
|
|
@ -208,7 +208,7 @@ parser.add_option ( "--no-build" , action="store_true" ,
|
||||||
parser.add_option ( "--no-cache" , action="store_true" , dest="noCache" , help="Remove previous CMake cache before building." )
|
parser.add_option ( "--no-cache" , action="store_true" , dest="noCache" , help="Remove previous CMake cache before building." )
|
||||||
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove previous build directoty before building." )
|
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove previous build directoty before building." )
|
||||||
parser.add_option ( "--macports" , action="store_true" , dest="macports" , help="Build against MacPorts." )
|
parser.add_option ( "--macports" , action="store_true" , dest="macports" , help="Build against MacPorts." )
|
||||||
parser.add_option ( "--devtoolset-2" , action="store_true" , dest="devtoolset2" , help="Build against TUV Dev Toolset 2." )
|
parser.add_option ( "--devtoolset" , action="store" , type="int" , dest="devtoolset" , help="Build against TUV Dev Toolset 8." )
|
||||||
parser.add_option ( "--qt5" , action="store_true" , dest="qt5" , help="Build against Qt 5 (default: Qt 4)." )
|
parser.add_option ( "--qt5" , action="store_true" , dest="qt5" , help="Build against Qt 5 (default: Qt 4)." )
|
||||||
parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." )
|
parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." )
|
||||||
parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." )
|
parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." )
|
||||||
|
@ -286,7 +286,7 @@ else:
|
||||||
if options.ninja: builder.ninja = True
|
if options.ninja: builder.ninja = True
|
||||||
if options.clang: builder.clang = True
|
if options.clang: builder.clang = True
|
||||||
if options.macports: builder.macports = True
|
if options.macports: builder.macports = True
|
||||||
if options.devtoolset2: builder.devtoolset2 = True
|
if options.devtoolset: builder.devtoolset = options.devtoolset
|
||||||
if options.qt5: builder.qt5 = True
|
if options.qt5: builder.qt5 = True
|
||||||
if options.openmp: builder.openmp = True
|
if options.openmp: builder.openmp = True
|
||||||
if options.makeArguments: builder.makeArguments = options.makeArguments
|
if options.makeArguments: builder.makeArguments = options.makeArguments
|
||||||
|
|
|
@ -294,10 +294,10 @@
|
||||||
#
|
#
|
||||||
macro(setup_sysconfdir INSTALLDIR)
|
macro(setup_sysconfdir INSTALLDIR)
|
||||||
message("-- Checking installation directory <${INSTALLDIR}>")
|
message("-- Checking installation directory <${INSTALLDIR}>")
|
||||||
string(REGEX MATCH "^/opt/rh/devtoolset-2/root/usr$" IS_OPT_RH ${INSTALLDIR})
|
string(REGEX MATCH "^/opt/rh/devtoolset-[0-9]+/root" IS_OPT_RH ${INSTALLDIR})
|
||||||
if(IS_OPT_RH)
|
if(IS_OPT_RH)
|
||||||
message("-- Using devtoolset-2 install tree /opt/rh/devtoolset-2/root/etc.")
|
message("-- Using devtoolset-X install tree ${IS_OPT_RH}/etc.")
|
||||||
set(SYS_CONF_DIR "/opt/rh/devtoolset-2/root/etc" CACHE STRING "System configuration directory (/etc)" FORCE)
|
set(SYS_CONF_DIR ${IS_OPT_RH} CACHE STRING "System configuration directory (/etc)" FORCE)
|
||||||
else()
|
else()
|
||||||
string(REGEX MATCH "^/usr$" IS_USR ${INSTALLDIR})
|
string(REGEX MATCH "^/usr$" IS_USR ${INSTALLDIR})
|
||||||
string(REGEX MATCH "^/opt$" IS_OPT ${INSTALLDIR})
|
string(REGEX MATCH "^/opt$" IS_OPT ${INSTALLDIR})
|
||||||
|
|
|
@ -41,7 +41,7 @@ def scrubPath ( pathName ):
|
||||||
|
|
||||||
|
|
||||||
def guessOs ():
|
def guessOs ():
|
||||||
useDevtoolset2 = False
|
useDevtoolset = False
|
||||||
osSlsoc7x_64 = re.compile (".*Linux.*el7.*x86_64.*")
|
osSlsoc7x_64 = re.compile (".*Linux.*el7.*x86_64.*")
|
||||||
osSlsoc6x_64 = re.compile (".*Linux.*el6.*x86_64.*")
|
osSlsoc6x_64 = re.compile (".*Linux.*el6.*x86_64.*")
|
||||||
osSlsoc6x = re.compile (".*Linux.*(el|slsoc)6.*")
|
osSlsoc6x = re.compile (".*Linux.*(el|slsoc)6.*")
|
||||||
|
@ -74,10 +74,10 @@ def guessOs ():
|
||||||
elif osSlsoc6x_64.match(lines[0]):
|
elif osSlsoc6x_64.match(lines[0]):
|
||||||
osType = "Linux.slsoc6x_64"
|
osType = "Linux.slsoc6x_64"
|
||||||
libDir = "lib64"
|
libDir = "lib64"
|
||||||
useDevtoolset2 = True
|
useDevtoolset = True
|
||||||
elif osSlsoc6x.match(lines[0]):
|
elif osSlsoc6x.match(lines[0]):
|
||||||
osType = "Linux.slsoc6x"
|
osType = "Linux.slsoc6x"
|
||||||
useDevtoolset2 = True
|
useDevtoolset = True
|
||||||
elif osSLSoC5x_64.match(lines[0]):
|
elif osSLSoC5x_64.match(lines[0]):
|
||||||
osType = "Linux.SLSoC5x_64"
|
osType = "Linux.SLSoC5x_64"
|
||||||
libDir = "lib64"
|
libDir = "lib64"
|
||||||
|
@ -132,12 +132,12 @@ def guessOs ():
|
||||||
print " (using: \"%s\")" % osType
|
print " (using: \"%s\")" % osType
|
||||||
|
|
||||||
ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
|
ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
|
||||||
if ldLibraryPath and 'devtoolset' in ldLibraryPath: useDevtoolset2 = False
|
if ldLibraryPath and 'devtoolset' in ldLibraryPath: useDevtoolset = False
|
||||||
|
|
||||||
if libDir == 'lib64' and not os.path.exists('/usr/lib64'):
|
if libDir == 'lib64' and not os.path.exists('/usr/lib64'):
|
||||||
libDir = 'lib'
|
libDir = 'lib'
|
||||||
|
|
||||||
return (osType,libDir,useDevtoolset2)
|
return (osType,libDir,useDevtoolset)
|
||||||
|
|
||||||
|
|
||||||
def guessShell ():
|
def guessShell ():
|
||||||
|
@ -170,7 +170,7 @@ def guessShell ():
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
osType,libDir,useDevtoolset2 = guessOs()
|
osType,libDir,useDevtoolset = guessOs()
|
||||||
buildType = "Release"
|
buildType = "Release"
|
||||||
linkType = "Shared"
|
linkType = "Shared"
|
||||||
rootDir = None
|
rootDir = None
|
||||||
|
@ -226,6 +226,8 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
# 'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
|
# 'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
|
||||||
|
|
||||||
|
reDevtoolset = re.compile( r'/opt/rh/devtoolset-(?P<version>\d+)/root/etc/coriolis2.*' )
|
||||||
|
|
||||||
buildDir = buildType + "." + linkType
|
buildDir = buildType + "." + linkType
|
||||||
scriptDir = os.path.dirname ( os.path.abspath(__file__) )
|
scriptDir = os.path.dirname ( os.path.abspath(__file__) )
|
||||||
#print "echo \"Script Location: %s\";" % scriptDir,
|
#print "echo \"Script Location: %s\";" % scriptDir,
|
||||||
|
@ -233,10 +235,13 @@ if __name__ == "__main__":
|
||||||
coriolisTop = "/usr"
|
coriolisTop = "/usr"
|
||||||
sysconfDir = scriptDir
|
sysconfDir = scriptDir
|
||||||
shellMessage = "Using system-wide Coriolis 2 (/usr)"
|
shellMessage = "Using system-wide Coriolis 2 (/usr)"
|
||||||
elif scriptDir.startswith("/opt/rh/devtoolset-2/root/etc/coriolis2"):
|
else
|
||||||
coriolisTop = "/opt/rh/devtoolset-2/root/usr"
|
m = reDevtoolset.match( scriptDir )
|
||||||
|
if m:
|
||||||
|
coriolisTop = "/opt/rh/devtoolset-%d/root/usr" % m.group('version')
|
||||||
sysconfDir = scriptDir
|
sysconfDir = scriptDir
|
||||||
shellMessage = "Using system-wide devtoolset-2 Coriolis 2 (/opt/rh/devtoolset-2/root/usr)"
|
shellMessage = "Using system-wide devtoolset-%(v)d Coriolis 2 (/opt/rh/devtoolset-%(v)d/root/usr)" \
|
||||||
|
{ 'v':m.group('version') }
|
||||||
elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"):
|
elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"):
|
||||||
rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x"
|
rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x"
|
||||||
coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir )
|
coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir )
|
||||||
|
@ -304,10 +309,10 @@ if __name__ == "__main__":
|
||||||
if isBourneShell: shellScript = shellScriptSh
|
if isBourneShell: shellScript = shellScriptSh
|
||||||
else: shellScript = shellScriptCsh
|
else: shellScript = shellScriptCsh
|
||||||
|
|
||||||
if useDevtoolset2:
|
if useDevtoolset:
|
||||||
shellScript += \
|
shellScript += \
|
||||||
' echo "Launching a devtoolset-2 subshell though scl (CTRL+D to exit).";' \
|
' echo "Launching a devtoolset-8 subshell though scl (CTRL+D to exit).";' \
|
||||||
' scl enable devtoolset-2 %(SHELL)s'
|
' scl enable devtoolset-8 %(SHELL)s'
|
||||||
|
|
||||||
evalScript = shellScript % { "PATH" : strippedPath
|
evalScript = shellScript % { "PATH" : strippedPath
|
||||||
, "LD_LIBRARY_PATH" : strippedLibraryPath
|
, "LD_LIBRARY_PATH" : strippedLibraryPath
|
||||||
|
|
|
@ -499,11 +499,11 @@ try:
|
||||||
[ ( conf.targets['SL7_64'], buildCommand % (3,conf.debugArg) , conf.fds['build' ] )
|
[ ( conf.targets['SL7_64'], buildCommand % (3,conf.debugArg) , conf.fds['build' ] )
|
||||||
, ( conf.targets['SL7_64'], buildCommand % (1,conf.debugArg+' --doc') , conf.fds['build' ] )
|
, ( conf.targets['SL7_64'], buildCommand % (1,conf.debugArg+' --doc') , conf.fds['build' ] )
|
||||||
, ( conf.targets['SL7_64'], benchsCommand , conf.fds['benchs'] )
|
, ( conf.targets['SL7_64'], benchsCommand , conf.fds['benchs'] )
|
||||||
, ( conf.targets['SL6_64'], buildCommand % (6,conf.debugArg+' --devtoolset-2') , conf.fds['build' ] )
|
, ( conf.targets['SL6_64'], buildCommand % (6,conf.debugArg+' --devtoolset-8') , conf.fds['build' ] )
|
||||||
, ( conf.targets['SL6_64'], buildCommand % (1,conf.debugArg+' --devtoolset-2 --doc'), conf.fds['build' ] )
|
, ( conf.targets['SL6_64'], buildCommand % (1,conf.debugArg+' --devtoolset-8 --doc'), conf.fds['build' ] )
|
||||||
, ( conf.targets['SL6_64'], benchsCommand , conf.fds['benchs'] )
|
, ( conf.targets['SL6_64'], benchsCommand , conf.fds['benchs'] )
|
||||||
, ( conf.targets['SL6'] , buildCommand % (2,conf.debugArg+' --devtoolset-2') , conf.fds['build' ] )
|
, ( conf.targets['SL6'] , buildCommand % (2,conf.debugArg+' --devtoolset-8') , conf.fds['build' ] )
|
||||||
, ( conf.targets['SL6'] , buildCommand % (1,conf.debugArg+' --devtoolset-2 --doc'), conf.fds['build' ] )
|
, ( conf.targets['SL6'] , buildCommand % (1,conf.debugArg+' --devtoolset-8 --doc'), conf.fds['build' ] )
|
||||||
, ( conf.targets['SL6'] , benchsCommand , conf.fds['benchs'] )
|
, ( conf.targets['SL6'] , benchsCommand , conf.fds['benchs'] )
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue