It is currently Mon Oct 20, 2014 4:38 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sun Feb 27, 2011 2:10 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
I've tested both on Linux and MinGW. They definitely work.

It works because instead of exporting the variable in the current shell, you're telling it to start the following command "make" with these specified environment variables. So it only affects the make command, and doesn't make a change to the current shell, which is what what the explicit export does.

Only place it won't is Windows Command Prompt - it doesn't have %OSTYPE% as an environment variable, only %OS%.

As I also said earlier, doing an explicit export before the make, also passes the variable through to make.

Sam.


Top
 
PostPosted: Fri Mar 04, 2011 12:11 pm 
Offline
User avatar
 WWW  Profile

Joined: Mon Mar 15, 2010 2:28 pm
Posts: 42
Location: Minehead, Somerset (UK)
I've committed the auto-detection lines for Macosx. Essentially what DaveF said.


Top
 
PostPosted: Mon Nov 07, 2011 12:02 pm 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
In case anyone is interested in the answer to this issue, I figured it out just now (while grappling with GCC for another project).

The solution is simple - it seems that these days the difference between the gcc and g++ executables is more pronounced. BeebAsm used to launch gcc to do both the compiling (of C and C++ source code) and linking, as was the old way. These days it seems that if you want to link a C++ program, you need to invoke the linker with g++ rather than with gcc. If you don't, some essential C++ 'glue' won't be linked in to the executable, even when specifying -lstdc++ on the command line.

Like this, both dynamically and statically linked versions of BeebAsm work fine under GCC / MinGW, without any kind of hacks or special cases for different versions of GCC.

I'll update the BeebAsm repository accordingly when I release a new version.


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron