Bug 515799

Summary: [RHEL5] gcc: if more than one -fno-builtin-* options are specified, only the last one is effective
Product: Red Hat Enterprise Linux 5 Reporter: Jeff Bastian <jbastian>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.3CC: cward, mnowak, tao
Target Milestone: rcKeywords: ZStream
Target Release: 5.5   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:21:19 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: 499522, 526421, 526422    
Attachments:
Description Flags
reproducer program
none
upstream patch none

Description Jeff Bastian 2009-08-05 18:58:04 UTC
Description of problem:
If multiple -fno-builtin-foo options are given to gcc, all but the last option are pruned.

This has been reported and fixed upstream at 
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28437


Version-Release number of selected component (if applicable):
gcc-4.1.2-44.el5

How reproducible:
every time

Steps to Reproduce:
1. gcc -v -c -fno-builtin-iswalpha -fno-builtin-iswalnum -c a.c 2>&1 | grep cc1
  
Actual results:
The option -fno-builtin-iswalpha is pruned.
   /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/cc1 ... -fno-builtin-iswalnum ...

Expected results:
Both options are kept intact:
   /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/cc1 ... -fno-builtin-iswalpha -fno-builtin-iswalnum ...

Additional info:

Comment 1 Jeff Bastian 2009-08-05 19:00:21 UTC
Created attachment 356411 [details]
reproducer program

Another reproducer method:

1. gcc -fno-builtin-isascii -fno-builtin-isalnum builtin.c
2. ./a.out

Actual Results:
ret = 1

Expected Results:
Using custom isascii() function
ret = 1

Comment 2 Jeff Bastian 2009-08-05 19:03:36 UTC
Created attachment 356412 [details]
upstream patch

Upstream patch to not prune joined options

Comment 17 Chris Ward 2010-02-11 10:18:40 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 19 Jeff Bastian 2010-02-11 18:48:59 UTC
I've installed RHEL 5.5 Beta and verified that gcc behaves as expected now.

Comment 22 errata-xmlrpc 2010-03-30 08:21:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0232.html