From Fedora Project Wiki
No edit summary
No edit summary
Line 46: Line 46:


== Current status ==
== Current status ==
* Targeted release: [[Releases/<number> | Fedora <number> ]]  
* Targeted release: [[Releases/32 | Fedora 32 ]]  
* Last updated: <!-- this is an automatic macro — you don't need to change this line -->  {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}  
* Last updated: <!-- this is an automatic macro — you don't need to change this line -->  {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}  
<!-- After the change proposal is accepted by FESCo, tracking bug is created in Bugzilla and linked to this page  
<!-- After the change proposal is accepted by FESCo, tracking bug is created in Bugzilla and linked to this page  
Line 101: Line 101:
-->
-->


 
Many build systems default to using /usr/bin/cc and /usr/bin/c++ as the default C/C++ compilers.  Being able to easily swap out these implementation will provide a lot of flexibility within Fedora for doing things like setting up alternative buildroots for testing or adding a wrapper script around gcc to aid in implementing some kinds of system wide changes like changes to the default compiler flags.


== Scope ==
== Scope ==
* Proposal owners:
* Proposal owners: tstellar
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
The proposal owner will implement the necessary changes in the gcc and clang packages.


* Other developers: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Other developers: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
The gcc maintainers will be responsible for reviewing and approving changes to the gcc package.


* Release engineering: [https://pagure.io/releng/issues #Releng issue number] (a check of an impact with Release Engineering is needed) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Release engineering: [https://pagure.io/releng/issues #Releng issue number] (a check of an impact with Release Engineering is needed) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Line 116: Line 121:
* Policies and guidelines: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Policies and guidelines: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- Do the packaging guidelines or other documents need to be updated for this feature?  If so, does it need to happen before or after the implementation is done?  If a FPC ticket exists, add a link here. -->
<!-- Do the packaging guidelines or other documents need to be updated for this feature?  If so, does it need to happen before or after the implementation is done?  If a FPC ticket exists, add a link here. -->
No policies or guidelines will need to be updated as a result of this change.


* Trademark approval: N/A (not needed for this Change)
* Trademark approval: N/A (not needed for this Change)
Line 124: Line 131:


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
N/A (not a System Wide Change)
 
This change should not impact upgradeability.


== How To Test ==
== How To Test ==
Line 142: Line 150:


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
N/A (not a System Wide Change)
 
Gating tests will be added to the gcc package to ensure that /usr/bin/cc and /usr/bin/c++ still point to /usr/bin/gcc and /usr/bin/g++ when installed.  There will also be a gating test added to the clang package to ensure that /usr/bin/gcc and /usr/bin/g++ remain the default when clang is installed.


== User Experience ==
== User Experience ==
Line 155: Line 164:
  - Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system.
  - Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system.
-->
-->


== Dependencies ==
== Dependencies ==
Line 165: Line 176:


<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
* Contingency mechanism: (What to do?  Who will do it?) N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency mechanism: (What to do?  Who will do it?) Proposal Owner will revert changes made to gcc and clang packages and rebuild.
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
* Contingency deadline: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency deadline: If the changes are not complete by 2 weeks before the mass rebuild, then we will consider postponing to the next Fedora release and back out any changes that were made. <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
* Blocks release? N/A (not a System Wide Change), Yes/No <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Blocks release? No <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Blocks product? product <!-- Applicable for Changes that blocks specific product release/Fedora.next -->
* Blocks product? None <!-- Applicable for Changes that blocks specific product release/Fedora.next -->


== Documentation ==
== Documentation ==

Revision as of 00:02, 11 December 2019

Comments and Explanations
The page source contains comments providing guidance to fill out each section. They are invisible when viewing this page. To read it, choose the "view source" link.
Copy the source to a new page before making changes! DO NOT EDIT THIS TEMPLATE FOR YOUR CHANGE PROPOSAL.


Use update-alternatives for /usr/bin/cc

Summary

Modify the gcc package so that the /usr/bin/cc and /usr/bin/c++ symlinks are managed by update-alternatives. This will allow users to

Owner

Current status

  • Targeted release: Fedora 32
  • Last updated: 2019-12-11
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

The gcc package currently installs symlinks to /usr/bin/cc and /usr/bin/c++ which point to /usr/bin/gcc and /usr/bin/g++ respectively. For this change, the gcc package will be modified so that the update-alternatives creates these symlinks.

In addition to modifying the gcc package, the clang package will also be modified so that /usr/bin/clang and /usr/bin/clang++ can be used as alternatives for /usr/bin/cc /usr/bin/c++. The clang alternatives will have a lower priority than the gcc alternatives, so that by default, gcc will provide the /usr/bin/cc and /usr/bin/c++ implementations.

The clang package currently has a run-time dependency on gcc, so this ensures that gcc will always provide the default implementation, because it's impossible to install clang without gcc.

The only way users will be able to change the /usr/bin/cc or /usr/bin/c++ implementations will be by explicitly making this change using the update-alternatives tool.


Benefit to Fedora

Many build systems default to using /usr/bin/cc and /usr/bin/c++ as the default C/C++ compilers. Being able to easily swap out these implementation will provide a lot of flexibility within Fedora for doing things like setting up alternative buildroots for testing or adding a wrapper script around gcc to aid in implementing some kinds of system wide changes like changes to the default compiler flags.


Scope

  • Proposal owners: tstellar

The proposal owner will implement the necessary changes in the gcc and clang packages.

  • Other developers: N/A (not a System Wide Change)

The gcc maintainers will be responsible for reviewing and approving changes to the gcc package.

  • Policies and guidelines: N/A (not a System Wide Change)

No policies or guidelines will need to be updated as a result of this change.

  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

This change should not impact upgradeability.

How To Test

Gating tests will be added to the gcc package to ensure that /usr/bin/cc and /usr/bin/c++ still point to /usr/bin/gcc and /usr/bin/g++ when installed. There will also be a gating test added to the clang package to ensure that /usr/bin/gcc and /usr/bin/g++ remain the default when clang is installed.

User Experience

Dependencies

N/A (not a System Wide Change)

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) Proposal Owner will revert changes made to gcc and clang packages and rebuild.
  • Contingency deadline: If the changes are not complete by 2 weeks before the mass rebuild, then we will consider postponing to the next Fedora release and back out any changes that were made.
  • Blocks release? No
  • Blocks product? None

Documentation

N/A (not a System Wide Change)

Release Notes