From Fedora Project Wiki
Important.png
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.
Idea.png
Guidance
For details on how to fill out this form, see the documentation.


Change Proposal Name

C and C++ RPM Macros Package

Summary

Create a new package called c-cxx-rpm-macros and move all C and C++ related macros into it from redhat-rpm-config.


Owner

Current status

  • Targeted release: Fedora Linux 36
  • Last updated: 2021-12-01
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

A new package called c-cxx-rpm-macros will be created and added as a dependency of redhat-rpm-config. The following files and directories be moved into it from redhat-rpm-config:

  • brp-strip-lto
  • brp-llvm-compile-lto-elf
  • redhat-hardened-ld
  • redhat-hardened-cc1
  • redhat-annobin-cc1
  • rpmrc
  • tests/
  • redhat-hardened-clang.cfg
  • buildflags.md


In addition the following macros from the macros file will be moved into a macros.c-cxx file in the new package:

  • %__cc_gcc
  • %__cxx_gcc
  • %__cpp_gcc
  • %__cc_clang
  • %__cxx_clang
  • %__cpp_clang
  • %toolchain
  • %__cc
  • %__cxx
  • %__cpp
  • %build_cc
  • %build_cxx
  • %build_cpp
  • %build_cflags
  • %build_cxxflags
  • %build_ldflags
  • %__extension_strip_flags()
  • %extension_cflags
  • %extension_cxxflags
  • %extension_fflags
  • %extension_ldflags
  • %__global_cflags
  • %__global_cxxflags
  • %__global_fflags
  • %__global_fcflags
  • %__global_ldflags
  • %__cflags_arch_x86_64
  • %__cflags_arch_s390x
  • %_hardening_clang_cflags
  • %_hardening_cflags
  • %_hardening_ldflags
  • %_hardened_build
  • %_hardened_cflags
  • %_hardened_ldflags
  • %_annotated_build
  • %_annobin_gcc_plugin
  • %_annobin_clang_plugin
  • %_annotation_plugin
  • %_annotation_cflags
  • %_annotation_ldflags
  • %_ld_symbols_flags
  • %_ld_as_needed
  • %_ld_as_needed_flags
  • %_gcc_lto_cflags
  • %_clang_lto_cflags
  • %_lto_cflags
  • %_general_options
  • %_warning_options
  • %_preprocessor_defines
  • %_legacy_options
  • %__global_compiler_flags
  • %__brp_strip_lto
  • %__brp_llvm_compile_lto_elf


The full implementation of these changes can be found here: redhat-rpm-config c-cxx-rpm-macros

Feedback

Benefit to Fedora

This change will not be visible to Fedora end-users, but it will provide some benefits to Fedora packagers:

  • Moving some of the brp scripts out of redhat-rpm-config and into c-cxx-rpm-macros means that they won't be run for packages that don't depend on clang or gcc. This will help speed up some builds.
  • This will help reduce the review burden of redhat-rpm-config maintainers who aren't interested in C/C++ changes.


Scope

  • Proposal owners:
  • Other developers:
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

How To Test

User Experience

Dependencies

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No


Documentation

N/A (not a System Wide Change)

Release Notes