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
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 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 (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...
[Updated on: Wed, 05 October 2011 04:17] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Apr 29 08:43:18 CEST 2025
Total time taken to generate the page: 0.03444 seconds
|