[Scons-users] Cross-OS Cross-Building

Fred Wright fw at fwright.net
Thu Aug 11 16:37:35 EDT 2016


On Wed, 10 Aug 2016, Jason Kenny wrote:

> I am curious on what variables you view are the issue?

The particular one that prompted the investigation is SHLIBSUFFIX.

On Wed, 10 Aug 2016, Bill Deegan wrote:

> Does using this (from manpage)
> Platform(string)
>
> The Platform form returns a callable object that can be used to initialize
> a construction environment using the platform keyword of the Environment
> function.
>
> Example:
>
> env = Environment(platform = Platform('win32'))
[...]

That's sort of what's needed except that the argument is an
*SCons-internal* platform name.  E.g., one can't write Platform('linux'),
but instead has to know that SCons treats Linux (but not all POSIX OSes)
as generic 'posix'.  The problem is that the function that maps the needed
value from the "more public" form of the platform name is tied to os.name
and sys.platform.

It also seems to mix host-related values with target-related values,
though mainly in the area of command paths, which is probably not
disastrous to get wrong.

Ideally it would make a clear distinction between host-related variables
and target-related variables, with a function to set the latter (and only
the latter) based on a well-known form of platform specifier.

Fred Wright


More information about the Scons-users mailing list