Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #7830 > unrolled thread

Tiny C compiler option to set the stack size of an executable

Started bytm <thomas.mertes@gmx.at>
First post2011-07-07 05:53 -0700
Last post2011-07-10 00:22 -0700
Articles 11 — 6 participants

Back to article view | Back to comp.lang.c


Contents

  Tiny C compiler option to set the stack size of an executable tm <thomas.mertes@gmx.at> - 2011-07-07 05:53 -0700
    Re: Tiny C compiler option to set the stack size of an executable Dirk Zabel <zabel@riccius-sohn.eu> - 2011-07-07 18:51 +0200
      Re: Tiny C compiler option to set the stack size of an executable Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-07-09 06:29 -0700
        Re: Tiny C compiler option to set the stack size of an executable gazelle@shell.xmission.com (Kenny McCormack) - 2011-07-09 13:40 +0000
        Re: Tiny C compiler option to set the stack size of an executable Dirk Zabel <zabel@riccius-sohn.eu> - 2011-07-13 13:32 +0200
          Re: Tiny C compiler option to set the stack size of an executable gazelle@shell.xmission.com (Kenny McCormack) - 2011-07-13 15:22 +0000
    Re: Tiny C compiler option to set the stack size of an executable Roberto Waltman <usenet@rwaltman.com> - 2011-07-07 16:51 -0400
      Re: Tiny C compiler option to set the stack size of an executable tm <thomas.mertes@gmx.at> - 2011-07-07 14:45 -0700
        [OT] Re: Tiny C compiler option to set the stack size of an executable Roberto Waltman <usenet@rwaltman.com> - 2011-07-09 19:18 -0400
    Re: Tiny C compiler option to set the stack size of an executable Geoff <geoff@invalid.invalid> - 2011-07-09 13:45 -0700
      Re: Tiny C compiler option to set the stack size of an executable tm <thomas.mertes@gmx.at> - 2011-07-10 00:22 -0700

#7830 — Tiny C compiler option to set the stack size of an executable

Fromtm <thomas.mertes@gmx.at>
Date2011-07-07 05:53 -0700
SubjectTiny C compiler option to set the stack size of an executable
Message-ID<042aa166-b727-4f54-8772-943f964b6f1b@y30g2000yqb.googlegroups.com>
Hello.

Is there a tcc option to set the stack size of an executable?

I compiled my project (http://seed7.sourceforge.net) with
tcc version 0.9.25 under Windows and Linux. Most things
work, but some programs crash, because the stack is too
small (I am quite sure it is a stack size problem. You can
save the time to tell me about endless recursions, etc. ).
Compilers/linkers usually have a possibility to set the stack
size. For Windows + MinGW gcc I use the option:

  -Wl,--stack,4194304

Other compilers have similar options. A solution which
uses gcc as linker would not be helpful, since I want to
provide a makefile for people who just have tcc installed.


Greetings Thomas Mertes

--
Seed7 Homepage:  http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.

[toc] | [next] | [standalone]


#7855

FromDirk Zabel <zabel@riccius-sohn.eu>
Date2011-07-07 18:51 +0200
Message-ID<97m6h3Fej1U1@mid.uni-berlin.de>
In reply to#7830
Am 07.07.2011 14:53, schrieb tm:
> Hello.
>
> Is there a tcc option to set the stack size of an executable?
>
> I compiled my project (http://seed7.sourceforge.net) with
> tcc version 0.9.25 under Windows and Linux. Most things
> work, but some programs crash, because the stack is too
> small (I am quite sure it is a stack size problem. You can
> save the time to tell me about endless recursions, etc. ).
> Compilers/linkers usually have a possibility to set the stack
> size. For Windows + MinGW gcc I use the option:
>
>    -Wl,--stack,4194304
>
> Other compilers have similar options. A solution which
> uses gcc as linker would not be helpful, since I want to
> provide a makefile for people who just have tcc installed.

I think this is a tcc-specific question, so it's OT in this group.
The tcc documentation should cover that question. In general, the stack 
size an executable may use depends on target architecture and linker 
options, not on the compiler (as long as the compiler does not generate 
absolute machine code for exotic tiny platforms).
Regards
   Dirk

[toc] | [prev] | [next] | [standalone]


#8029

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2011-07-09 06:29 -0700
Message-ID<a1153f4a-ed3b-47d6-8230-e2fbe19bd2f4@hi9g2000vbb.googlegroups.com>
In reply to#7855
On Jul 7, 7:51 pm, Dirk Zabel <za...@riccius-sohn.eu> wrote:
>
> I think this is a tcc-specific question, so it's OT in this group.
>
Not really. It's a pretty general question, and there are no tcc
newsgroups.

The idea of making platform-specific questions off-topic is to prevent
the newsgroup being flooded with people wanting to know how to make
Windows library calls, not to close down discussion of individual
compilers. A certain amount of sensitivity is required.

[toc] | [prev] | [next] | [standalone]


#8030

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2011-07-09 13:40 +0000
Message-ID<iv9loi$41v$1@news.xmission.com>
In reply to#8029
In article <a1153f4a-ed3b-47d6-8230-e2fbe19bd2f4@hi9g2000vbb.googlegroups.com>,
Malcolm McLean  <malcolm.mclean5@btinternet.com> wrote:
>On Jul 7, 7:51 pm, Dirk Zabel <za...@riccius-sohn.eu> wrote:
>>
>> I think this is a tcc-specific question, so it's OT in this group.
>>
>Not really. It's a pretty general question, and there are no tcc
>newsgroups.
>
>The idea of making platform-specific questions off-topic is to prevent
>the newsgroup being flooded with people wanting to know how to make
>Windows library calls, not to close down discussion of individual
>compilers. A certain amount of sensitivity is required.

Leader Kiki is not going to like this.

-- 
But the Bush apologists hope that you won't remember all that. And they
also have a theory, which I've been hearing more and more - namely,
that President Obama, though not yet in office or even elected, caused the
2008 slump. You see, people were worried in advance about his future
policies, and that's what caused the economy to tank. Seriously.

    (Paul Krugman - Addicted to Bush)

[toc] | [prev] | [next] | [standalone]


#8230

FromDirk Zabel <zabel@riccius-sohn.eu>
Date2011-07-13 13:32 +0200
Message-ID<985e1tF6hiU1@mid.uni-berlin.de>
In reply to#8029
Am 09.07.2011 15:29, schrieb Malcolm McLean:
> On Jul 7, 7:51 pm, Dirk Zabel<za...@riccius-sohn.eu>  wrote:
>>
>> I think this is a tcc-specific question, so it's OT in this group.
>>
> Not really. It's a pretty general question, and there are no tcc
> newsgroups.
>
> The idea of making platform-specific questions off-topic is to prevent
> the newsgroup being flooded with people wanting to know how to make
> Windows library calls, not to close down discussion of individual
> compilers. A certain amount of sensitivity is required.
>
>
I didn't mean to be rude, but I thought the changes for help are better 
if you are looking at the proper place. In fact, the OP did this 
successfully:
<http://lists.nongnu.org/archive/html/tinycc-devel/2011-07/msg00021.html>

Regards
  Dirk

[toc] | [prev] | [next] | [standalone]


#8236

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2011-07-13 15:22 +0000
Message-ID<ivkd8c$h3c$1@news.xmission.com>
In reply to#8230
In article <985e1tF6hiU1@mid.uni-berlin.de>,
Dirk Zabel  <zabel@riccius-sohn.eu> wrote:
...
>I didn't mean to be rude, but I thought the changes for help are better 

I assume you meant "chances".

>if you are looking at the proper place. In fact, the OP did this 
>successfully:
><http://lists.nongnu.org/archive/html/tinycc-devel/2011-07/msg00021.html>

The problem with this mode of thinking is that it is too much in line with
the often-made (and dead-on spot-accurate) observation that Republicans are
always whining that government can't do anything right - and when they get
themselves elected, they prove it so.

I.e., this sort of question *should* be answerable in a group about C, but
because of the dorks who rule this joint, it isn't.  And pointing out that
he *did* get help elsewhere is not exactly a shining justification for not
helping him here.

-- 
They say compassion is a virtue, but I don't have the time!

    - David Byrne -

[toc] | [prev] | [next] | [standalone]


#7882

FromRoberto Waltman <usenet@rwaltman.com>
Date2011-07-07 16:51 -0400
Message-ID<r07c179f3l6shc4objc1v6f6dl5hdc0isa@4ax.com>
In reply to#7830
 tm <thomas.mertes@gmx.at> wrote:
>Is there a tcc option to set the stack size of an executable?

There is a tinycc mailing list here:
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

--
Roberto Waltman

[ Please reply to the group.
  Return address is invalid ]

[toc] | [prev] | [next] | [standalone]


#7891

Fromtm <thomas.mertes@gmx.at>
Date2011-07-07 14:45 -0700
Message-ID<c460ae69-be5f-4529-bc0f-327fa4482f9e@eb1g2000vbb.googlegroups.com>
In reply to#7882
On 7 Jul., 22:51, Roberto Waltman <use...@rwaltman.com> wrote:
>  tm <thomas.mer...@gmx.at> wrote:
> >Is there a tcc option to set the stack size of an executable?
>
> There is a tinycc mailing list here:http://lists.nongnu.org/mailman/listinfo/tinycc-devel

First I sent a mail to tinycc-devel, and it was
**automatically rejected**. Then I sent a mail to the
owner of tinycc-devel. I am still waiting for an answer.

Maybe someone with tcc background listens in this group...

Help would be very welcome.


Greetings Thomas Mertes

--
Seed7 Homepage:  http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.

[toc] | [prev] | [next] | [standalone]


#8046 — [OT] Re: Tiny C compiler option to set the stack size of an executable

FromRoberto Waltman <usenet@rwaltman.com>
Date2011-07-09 19:18 -0400
Subject[OT] Re: Tiny C compiler option to set the stack size of an executable
Message-ID<etnh179g0doec7b77ak6ack3hmv9oj8ftd@4ax.com>
In reply to#7891
 tm wrote:
>First I sent a mail to tinycc-devel, and it was
>**automatically rejected**. ..

Did you subscribe to the list before sending your message?
Unlike this newsgroup, most mailing lists will allow postings only
from email addresses already registered.   Some also put new
subscribers in "moderated" status, until they post 1 or 2 relevant
messages.
 (Reasonable measures, to avoid automated spam.)
--
Roberto Waltman

[ Please reply to the group,
  return address is invalid ]

[toc] | [prev] | [next] | [standalone]


#8042

FromGeoff <geoff@invalid.invalid>
Date2011-07-09 13:45 -0700
Message-ID<6cfh17dedtdqc76274ote9e5m96a6c8ml5@4ax.com>
In reply to#7830
On Thu, 7 Jul 2011 05:53:54 -0700 (PDT), tm <thomas.mertes@gmx.at>
wrote:

>Hello.
>
>Is there a tcc option to set the stack size of an executable?
>
>I compiled my project (http://seed7.sourceforge.net) with
>tcc version 0.9.25 under Windows and Linux. Most things
>work, but some programs crash, because the stack is too
>small (I am quite sure it is a stack size problem. You can
>save the time to tell me about endless recursions, etc. ).
>Compilers/linkers usually have a possibility to set the stack
>size. For Windows + MinGW gcc I use the option:
>
>  -Wl,--stack,4194304
>
>Other compilers have similar options. A solution which
>uses gcc as linker would not be helpful, since I want to
>provide a makefile for people who just have tcc installed.
>
>

TCC's stack size is hard coded at 256. (VSTACK_SIZE)

[toc] | [prev] | [next] | [standalone]


#8054

Fromtm <thomas.mertes@gmx.at>
Date2011-07-10 00:22 -0700
Message-ID<b08ffee0-672f-490a-a635-14b993ee281b@n5g2000yqh.googlegroups.com>
In reply to#8042
On 9 Jul., 22:45, Geoff <ge...@invalid.invalid> wrote:
> On Thu, 7 Jul 2011 05:53:54 -0700 (PDT), tm <thomas.mer...@gmx.at>
> wrote:
>
>
>
> >Hello.
>
> >Is there a tcc option to set the stack size of an executable?
>
> >I compiled my project (http://seed7.sourceforge.net) with
> >tcc version 0.9.25 under Windows and Linux. Most things
> >work, but some programs crash, because the stack is too
> >small (I am quite sure it is a stack size problem. You can
> >save the time to tell me about endless recursions, etc. ).
> >Compilers/linkers usually have a possibility to set the stack
> >size. For Windows + MinGW gcc I use the option:
>
> >  -Wl,--stack,4194304
>
> >Other compilers have similar options. A solution which
> >uses gcc as linker would not be helpful, since I want to
> >provide a makefile for people who just have tcc installed.
>
> TCC's stack size is hard coded at 256. (VSTACK_SIZE)

I guess it is not 256 bytes, but probably 25kB. :-)
Tcc seems useable for compiling Seed7 (several tests succeed),
except for the stack size, which is too small (exactly the
same programs fail, that also have problems when other C
compilers/linkers use a small stack size).

So increasing TCC's VSTACK_SIZE is really important,
otherwise TCC cannot be used as backend for Seed7.


Greetings Thomas Mertes

--
Seed7 Homepage:  http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c


csiph-web