Miscellaneous platform support

This commit is contained in:
Thomas Nagy 2015-03-14 03:02:01 +01:00
parent eefb67755e
commit d1f7f7c78d
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
6 changed files with 33 additions and 3 deletions

View File

@ -682,3 +682,19 @@ def read_object(self, obj):
if not isinstance(obj, self.path.__class__):
obj = self.path.find_resource(obj)
return self(features='fake_obj', source=obj, name=obj.name)
@feature('cxxprogram', 'cprogram')
@after_method('apply_link', 'process_use')
def set_full_paths_hpux(self):
if self.env.DEST_OS != 'hp-ux':
return
base = self.bld.bldnode.abspath()
for var in ['LIBPATH', 'STLIBPATH']:
lst = []
for x in self.env[var]:
if x.startswith('/'):
lst.append(x)
else:
lst.append(os.path.normpath(os.path.join(base, x)))
self.env[var] = lst

View File

@ -44,6 +44,7 @@ c_compiler = {
'sunos': ['suncc', 'gcc'],
'irix': ['gcc', 'irixcc'],
'hpux': ['gcc'],
'osf1V': ['gcc'],
'gnu': ['gcc', 'clang'],
'java': ['gcc', 'msvc', 'clang', 'icc'],
'default':['gcc', 'clang'],

View File

@ -45,6 +45,7 @@ cxx_compiler = {
'sunos': ['sunc++', 'g++'],
'irix': ['g++'],
'hpux': ['g++'],
'osf1V': ['g++'],
'gnu': ['g++', 'clang++'],
'java': ['g++', 'msvc', 'clang++', 'icpc'],
'default': ['g++', 'clang++']

View File

@ -121,7 +121,7 @@ def gcc_modifier_aix(conf):
def gcc_modifier_hpux(conf):
v = conf.env
v['SHLIB_MARKER'] = []
v['STLIB_MARKER'] = '-Bstatic'
v['STLIB_MARKER'] = []
v['CFLAGS_cshlib'] = ['-fPIC','-DPIC']
v['cshlib_PATTERN'] = 'lib%s.sl'
@ -129,6 +129,12 @@ def gcc_modifier_hpux(conf):
def gcc_modifier_openbsd(conf):
conf.env.SONAME_ST = []
@conf
def gcc_modifier_osf1V(conf):
v['SHLIB_MARKER'] = []
v['STLIB_MARKER'] = []
v['SONAME_ST'] = []
@conf
def gcc_modifier_platform(conf):
"""Execute platform-specific functions based on *gcc_modifier_+NAME*"""

View File

@ -122,7 +122,7 @@ def gxx_modifier_aix(conf):
def gxx_modifier_hpux(conf):
v = conf.env
v['SHLIB_MARKER'] = []
v['STLIB_MARKER'] = '-Bstatic'
v['STLIB_MARKER'] = []
v['CFLAGS_cxxshlib'] = ['-fPIC','-DPIC']
v['cxxshlib_PATTERN'] = 'lib%s.sl'
@ -130,6 +130,12 @@ def gxx_modifier_hpux(conf):
def gxx_modifier_openbsd(conf):
conf.env.SONAME_ST = []
@conf
def gcc_modifier_osf1V(conf):
v['SHLIB_MARKER'] = []
v['STLIB_MARKER'] = []
v['SONAME_ST'] = []
@conf
def gxx_modifier_platform(conf):
"""Execute platform-specific functions based on *gxx_modifier_+NAME*"""

View File

@ -585,7 +585,7 @@ def unversioned_sys_platform():
elif s == 'OS/2':
return 'os2'
elif s == 'HP-UX':
return 'hpux'
return 'hp-ux'
elif s in ('SunOS', 'Solaris'):
return 'sunos'
else: s = s.lower()