Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OS » Solution howto enable upp Multithreading with TLS on MacOSX.
Solution howto enable upp Multithreading with TLS on MacOSX. [message #33977] Wed, 05 October 2011 04:15
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
I was very disappointed (and wasted many days...) when upp with MT flag used to fail to compile with this error:
error: thread-local storage not supported for this target
up until yesterday when I discovered that I need several things:

1. Install e.g gcc46 because officially supplied gcc 4.2.1 doesn't support TLS.
2. Overcome gcc46 installation bug:
"Selecting 'mp-gcc46' for 'gcc' failed"

when selecting with:
sudo port select --set gcc mp-gcc46

as mentioned in https://trac.macports.org/ticket/30357
Solution - use the command but don't pay attention to the error and put eg
x86_64-apple-darwin10-gcc-4.6.1
into theide Build Methods -> Compiler name.
after rebooting (maybe several times) gcc46 is selected despite the above... and then you can use simply
g++
again.
(check the version in terminal)

3. (if you get linking errors about architecture etc.) don't use SDK 10.5 which silently is linked first but ADD to the above e.g
-mmacosx-version-min=10.6.7
into theide Build Methods -> Compiler name.

4. add
 -lstdc++
(Pay attention to the space or you might get errors) into the ide Build Methods -> Link Options .

I hope it saves you some time and you don't start porting TLS for the upp, Mac and gcc... Smile

[Updated on: Wed, 05 October 2011 04:17]

Report message to a moderator

Previous Topic: plugin/ndisasm doesn't compile due to snprintf etc. errors
Next Topic: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11
Goto Forum:
  


Current Time: Fri Mar 29 02:39:16 CET 2024

Total time taken to generate the page: 0.01104 seconds