Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2072758

Summary: gcc -Wbidirectional vs -Wbidi-chars discrepancy
Product: Red Hat Enterprise Linux 9 Reporter: benh <benh>
Component: gccAssignee: Marek Polacek <mpolacek>
gcc sub component: system-version QA Contact: Václav Kadlčík <vkadlcik>
Status: CLOSED NOTABUG Docs Contact: Petr Hybl <phybl>
Severity: unspecified    
Priority: unspecified CC: ahajkova, bstinson, fweimer, gfialova, jakub, jwboyer, mpolacek, ohudlick, phybl, sipoyare, tumeya
Version: CentOS StreamKeywords: Bugfix, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Divergence between RHEL 9 gcc and upstream gcc. Consequence: Confusing for users. Fix: Make RHEL 9 gcc accept both -Wbidirectional and -Wbidi-chars Result: Less confusion
Story Points: ---
Clone Of:
: 2072762 (view as bug list) Environment:
Last Closed: 2022-04-20 17:38:42 UTC Type: Bug
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: 2072762    

Description benh@amazon.com 2022-04-06 22:06:06 UTC
Description of problem:

To address CVE-2021-42574, RHEL8/CentOS8 implements a gcc patch which adds the -Wbidirectional option. This is also documented in various RH advisories.

This is unfortunately different from upstream gcc which named the option -Wbidi-chars instead.

From what I can see of the available source code, RHEL9/CentOS9 backported to gcc11 the "upstream" variant.

This can/will cause a discrepancy between RHEL8 and RHEL9 for customers and between RHEL and other distributions.

Would it be possible to amend the patches in the backports to support both variants ?

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

I've verified the git repos of c8s and c9, but from the published advisories, this also affects the various devtoolsets.

I also noticed gcc has some followup fixes/updates for that code that weren't backported.

Comment 1 Marek Polacek 2022-04-06 22:11:47 UTC
Thanks for the report.  As I mentioned in the email, I would like to add an alias so that RHEL9 gcc groks both -Wbidirectional and -Wbidi-chars.

I think we want a clone for RHEL 8 gcc too.  But I don't see how we'd fix this in DTS/GTS at this point.

Comment 2 Marek Polacek 2022-04-20 17:38:42 UTC
Previously, I didn't realize that the newest versions of RHEL 8 gcc, DTS 11.1 gcc, GTS 11.1 gcc, and RHEL 9 gcc all *already* use -Wbidi-chars.
So I no longer think that the aliases are necessary, therefore I'm going to close this BZ.

Comment 3 benh@amazon.com 2022-04-20 21:40:01 UTC
My fault indeed. I was looking at centos c8 and not c8s...