comp.lang.ada
 help / color / mirror / Atom feed
* gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000
@ 2006-03-09 11:17 stuart clark
  2006-03-09 12:25 ` Alex R. Mosteo
  0 siblings, 1 reply; 7+ messages in thread
From: stuart clark @ 2006-03-09 11:17 UTC (permalink / raw)


I was wondering iof anyone could enlighten me on this gnatmake call.

i found it on a Mac OS/X site.

i've searched else for setting the stack_size for a main rather than
for individual tasks.

any advice appreciated.

Stuart Clark




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000
  2006-03-09 11:17 gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000 stuart clark
@ 2006-03-09 12:25 ` Alex R. Mosteo
  2006-03-09 12:31   ` stuart clark
  0 siblings, 1 reply; 7+ messages in thread
From: Alex R. Mosteo @ 2006-03-09 12:25 UTC (permalink / raw)


stuart clark wrote:
> I was wondering iof anyone could enlighten me on this gnatmake call.
> 
> i found it on a Mac OS/X site.
> 
> i've searched else for setting the stack_size for a main rather than
> for individual tasks.
> 
> any advice appreciated.

I'm not sure if you can control the stack size of the main task. When 
needed, the advice I've seen is to have a dummy (empty) main procedure 
and put all computation in a regular task, where you can use pragma 
Stack_Size.

Though this can be a problem if you're using a runtime without tasking 
or some other similar restrictions, I guess...

This is in the Ada side of things. The linker argument is the operating 
system counterpart, and I don't know the fine interactions between the two.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000
  2006-03-09 12:25 ` Alex R. Mosteo
@ 2006-03-09 12:31   ` stuart clark
  2006-03-09 13:33     ` Alex R. Mosteo
  2006-03-09 20:24     ` Simon Wright
  0 siblings, 2 replies; 7+ messages in thread
From: stuart clark @ 2006-03-09 12:31 UTC (permalink / raw)


Thanks i had thought of the BRUTE froce approach.

i am still having trouble finding anythnig on this gnatmake -stack_size
option. this command i found on the Mac OS/X forum is the only place i
have seen it.

Have you seen it before??? -largs is linker arguments, i am trying to
find -Wl, -stack_size...

Again thanks for the reply!




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000
  2006-03-09 12:31   ` stuart clark
@ 2006-03-09 13:33     ` Alex R. Mosteo
  2006-03-09 15:11       ` stuart clark
  2006-03-09 20:24     ` Simon Wright
  1 sibling, 1 reply; 7+ messages in thread
From: Alex R. Mosteo @ 2006-03-09 13:33 UTC (permalink / raw)


stuart clark wrote:
> Thanks i had thought of the BRUTE froce approach.
> 
> i am still having trouble finding anythnig on this gnatmake -stack_size
> option. this command i found on the Mac OS/X forum is the only place i
> have seen it.
> 
> Have you seen it before??? -largs is linker arguments, i am trying to
> find -Wl, -stack_size...

I hadn't seen that exact form before. Then, I remember some thread about 
how to pass these arguments to the linker under linux and windows, and 
different people used slightly different recipes. In the end, I guess 
you have to research two things: how to pass arguments to the underlying 
linker, and what that linker will accept in your system...

Check this thread:

http://groups.google.com/group/comp.lang.ada/browse_frm/thread/906c8a02036e8ea5/1a0bb4cf713b8abd?tvc=1&q=linker+stack#1a0bb4cf713b8abd

> Again thanks for the reply!

You're welcome.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000
  2006-03-09 13:33     ` Alex R. Mosteo
@ 2006-03-09 15:11       ` stuart clark
  0 siblings, 0 replies; 7+ messages in thread
From: stuart clark @ 2006-03-09 15:11 UTC (permalink / raw)


i have discovered how to pass switches/options to the system linker
that gcc linker doesnt understand, ie use the -Wl or -Xlink switches,

so

gnatmake myprog -largs -Wl,-stack_size

-largs = pass switches to linker
-Wl, passes the -stack_size switch which gcc linker doesnt understand
to the system linker which does understand to set the main taks stack
size.......

Stuart




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000
  2006-03-09 12:31   ` stuart clark
  2006-03-09 13:33     ` Alex R. Mosteo
@ 2006-03-09 20:24     ` Simon Wright
  2006-03-09 22:37       ` stuart clark
  1 sibling, 1 reply; 7+ messages in thread
From: Simon Wright @ 2006-03-09 20:24 UTC (permalink / raw)


"stuart clark" <stuartlclark@hotmail.com> writes:

> Thanks i had thought of the BRUTE froce approach.
>
> i am still having trouble finding anythnig on this gnatmake -stack_size
> option. this command i found on the Mac OS/X forum is the only place i
> have seen it.
>
> Have you seen it before??? -largs is linker arguments, i am trying to
> find -Wl, -stack_size...

-Wl,xxx is an instruction to gcc to pass xxx to the underlying linker
(ld). So gcc sees
   -Wl,-stack_size -Wl,0x4000000
and ld sees
   -stacksize 0x4000000

This is very likely MocOS-specific; here, 'man ld' says

      -stack_size value
              Specifies  the size of the stack segment value, where value is a
              hexadecimal  number  rounded  to  the  segment  alignment.   The
              default  segment  alignment  is  the target pagesize (currently,
              1000 hexadecimal for the PowerPC and for i386).  If  -stack_addr
              is  specified  and -stack_size is not, a default stack size spe-
              cific for the architecture being linked will  be  used  and  its
              value  printed  as  a  warning  message.  This creates a segment
              named __UNIXSTACK .

.....



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000
  2006-03-09 20:24     ` Simon Wright
@ 2006-03-09 22:37       ` stuart clark
  0 siblings, 0 replies; 7+ messages in thread
From: stuart clark @ 2006-03-09 22:37 UTC (permalink / raw)


Ta, thanks again!!!




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-03-09 22:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-09 11:17 gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000 stuart clark
2006-03-09 12:25 ` Alex R. Mosteo
2006-03-09 12:31   ` stuart clark
2006-03-09 13:33     ` Alex R. Mosteo
2006-03-09 15:11       ` stuart clark
2006-03-09 20:24     ` Simon Wright
2006-03-09 22:37       ` stuart clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox