[ros-dev] [ros-diffs] [dgorbachev] 26483: Undo r26482 change, waste more stack space.

Peter Dolding oiaohm at bluebottle.com
Wed Apr 25 05:40:34 CEST 2007


You don't need to exactly rebuild.
There is a reason why gcc supports spec override..

Its not exactly broken.  -fomit-frame-pointer -mrtd combination has 
problems.  Note -mrtd is not the only flag that does bad things with 
-fomit-frame-pointer.  That fault only appeared gcc 4.x.x.  Note mingw 
alterations to gcc also breaks  -fomit-frame-pointer in versions of gcc 
before it.  In gcc release's 2.95. broken.  3.0.0 was fixed.  Mingw 
patchs have been breaking it.  Reason why I am trying to get where able 
standard release gcc used.  At least known problems and fixed problems 
not being kept alive.

Other problem is mingw itself.  __attribute__((cdecl)) is missing off a 
lot of functions.  So it stuffs up really bad ways when the functions 
missing the flag are used as stdcall. instead of cdecl.

Not all the problem is Gcc.    Even if gcc fully fixed the faults with 
-mrtd its still not going to work with mingw.   Reason why with this 
problem part if it getting up mingw ribs not to break things.

Reason to rebuild gcc with stdcall,  the internal functions can be built 
using stdcall only.  No need for cdecl at all. cdecl has nothing to do 
with c or c++.  It was just a microsoft/borland warped idea that two 
different systems had to be used.  So if you are going after speed you 
might exactly want this.   Just using flags you still endup with cdecl 
used with internal gcc functions.  Same kinda things happen with the 
Microsoft complier too.  Gcc does give the option of using stdcall 
completely.

Please note I do use the -mrtd and stdcall default gcc compliers.
Alex Ionescu wrote:
> That's all great except that every other compiler on the planet lets you
> specify the default convention PER PROJECT. Are you saying that with GCC, I
> need to recompile the compiler for every single application I want to ship?
> Maybe I have a fastcall stub DLL, a stdcall program and a cdecl C compatible
> DLL. I need three compilers for that? That's rubbish.
>
> Fortunately, gcc does support a flag, -mrtd. Oh, but guess what, it's been
> broken since 2.95.
>
> -----Original Message-----
> From: ros-dev-bounces at reactos.org [mailto:ros-dev-bounces at reactos.org] On
> Behalf Of hto at mail.cnt.ru
> Sent: April-24-07 9:09 PM
> To: ReactOS Development List
> Subject: Re: [ros-dev] [ros-diffs] [dgorbachev] 26483: Undo r26482 change,
> waste more stack space.
>
>   
>> stdcall default can be by altering spec file.  If mingw/cygwin don't 
>> update there spec file in gcc that is there problem.  As well there is a 
>> flag to make stdcall default |-mrtd.  Little bit of a confusing name.  
>> Yes its provided for some strange reason mingw and cygwin don't use it.  
>> Windows is not the only OS with stdcall default.  Some unix's its also 
>> default nothing that strange other than mingw/cygwin not using it.  If 
>> in time rosbe becomes its own complier in gcc with its own spec file 
>> there is not reason why reactos cannot have it.  Its the maintainers of 
>> mingw/cygwin that have set the defaults without it.  So over the stdcall 
>> one either get up mingw/cygwin ribs or request rosbe gets a spec file of 
>> its own in gcc with reactos preferred settings.|
>>     
>
> That is not strange. GCC's aim to provide uniform environment on 
> different machines.
>   
Yes but select partial platforms stdcall is default.   It is up to the 
platform to set is default calling method.  For some strange reason 
mingw and cygwin is choosing cdecl.  I find it strange since MSVC was 
different.

Gcc is a uniform build environment.  Not a uniform calling convention..

Peter Dolding

----------------------------------------------------------------------
Get a free email account with anti spam protection.
http://www.bluebottle.com



More information about the Ros-dev mailing list