This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sunday 31 August 2008 17:49:30 Michael Abbott wrote: > > On Sun, 31 Aug 2008, Michael Abbott wrote: > > > 2. I can't build a good toolchain (sizeof(enum)==1 is a disaster). > > I may have spotted a discrepancy, with CT_ARCH_ABI_CFLAGS where it looks > > as if CT_ARCH_ABI_CFLAG was meant. > ... > > I'll make an update in an hour when the build is complete. > And ... it still doesn't work. OK, working on Marc's idea, I managed to have a 'working' EABI toolchain: # cat test.c enum test { TEST }; int size() { return sizeof(enum test); } # ./arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -O2 -S test.c # cat test.s .arch armv5te .fpu softvfp .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 2 .eabi_attribute 30, 2 .eabi_attribute 18, 4 .file "test.c" .text .align 2 .global size .type size, %function size: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. mov r0, #4 bx lr .size size, .-size .ident "GCC: (crosstool-NG-1.2.0+svn_trunk@970M) 4.3.1" .section .note.GNU-stack,"",%progbits # ./arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -O2 \ -c test.c -o test.o # ./arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-readelf -h test.o ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: REL (Relocatable file) Machine: ARM Version: 0x1 Entry point address: 0x0 Start of program headers: 0 (bytes into file) Start of section headers: 236 (bytes into file) Flags: 0x4000000, Version4 EABI Size of this header: 52 (bytes) Size of program headers: 0 (bytes) Number of program headers: 0 Size of section headers: 40 (bytes) Number of section headers: 10 Section header string table index: 7 Seems in the case of EABI, we must entirely leave out the --with-abi and -mabi flags, as Marc said. So, is the above an EABI-compliant toolchain? Michael, care to test further the attached patch? If that's OK, then I'll remove the ABI config option in case EABI is selected. BTW, Michael, I saw you were using gcc-4.2.4. I'm using 4.3.1, and got the same results as yours without the patch. I did not test the patch with 4.2.4. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +0/33 662376056 | Software Designer | \ / CAMPAIGN | ^ | | --==< ^_^ >==-- `------------.-------: X AGAINST | /e\ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | """ conspiracy. | `------------------------------^-------^------------------^--------------------'
Index: ct-ng.trunk/arch/arm/functions =================================================================== --- ct-ng.trunk/arch/arm/functions (revision 970) +++ ct-ng.trunk/arch/arm/functions (working copy) @@ -12,20 +12,9 @@ uClibc,y) CT_TARGET_SYS=uclibcgnueabi;; esac - case "${CT_ARCH_ABI},${CT_ARCH_ARM_EABI}" in - *,) ;; - aapcs,y) - CT_DoLog DEBUG "'--with-abi=aapcs' is in fact '-mabi=aapcs-linux' when used in CFLAGS." - CT_ARCH_ABI_CFLAGS="-mabi=aapcs-linux" - ;; - ,y) - CT_DoLog WARN "Forcing ABI to 'aapcs-linux' for use with EABI." - CT_ARCH_WITH_ABI="--with-abi=aapcs" - CT_ARCH_ABI_CFLAGS="-mabi=aapcs-linux" - ;; - *,y) - CT_DoLog ERROR "ABI='${CT_ARCH_ABI}' not supported for EABI." - CT_Abort "If you know you are right, please edit 'arch/arm/functions' in crosstool-NG sources." - ;; - esac + if [ "${CT_ARCH_ARM_EABI}" = "y" ]; then + CT_DoLog DEBUG "Removing any ABI flag for EABI" + CT_ARCH_WITH_ABI= + CT_ARCH_ABI_CFLAG= + fi }
-- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |