[Scons-users] Cross-OS Cross-Building
Bill Deegan
bill at baddogconsulting.com
Wed Aug 10 22:57:01 EDT 2016
Fred,
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'))
The env.Platform form applies the callable object for the specified
platform string to the environment through which the method was called.
env.Platform('posix')
Note that the win32 platform adds the SystemDrive and SystemRoot variables
from the user's external environment to the construction environment's $ENV
<http://scons.org/doc/production/HTML/scons-man.html#cv-ENV> dictionary.
This is so that any executed commands that use sockets to connect with
other systems (such as fetching source files from external CVS repository
specifications like :pserver:anonymous at cvs.sourceforge.net:/cvsroot/scons)
will work on Windows systems.
Not work?
-Bill
On Wed, Aug 10, 2016 at 5:35 PM, Fred Wright <fw at fwright.net> wrote:
>
> On Tue, 9 Aug 2016, Jason Kenny wrote:
>
> > I been doing cross platform builds for years. If you choose use Parts
> with
> > Scons you will find it very easy to setup.
>
> Adding another dependency to GPSD is a non-starter, especially if it's
> purely for cross-building. Having to accomodate a range of SCons versions
> is trouble enough.
>
> > Overall SCons only has a notion of the Host build platform, not the
> Target.
> > This means that if you use raw scons you will need to create an
> environment
> > by hand with the correct tools and flags set it in.
>
> Well the SCons documentation *claims* it handles cross-building well, it's
> just that the claim is overstated. :-)
>
> > I am not sure why you feel you need to redefine anything in SCons. Given
> you
> > are build cross 32-bit/64-bit or to a different OS such as Android,
> etc...
> > The given tools have to work on the host you are building on.
>
> The particular issue that prompted the investigation is that when
> cross-bulding for Linux on OSX, it wants to use a .dylib extension rather
> than .so on shared libraries. The extension is being supplied by SCons,
> not the toolchain. It's probably not the only such issue.
>
> > SCons does not provide a Target set of variables, it current assume you
> will
> > provide this and you will map them to any tool that support cross builds
> > correctly.
>
> It already has the means to set up certain construction variables in a
> manner appropriate to the platform. The problem is just that it doesn't
> make that mechanism available for a specifiable platform, for no terribly
> good reason. Duplicating that logic separately would be rather silly.
>
> If the platform setup sets some global variables in addition to
> construction varaibles, then one might need to call it again for the host
> platform after setting up the target environment. That way the host and
> target environments can have the approriately different settings, while
> the global settings will be correct for the host.
>
> Fred Wright
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160810/21e30e05/attachment.html>
More information about the Scons-users
mailing list