[Scons-users] TDM Gcc detection

Bill Deegan bill at baddogconsulting.com
Sat Mar 30 21:46:13 EDT 2013


SCons by design doesn't copy the user's PATH into the execution environment.
This is to ensure a reproducible build. ( A user's odd path shouldn't cause
the build to pick a different tool than another user).

On Unix-like systems SCons will search
'/usr/local/bin:/opt/bin:/bin:/usr/bin', on other platforms there are other
"standard" install locations.

On windows, most software have a default install location (if you don't
change the installers default location). In general it makes sense to
search those locations for a given tool.

That said, there's nothing preventing the users from propagating their
shell PATH into SCons's PATH. (As evidenced by Mark's suggestion).

My query in the earlier email was really asking "If I use the installer,
what path will it try to install in if I don't specify ?"

-Bill



On Sat, Mar 30, 2013 at 6:34 PM, LRN <lrn1986 at gmail.com> wrote:


> -----BEGIN PGP SIGNED MESSAGE-----

> Hash: SHA1

>

> On 31.03.2013 05:18, Bill Deegan wrote:

> > On Sat, Mar 30, 2013 at 4:10 AM, Philipp Kraus

> > <philipp.kraus at flashpixx.de>wrote:

> >

> >> On 2013-03-28 16:58:01 +0100, Mark Holloway said:

> >>

> >> I'm still in scons beginner mode, but the following worked for me

> >> to pull

> >>> in the elements I need in a similar situation with you

> >>> (although a simpler solution would be nice):

> >>>

> >>> env = Environment(tools = ['gcc', 'g++',

> >>> 'ar','gnulink','textfile'], ENV = {'PATH' :

> >>> os.environ['PATH'],'TEMP' : os.environ['TEMP']})

> >>>

> >>> I needed to have those on my path before launching scons

> >>> though.

> >>>

> >>

> >> Yes, that works well, so I use also this calls, but it is

> >> possible that a better solution exists

> >>

> > Is there a standard path for the installation of the tdm-gcc

> > toolsuite?

> >

> > -Bill

> >

> >

> TDM-gcc is mingw-w64.

> mingw-w64 is a mingw.

> Mingws can be installed anywhere.

> Mingws never register themselves in the system, unless a special

> installer does it for them.

> Autotools (primary buildsystem used with mingws) detects toolchain

> presence by looking for compiler executable in current PATH.

> If MSYS is used, MSYS is set up to add the toolchain's bin

> subdirectory to PATH (user configures toolchain location in

> /etc/fstab, and /etc/profile adds it to PATH when MSYS shell starts up)

> If normal W32 shell is used, the it is advisable to create a W32 shell

> script (.cmd or .bat) which would add toolchain's bin subdirectory to

> PATH (and maybe set up other environment variables).

> MSVC does have a shell script like that - it's called "Visual Studio

> Command Prompt" in Start menu, and is actually a .cmd file by the name

> "VC\vcvarsall.bat" in MSVS installation directory.

>

> Please look for tools in PATH.

>

> P.S. User can to add toolchain's bin subdir to system-level or

> user-level PATH, but i would advise against it, since that makes it

> difficult for user to have more than one toolchain active at once.

>

>

>

>

> -----BEGIN PGP SIGNATURE-----

> Version: GnuPG v1.4.11 (MingW32)

> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

>

> iQEcBAEBAgAGBQJRV5KYAAoJEOs4Jb6SI2CwrcYH/2GYwxQ+jhaePiMFmuc6J8C7

> bwQ4Dsj5Qn7ogRxbZEtJw9p1grb1HfBkTARcfsBfWUYT72h01srQvnjkE2GJtVzl

> 425auNfJ2NbrVKqw9yzwLI3s3rWz1yF+aBTe9I2+ImbZD/CL74/wLvx51u+BjFii

> oYAxJ2Q1Kc3XPmq1bYVl6G32f1Z1aJ820Q5knvnmrUZ8UZRJWNR+3VRbRjLYd9Zj

> Qo38ooCxlC8PpEQ7AeQcCEVqUwb6I4eU9bUZNR4ZmB0KgbXPG5Bi9ZYQ1qJkZ+Ug

> +J8XG0Iqx6ndJvFFuPscVTeOo1rwE8tmec+uc7NmvWS5y/g4P67RG4jL1LUdeK4=

> =1gqL

> -----END PGP SIGNATURE-----

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130330/c88f8043/attachment.html>


More information about the Scons-users mailing list