This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "cannot run C compiled programs" error


I managed to export conftest.c before it got deleted. Here is the code, and
the generated assembly. Generating a.out & running it causes it to fail with
the same error ( Bad CPU type in executable). Also, what does the ".quad"
instruction do? I thought I had disabled libquadmath in my configure
command?

Compile command
===============
/Users/anna/Documents/programs/GCC/GCC/build/./gcc/xgcc
-B/Users/anna/Documents/programs/GCC/GCC/build/./gcc/
-B/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/bin
/ 
-B/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/lib
/ -isystem 
/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/inclu
de -isystem 
/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/sys-i
nclude  -m64 -g -O2   conftest.c


conftest.c
==========
/* confdefs.h */
#define PACKAGE_NAME "GNU C Runtime Library"
#define PACKAGE_TARNAME "libgcc"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "GNU C Runtime Library 1.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL "http://www.gnu.org/software/libgcc/";
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}

conftest.s
==========
        .text
Ltext0:
        .section __TEXT,__text_startup,regular,pure_instructions
        .align 4
        .globl _main
_main:
LFB0:
LSM0:
LSM1:
        xorl    %eax, %eax
        ret
LFE0:
        .section __DWARF,__debug_frame,regular,debug
Lsection__debug_frame:
Lframe0:
        .set L$set$0,LECIE0-LSCIE0
        .long L$set$0
LSCIE0:
        .long   0xffffffff
        .byte   0x1
        .ascii "\0"
        .byte   0x1
        .byte   0x78
        .byte   0x10
        .byte   0xc
        .byte   0x7
        .byte   0x8
        .byte   0x90
        .byte   0x1
        .align 3
LECIE0:
LSFDE0:
        .set L$set$1,LEFDE0-LASFDE0
        .long L$set$1
LASFDE0:
        .set L$set$2,Lframe0-Lsection__debug_frame
        .long L$set$2
        .quad   LFB0
        .set L$set$3,LFE0-LFB0
        .quad L$set$3
        .align 3
LEFDE0:
        .section 
__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
        .set L$set$4,LECIE1-LSCIE1
        .long L$set$4
LSCIE1:
        .long   0
        .byte   0x1
        .ascii "zR\0"
        .byte   0x1
        .byte   0x78
        .byte   0x10
        .byte   0x1
        .byte   0x10
        .byte   0xc
        .byte   0x7
        .byte   0x8
        .byte   0x90
        .byte   0x1
        .align 3
LECIE1:
LSFDE3:
        .set L$set$5,LEFDE3-LASFDE3
        .long L$set$5
LASFDE3:
        .long   LASFDE3-EH_frame1
        .quad   LFB0-.
        .set L$set$6,LFE0-LFB0
        .quad L$set$6
        .byte   0
        .align 3
LEFDE3:
        .text
Letext0:
        .section __DWARF,__debug_info,regular,debug
Lsection__debug_info:
Ldebug_info0:
        .long   0xa3
        .word   0x2
        .set L$set$7,Ldebug_abbrev0-Lsection__debug_abbrev
        .long L$set$7
        .byte   0x8
        .byte   0x1
        .ascii "GNU C 4.6.1 20110408 (prerelease)\0"
        .byte   0x1
        .ascii "conftest.c\0"
        .ascii "/Users/anna/Documents/programs/GCC/GCC/build/gcc\0"
        .quad   Ltext0
        .quad   Letext0
        .set L$set$8,Ldebug_line0-Lsection__debug_line
        .long L$set$8
        .byte   0x2
        .byte   0x1
        .ascii "main\0"
        .byte   0x1
        .byte   0xb
        .long   0x9f
        .quad   LFB0
        .quad   LFE0
        .byte   0x2
        .byte   0x77
        .byte   0x8
        .byte   0x3
        .byte   0x4
        .byte   0x5
        .ascii "int\0"
        .byte   0
        .section __DWARF,__debug_abbrev,regular,debug
Lsection__debug_abbrev:
Ldebug_abbrev0:
        .byte   0x1
        .byte   0x11
        .byte   0x1
        .byte   0x25
        .byte   0x8
        .byte   0x13
        .byte   0xb
        .byte   0x3
        .byte   0x8
        .byte   0x1b
        .byte   0x8
        .byte   0x11
        .byte   0x1
        .byte   0x12
        .byte   0x1
        .byte   0x10
        .byte   0x6
        .byte   0
        .byte   0
        .byte   0x2
        .byte   0x2e
        .byte   0
        .byte   0x3f
        .byte   0xc
        .byte   0x3
        .byte   0x8
        .byte   0x3a
        .byte   0xb
        .byte   0x3b
        .byte   0xb
        .byte   0x49
        .byte   0x13
        .byte   0x11
        .byte   0x1
        .byte   0x12
        .byte   0x1
        .byte   0x40
        .byte   0xa
        .byte   0
        .byte   0
        .byte   0x3
        .byte   0x24
        .byte   0
        .byte   0xb
        .byte   0xb
        .byte   0x3e
        .byte   0xb
        .byte   0x3
        .byte   0x8
        .byte   0
        .byte   0
        .byte   0
        .section __DWARF,__debug_pubnames,regular,debug
