Bug 5372

Summary: [powerpc-*-eabi] -mno-eabi not working
Product: gcc Reporter: antti-pekka.virjonen
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: gcc-bugs, segher, vsh
Priority: P3 Keywords: documentation
Version: 3.0.3   
Target Milestone: ---   
Host: i686-pc-cygwin Target: powerpc-*-eabi
Build: i686-pc-cygwin Known to work:
Known to fail: Last reconfirmed: 2004-01-02 06:15:10

Description antti-pekka.virjonen 2002-01-14 02:06:01 UTC
GCC-3.0.3 cross compiler for powerpc-*-eabi running under
Cygwin slightly illbehaves. When used with the -mno-eabi
option, the compiler still generates a call to the __eabi
function. According to the Gcc man-page, this should not
happen. Otherwise the -mno-eabi -option seems to work ok 
(stack alignment changes like it should).

The older compiler (Gcc egcs-2.91.66 under Linux (Redhat 7.1))
works ok in this respect (though it seems to handle these
things differently).

Pretty easy to get around this is to add a void __eabi()
function in the application code... but it would be
nice if it worked correctly out of box.

Regards,
Antti-Pekka

Release:
GCC-3.0.3

Environment:
Cygwin (current) under Win2K
Comment 1 Wolfgang Bangerth 2002-12-21 09:34:51 UTC
State-Changed-From-To: open->feedback
State-Changed-Why: gcc3.0 is slightly out of date by now. Do you know whether
    the same problem still happens with gcc3.2.1?
    
    Thanks
      Wolfgang
Comment 2 Dara Hazeghi 2003-05-07 18:32:17 UTC
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
   antti-pekka.virjonen@computec.fi
Cc:  
Subject: Re: target/5372: [powerpc-*-eabi] -mno-eabi not working
Date: Wed, 7 May 2003 18:32:17 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=5372
 
 Hello,
 
 could the submitter of this report please include a testcase which  
 fails, and if possible, determine if the bug still exists in a more  
 current version of gcc (ie 3.2.3).
 
 Thanks,
 
 Dara
Comment 3 Dara Hazeghi 2003-06-02 02:04:04 UTC
*** Bug 5138 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Pinski 2003-06-28 19:52:04 UTC
In the bug that was marked as dup of this one, the reporter says that there was a 
reference to an undefined function and that it was that way in 3.2.
Comment 5 Andrew Pinski 2004-01-02 06:15:07 UTC
Reconfirmed, the problem is that the header file eabi.h contains this:
/* Invoke an initializer function to set up the GOT.  */
#define NAME__MAIN "__eabi"
#define INVOKE__main
So it is defined always and HAS_INIT_SECTION is not defined so __eabi is aways called 
which goes against the documentation but I think the documentation is wrong and this is 
the correct behavior.
Comment 6 Segher Boessenkool 2013-01-09 16:14:11 UTC
Still happens with current mainline.