Bug 21751 - [csl-arm-branch and HEAD] fails to bootstrap with EABI
Summary: [csl-arm-branch and HEAD] fails to bootstrap with EABI
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-25 14:04 UTC by bero
Modified: 2009-04-29 16:40 UTC (History)
2 users (show)

See Also:
Host: i686-ark-linux
Target: armv5tel-ark-linux
Build: i686-ark-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments
possible fix (215 bytes, patch)
2005-05-25 14:28 UTC, bero
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bero 2005-05-25 14:04:03 UTC
Compiling csl-arm-branch with --with-abi=iwmmxt fails in csl_arm_branch as of  
2005/05/25:   
   
gcc/crtstuff.c: In function `__do_global_dtors_aux':  
gcc/crtstuff.c:260: error: `__DTOR_LIST__' undeclared (first use in this  
function)  
gcc/crtstuff.c:260: error: (Each undeclared identifier is reported only once  
gcc/crtstuff.c:260: error: for each function it appears in.)  
make[1]: *** [crtbegin.o] Error 1  
  
 
The problem is that crtstuff.c (__do_global_dtors_aux()) uses __DTOR_LIST__ 
whenever FINI_ARRAY_SECTION_ASM_OP isn't set (which is the case for arm w/ 
EABI), but DTOR_LIST_BEGIN isn't #defined to define __DTOR_LIST__ if 
__ARM_EABI__ is defined (gcc/config/arm/arm.h).
Comment 1 bero 2005-05-25 14:28:49 UTC
Created attachment 8966 [details]
possible fix

Attaching a patch that makes it compile and (at least to me) looks like it'll
generate the right code.

The patch itself is definitely wrong though (breaks other arches) - it's
probably a matter of adding the right #include somewhere (not familiar with gcc
internals to figure out what exactly should be done).
Comment 2 bero 2005-05-26 19:49:19 UTC
This is reproducable on HEAD branch as well; it's not limited to  
csl-arm-branch. 
 
The patch I've attached is not sufficient to fix it; the resulting compiler 
sort of works, but produces something like this: 
descriptor_test.o(.text+0xc88): In function `global constructors keyed to 
main': 
descriptor_test.cpp: undefined reference to `__aeabi_atexit' 
/stuff/tmp/cross/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/bin/ld: 
warning: .fini_array section has zero size 
 
when building C++ libraries. 
Comment 3 Daniel Jacobowitz 2005-05-27 19:28:48 UTC
You haven't said how you configured GCC.  I'm guessing you configured for
arm-linux, but with an AAPCS-compatible ABI; you can't do that.  The error isn't
the greatest, but it's hard to guard against all possible misuses of --with options.

The target is arm-none-linux-gnueabi, or arm-none-linuxeabi.

The later error is because your glibc does not include EABI support.  Please see
the libc-alpha list archives for patches, or the source tarballs available from
my company's ARM toolchains for an already-patched version of glibc:
  http://www.codesourcery.com/gnu_toolchains/arm/
Comment 4 bero 2005-05-27 20:57:57 UTC
Yes, configuration was  
  
../confiugre --prefix=/usr --target=armv5tel-ark-linux --with-abi=iwmmxt  
--with-arch=iwmmxt --with-cpu=iwmmxt  
  
Trying with -gnueabi now -- but shouldn't --with-abi=iwmmxt imply that 
automatically? 
Comment 5 Daniel Jacobowitz 2005-05-27 21:02:28 UTC
Subject: Re:  [csl-arm-branch and HEAD] fails to bootstrap with EABI

On Fri, May 27, 2005 at 08:57:59PM -0000, bero at arklinux dot org wrote:
> Yes, configuration was  
>   
> ../confiugre --prefix=/usr --target=armv5tel-ark-linux --with-abi=iwmmxt  
> --with-arch=iwmmxt --with-cpu=iwmmxt  
>   
> Trying with -gnueabi now -- but shouldn't --with-abi=iwmmxt imply that 
> automatically? 

You still won't be able to build it without the glibc patches...

I don't know if it should or not.

Comment 6 Ramana Radhakrishnan 2009-04-29 16:22:42 UTC
Is the csl-arm-branch still alive ? Can we clear this one up otherwise?

Comment 7 Daniel Jacobowitz 2009-04-29 16:40:59 UTC
GLIBC patches are no longer required and I know folks have built iwmmxt-targeted ARM Linux toolchains since this was filed.