Lsection__debug_pubnames:
        .long   0x17
        .word   0x2
        .set L$set$9,Ldebug_info0-Lsection__debug_info
        .long L$set$9
        .long   0xa7
        .long   0x7f
        .ascii "main\0"
        .long   0
        .section __DWARF,__debug_aranges,regular,debug
Lsection__debug_aranges:
        .long   0x2c
        .word   0x2
        .set L$set$10,Ldebug_info0-Lsection__debug_info
        .long L$set$10
        .byte   0x8
        .byte   0
        .word   0
        .word   0
        .quad   LFB0
        .set L$set$11,LFE0-LFB0
        .quad L$set$11
        .quad   0
        .quad   0
        .section __DWARF,__debug_line,regular,debug
Lsection__debug_line:
Ldebug_line0:
        .set L$set$12,LELT0-LSLT0
        .long L$set$12
LSLT0:
        .word   0x2
        .set L$set$13,LELTP0-LASLTP0
        .long L$set$13
LASLTP0:
        .byte   0x1
        .byte   0x1
        .byte   0xf6
        .byte   0xf5
        .byte   0xa
        .byte   0
        .byte   0x1
        .byte   0x1
        .byte   0x1
        .byte   0x1
        .byte   0
        .byte   0
        .byte   0
        .byte   0x1
        .byte   0
        .ascii "conftest.c\0"
        .byte   0
        .byte   0
        .byte   0
        .byte   0
LELTP0:
        .byte   0
        .byte   0x9
        .byte   0x2
        .quad   Letext0
        .byte   0
        .byte   0x1
        .byte   0x1
        .byte   0
        .byte   0x9
        .byte   0x2
        .quad   LSM0
        .byte   0x1f
        .byte   0
        .byte   0x9
        .byte   0x2
        .quad   LSM1
        .byte   0x18
        .byte   0
        .byte   0x9
        .byte   0x2
        .quad   LFE0
        .byte   0
        .byte   0x1
        .byte   0x1
LELT0:
        .subsections_via_symbols

Regards,
Anna.


On 20/04/11 20/04/11 11:11 AM, "Anna Ceguerra" <anna.ceguerra@sydney.edu.au>
wrote:

> Hi,
> 
> Actually I have another clue. I'm getting the following errors earlier in
> config.log, regarding unrecognised options -V and -qversion. But the configure
> script keeps going?
> 
> 
> configure:3028: /Users/anna/Documents/programs/GCC/GCC/build/./gcc/xgcc
> -B/Users/anna/Documents/programs/GCC/GCC/build/./gcc/
> -B/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/bin/
> -B/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/lib/
> -isystem 
> /Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/include
> -isystem 
> /Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/sys-inc
> lude  -m64 -V >&5
> xgcc: error: unrecognized option '-V'
> xgcc: fatal error: no input files
> compilation terminated.
> configure:3039: $? = 1
> configure:3028: /Users/anna/Documents/programs/GCC/GCC/build/./gcc/xgcc
> -B/Users/anna/Documents/programs/GCC/GCC/build/./gcc/
> -B/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/bin/
> -B/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/lib/
> -isystem 
> /Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/include
> -isystem 
> /Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/sys-inc
> lude  -m64 -qversion >&5
> xgcc: error: unrecognized option '-qversion'
> xgcc: fatal error: no input files
> compilation terminated.
> 
> Regards,
> Anna
> 
> 
> On 20/04/11 20/04/11 10:46 AM, "kevin diggs" <diggskevin38@gmail.com> wrote:
> 
>> Hi,
>> 
>> Sorry, I'm outta ideas.
>> 
>> If it were me I would grab binutils and build it. Then use the new one
>> with the new compiler.
>> 
>> Building stuff is a total hoot. Even if it doesn't work you get the
>> fun and excitement of building more stuff!
>> 
>> Either that or get some holy water. Put it in one of those plant
>> sprayers. And give your "really old" macbook a light misting.
>> 
>> Good Luck! We're all counting on you!
>> May the force be with you!
>> <other campy movie lines here>
>> 
>> kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]