[Scons-users] Cross-OS Cross-Building
Fred Wright
fw at fwright.net
Wed Aug 10 17:35:55 EDT 2016
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
More information about the Scons-users
mailing list