sb: Add _host_os_version to all supported hosts.

This commit is contained in:
Chris Johns 2014-04-10 18:26:42 +10:00
parent 9ea19cf760
commit a14171f524
5 changed files with 112 additions and 103 deletions

View File

@ -35,12 +35,16 @@ def load():
ncpus = output.split(' ')[1].strip()
else:
ncpus = '1'
version = uname[2]
if version.find('.'):
version = version.split('.')[0]
defines = {
'_ncpus': ('none', 'none', ncpus),
'_os': ('none', 'none', 'darwin'),
'_host': ('triplet', 'required', uname[4] + '-apple-darwin' + uname[2]),
'_host_vendor': ('none', 'none', 'apple'),
'_host_os': ('none', 'none', 'darwin'),
'_host_os_version': ('none', 'none', version),
'_host_cpu': ('none', 'none', uname[4]),
'_host_alias': ('none', 'none', '%{nil}'),
'_host_arch': ('none', 'none', uname[4]),
@ -55,7 +59,6 @@ def load():
'_ld_library_path': ('none', 'none', 'DYLD_LIBRARY_PATH')
}
version = uname[2]
if version.find('.'):
version = version.split('.')[0]
if int(version) >= 13:

View File

@ -52,6 +52,7 @@ def load():
'_host': ('triplet', 'required', cpu + '-freebsd' + version),
'_host_vendor': ('none', 'none', 'pc'),
'_host_os': ('none', 'none', 'freebsd'),
'_host_os_version': ('none', 'none', version),
'_host_cpu': ('none', 'none', cpu),
'_host_alias': ('none', 'none', '%{nil}'),
'_host_arch': ('none', 'none', cpu),

View File

@ -50,12 +50,14 @@ def load():
else:
cpu = uname[4]
version = uname[2]
defines = {
'_ncpus': ('none', 'none', ncpus),
'_os': ('none', 'none', 'linux'),
'_host': ('triplet', 'required', cpu + '-linux-gnu'),
'_host_vendor': ('none', 'none', 'gnu'),
'_host_os': ('none', 'none', 'linux'),
'_host_os_version': ('none', 'none', version),
'_host_cpu': ('none', 'none', cpu),
'_host_alias': ('none', 'none', '%{nil}'),
'_host_arch': ('none', 'none', cpu),

View File

@ -52,6 +52,7 @@ def load():
'_host': ('triplet', 'required', cpu + '-netbsd' + version),
'_host_vendor': ('none', 'none', 'pc'),
'_host_os': ('none', 'none', 'netbsd'),
'_host_os_version': ('none', 'none', version),
'_host_cpu': ('none', 'none', cpu),
'_host_alias': ('none', 'none', '%{nil}'),
'_host_arch': ('none', 'none', cpu),

View File

@ -62,12 +62,14 @@ def load():
else:
ncpus = '1'
version = uname[2]
defines = {
'_ncpus': ('none', 'none', ncpus),
'_os': ('none', 'none', 'win32'),
'_build': ('triplet', 'required', build_triple),
'_build_vendor': ('none', 'none', 'microsoft'),
'_build_os': ('none', 'none', 'win32'),
'_build_os_version': ('none', 'none', version),
'_build_cpu': ('none', 'none', hosttype),
'_build_alias': ('none', 'none', '%{nil}'),
'_build_arch': ('none', 'none', hosttype),