Bug 587709

Summary: gcc appears to output 64-bit code and invoke as in 32-bit mode
Product: [Fedora] Fedora Reporter: Nicholas Haggin <haggin>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: jakub
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-30 16:21:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nicholas Haggin 2010-04-30 16:14:08 UTC
Description of problem:

When invoked without specifying word size (-m32 or -m64), gcc appears to default to compiling 64-bit code and then invoking the assembler in 32-bit mode.

Version-Release number of selected component (if applicable):

binutils-2.19.51.0.14-3.fc11.ppc
gcc-4.4.1-2.fc11.ppc
gcc-debuginfo-4.4.1-2.fc11.ppc
libgcc-4.4.1-2.fc11.ppc
libgcc-4.4.1-2.fc11.ppc64

How reproducible:

Compile any C source file.
 
Actual results:

[user@localhost ~]$ gcc hello.c
/tmp/ccYn3Uv7.s: Assembler messages:
/tmp/ccYn3Uv7.s:17: Error: junk at end of line, first unrecognized character is `@'
/tmp/ccYn3Uv7.s:29: Error: syntax error; found `@' but expected `('
/tmp/ccYn3Uv7.s:29: Error: junk at end of line: `@toc(2)'
[user@localhost ~]$ 

Expected results:

[user@localhost ~]$ gcc hello.c
[user@localhost ~]$ 

Additional info:

The machine in question is a Mac Xserve G5. Originally, the ppc64-architecture packages for GCC and binutils were installed; later, the 64-bit packages were removed and the 32-bit packages were installed. A machine installed from scratch with only the 32-bit packages works correctly, making me suspect a package configuration bug of some sort.

Comment 1 Jakub Jelinek 2010-04-30 16:21:33 UTC
If you have gcc.ppc but binutils.ppc64 installed (or gcc.ppc64 and binutils.ppc), that's just a user error.  Don't do that.