Portable GCC

Programming, for all ages and all languages.
Post Reply
hwg
Posts: 22
Joined: Wed Nov 18, 2015 11:56 am
Libera.chat IRC: hwg

Portable GCC

Post by hwg »

Is there any way to make a portable GCC, e.g. through static linkage and a custom PATH? Portable here would mean that the compiler could be run totally from a flash drive.
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: Portable GCC

Post by Nable »

I've successfully run GCC from flash drive using chroot. I don't know whether it suits you but it worked for me.
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: Portable GCC

Post by Octocontrabass »

Do you need something for Windows? MSYS is supposed to be pretty portable, although you may have to get clever with its fstab to make it work. Combine that with GCC (I like to use the one from here, but MinGW-w64 includes a perfectly usable GCC) and you should have a portable development environment.
MasterLee
Member
Member
Posts: 90
Joined: Fri Mar 13, 2009 8:51 am

Re: Portable GCC

Post by MasterLee »

Octocontrabass wrote:…but MinGW-w64 includes a perfectly usable GCC) and you should have a portable development environment.
GCC is also included in portable version of DevCPP http://orwelldevcpp.blogspot.de/
50₰
hwg
Posts: 22
Joined: Wed Nov 18, 2015 11:56 am
Libera.chat IRC: hwg

Re: Portable GCC

Post by hwg »

MinGW is indeed a good compiler; however, people on this forum have strongly recommended using a cross compiler.
Nable wrote:I've successfully run GCC from flash drive using chroot. I don't know whether it suits you but it worked for me.
How would one go about setting the chroot up? debootstrap?
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: Portable GCC

Post by FallenAvatar »

hwg wrote:MinGW is indeed a good compiler;
Umm, what? MinGW is not a compiler...

- Monk
hwg
Posts: 22
Joined: Wed Nov 18, 2015 11:56 am
Libera.chat IRC: hwg

Re: Portable GCC

Post by hwg »

Excuse the terminology. MinGW provides a good compiler.
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: Portable GCC

Post by Octocontrabass »

hwg wrote:MinGW is indeed a good compiler; however, people on this forum have strongly recommended using a cross compiler.
I specified MSYS because you need it to build a cross compiler. :wink:
Post Reply