Bug 463549

Summary: [LTC 6.0 FEAT] 201047:Change GCC default to -mcpu=power4
Product: Red Hat Enterprise Linux 6 Reporter: IBM Bug Proxy <bugproxy>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Michal Nowak <mnowak>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: dgregor, ejratl, jakub, mnowak, notting, ohudlick, syeghiay
Target Milestone: betaKeywords: FutureFeature
Target Release: 6.0   
Hardware: ppc64   
OS: All   
Whiteboard:
Fixed In Version: gcc-4.4.1-22.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 19:06:22 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:
Bug Depends On:    
Bug Blocks: 356741, 513487, 554559    
Attachments:
Description Flags
Update TARGET_DEFAULT to default to power4 none

Description IBM Bug Proxy 2008-09-23 21:01:35 UTC
=Comment: #1=================================================
Emily J. Ratliff <emilyr.com> - 2008-09-17 12:53 EDT
1. Feature Overview:
Feature Id:	[201047]
a. Name of Feature:	Change GCC default to -mcpu=power4
b. Feature Description
Change GCC default it  -mcpu=power4 for both -m32 and -m64. GCC already defaults
to -mtune=power4, but using -mcpu allows GCC to use the full ISA v2.0
instruction set.


2. Feature Details:
Sponsor:	PPC
Architectures:
ppc64

Arch Specificity: Purely Arch Specific Code
Affects Toolchain: Yes
Delivery Mechanism: Direct from community
Category:	Toolchain
Request Type:	Configuration/Build Change
d. Upstream Acceptance:	No Code Required
Sponsor Priority	1
f. Severity: High
IBM Confidential:	no
Code Contribution:	no
g. Component Version Target:	A small patch will be provided to change the gcc
defaults from the FSF defaults to more appropriate the 'Enterprise' defaults
Performance Assistance:	yes

3. Business Case
Current Enterprise distros only supports 64-bit POWER4 or newer processors. But
the gcc default for ppc32 is -mpu=common (compatible back 10 years to the 601
chip) and for ppc64 is -mcpu=powerpc64 (compatible back to the original ISA
v1.01). These defaults mean that packages built for Enterprise Distros are not
optimal for the hardware it runs on.     There is no need to support
compatibility with these older processor because they are not supported.

Benefits
Package and Applications will perform better with minimum effort.

4. Primary contact at Red Hat: 
John Jarvis
jjarvis

5. Primary contacts at Partner:
Project Management Contact:
Michael Hohnbaum, hbaum.com, 503-578-5486

Technical contact(s):
Steven Munroe, sjmunroe.com
Peter Bergner, bergner.com

IBM Manager:
Alexander Johnson, acjohnso.com

Comment 1 Bill Nottingham 2008-10-02 19:44:34 UTC
Probably simplest to just change the default flags we use. Assigning to redhat-rpm-config. We'd want to get this done before the alpha.

Comment 2 John Jarvis 2008-10-28 21:43:22 UTC
Switching Severity from Urgent to High.  Urgent should be reserved for problems that need to be fixed asynch.

Comment 3 IBM Bug Proxy 2009-03-03 17:11:59 UTC
Created attachment 333899 [details]
Update TARGET_DEFAULT to default to power4


------- Comment (attachment) From bergner.com 2009-03-03 12:08 EDT-------


This patch changes the default -mcpu option (not the default -mtune option!) to power4 by changing the
TARGET_DEFAULT value to the power4 flags.

	* config/rs6000/default64.h: Add _DEFAULT64_H ifndef/define/endif block.
	(TARGET_DEFAULT): Move inside #ifndef _DEFAULT64_H.  Add MASK_PPC_GPOPT
	and MASK_MFCRF flags.
	* config/rs6000/linux64.h: Add _DEFAULT64_H ifndef/endif block.
	(TARGET_DEFAULT): Define.
	(ASM_DEFAULT_SPEC) <#ifdef DEFAULT_ARCH64_P>: Redefine to -mpower4.
	(ASM_DEFAULT_SPEC) <#else DEFAULT_ARCH64_P>: Redefine to -mpower4.

Comment 4 Bill Nottingham 2009-03-27 17:30:34 UTC
Moving to gcc, if that's where they'd preferred it patched.

Comment 8 Jakub Jelinek 2009-12-08 21:52:22 UTC
gcc.spec has:
%if 0%{?rhel} >= 6
%ifarch ppc ppc64
        --with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 \
%endif
%endif
since 4.4.1-22.el6.  For QA, if you run gcc with -v, you can see the -mtune= and -mcpu= options passed to cc1.

Comment 11 IBM Bug Proxy 2010-05-03 17:43:42 UTC
------- Comment From bergner.com 2010-05-03 13:33 EDT-------
Verified in RHEL6 Beta 1.

Comment 12 releng-rhel@redhat.com 2010-07-02 19:06:22 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.