Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting a larger stack size



On Mar 30, 2006, at 1:14 PM, Stuart Smith wrote:

this document:

http://developer.apple.com/qa/qa2005/qa1419.html

says:

Setting The Stack Size to 16MB (0x1000000)

Using XCode:

Add -stack_size 1000000 to the Other Linker Flags field of the Build Styles
pane.


I did this, but I get the following errors when I try to build:

powerpc-apple-darwin8-g++-4.0.1: 1000000: No such file or directory
powerpc-apple-darwin8-g++-4.0.1: unrecognized option '-stack_size'

Does anyone know how this is supposed to work?

Use -Wl,-stack_size,1000000 instead. Also, I'd suggest filing a bug report against the Q&A to get it corrected.


Also, if you have multiple flags you want to put into OTHER_LINKER_FLAGS,
how should they be separated - spaces, commas? And how should the flags be
separated from their values - spaces seem to work, but in other places (e.g.
compiler flags) I've seen no space, e.g. -O3.

"-O3" is actually a complete flag, not a flag and a value, but that's a technicality. In general you use spaces to separate commands, but when passing arguments through from one part of the build process to another (e.g. -Wl or -Wa) you can use both. For example,
-Wl,-stack_size,1000000
is the same as
-Wl,-stack_size -Wl,1000000
because they're being passed through from the compiler to the linker, but you can't do this:
-O2,-Wall
because those two flags get handled by gcc itself.


In other words, when in doubt, use spaces.

-Eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >setting a larger stack size (From: Stuart Smith <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.