Programming

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000

    6 answers - 281 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I was wondering iof anyone could enlighten me on this gnatmake call.
    i found it on a Mac S/X site.
    i've searched else for setting the stack_size for a main rather than
    for individual tasks.
    any advice appreciated.
    Stuart Clark
  • No.1 | | 820 bytes | |

    stuart clark wrote:
    I was wondering iof anyone could enlighten me on this gnatmake call.

    i found it on a Mac S/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.
  • No.2 | | 372 bytes | |

    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 S/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!

  • No.3 | | 837 bytes | |

    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 S/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:

    #1a0bb4cf713b8abd

    Again thanks for the reply!

    You're welcome.
  • No.4 | | 419 bytes | |

    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

  • No.5 | | 1124 bytes | |

    "stuart clark" <stuartlclark@hotmail.comwrites:

    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 S/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 MS-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 .

  • No.6 | | 38 bytes | |

    Ta, thanks again!!!

Re: gnatmake myProg.adb -largs -Wl,-stack_size -Wl,0x4000000


max 4000 letters.
Your nickname that display:
In order to stop the spam: 6 + 5 =
QUESTION ON "Programming"

EMSDN.COM