From e7aedfff52ec8601eecda990646367d7109db360 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 24 Dec 2017 00:28:35 +0000 Subject: [PATCH] Whitelist openbsd6 as valid host_platform in SConstruct thfrwn reports that OpenBSD (almost) works as-is, except that its Python `sys.platform` is not in the allowed values list. Add it to the list. By happy accident, unhandled `host_platform` is treated as `'linux'` and `'linux'` produces the right result for OpenBSD. Requested-by: thfrwn --- SConstruct | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index d2fb02ef2..149a7dd32 100644 --- a/SConstruct +++ b/SConstruct @@ -3408,7 +3408,7 @@ class DXXCommon(LazyObjectConstructor): 'variable': EnumVariable, 'arguments': ( ('host_endian', None, 'endianness of host platform', {'allowed_values' : ('little', 'big')}), - ('host_platform', 'linux' if sys.platform == 'linux2' else sys.platform, 'cross-compile to specified platform', {'allowed_values' : ('win32', 'darwin', 'linux')}), + ('host_platform', 'linux' if sys.platform == 'linux2' else sys.platform, 'cross-compile to specified platform', {'allowed_values' : ('darwin', 'linux', 'openbsd6', 'win32')}), ), }, { @@ -3868,6 +3868,9 @@ class DXXCommon(LazyObjectConstructor): machine = None message(self, "compiling on %r/%r for %r into %s%s" % (sys.platform, machine, platform_name, self.user_settings.builddir or '.', (' with prefix list %s' % str(self._argument_prefix_list)) if self._argument_prefix_list else '')) + # By happy accident, LinuxPlatformSettings produces the desired + # result on OpenBSD, so there is no need for specific handling + # of `platform_name == 'openbsd6'`. return ( self.Win32PlatformSettings if platform_name == 'win32' else ( self.DarwinPlatformSettings if platform_name == 'darwin' else