git: gcc120: Rework the makefiles to fix issues and ease future upgrades

Aaron LI aly at crater.dragonflybsd.org
Thu Mar 26 23:34:32 PDT 2026


commit 7c9a20a60560382860e2d1f0e4e7b2233052f110
Author: Aaron LI <aly at aaronly.me>
Date:   Thu Mar 26 21:35:45 2026 +0800

    gcc120: Rework the makefiles to fix issues and ease future upgrades
    
    * Remove many obsolete comments copied from gcc80's makefiles.
    
    * Remove the unneeded 'Makefile.intcxx_lib' because all the C++ files
      have been renamed to use the proper .cc suffix so we can simply use
      the <bsd.hostlib.mk> makefile.
    
    * Rework libgcc's makefiles.  Rewrite the libgcc/Makefile.src to
      follow the processes in GCC's makefile as much as possible.  Now the
      libgcc is built with the same source list as in the GCC's makefile.
    
    * Fix and rework libstdcxx's makefiles.
    
      - Refactor headers/Makefile.headers to reduce the difference with
        GCC's makefile.
      - Add libconv_2017 and libconv_2020.
      - Fix headers preparation and enable '-nostdinc++' for building the
        component and product libraries.  As a result, use FILESGROUPS
        instead of INCSGROUPS to install the headers to save one
        installation pass with 'make includes'.
      - Fix FLAGS_GROUPS to properly set the compilation flags, aligning
        with the ones used in GCC's makefile.
    
    * Refactor Makefile.langs to reuse as many as pieces from GCC's
      makefiles, simplying the future upgrades.
    
    * Change cc_tools/libiberty to reuse the whole source list as
      support-libs/libiberty for easier maintanence.
    
    * Rework the cc_tools/tools/Makefile according to GCC's makefile.
    
    * Use FLAGS_GROUPS to silence warings only for necessary files, rather
      than for all files.
    
    * Also use FLAGS_GROUPS to add specific defines or flags only for
      necessary files, similar to the rules in GCC's makefiles.
    
    * Add various comments explaining the origins and rationales of the
      pieces in makefiles.  This should greatly help future upgrades.

Summary of changes:
 gnu/lib/gcc120/Makefile.inc                        |   6 +-
 gnu/lib/gcc120/csu/Makefile                        |   3 +-
 gnu/lib/gcc120/libgcc/Makefile                     | 263 ++++++++++-----------
 gnu/lib/gcc120/libgcc/Makefile.src                 | 226 ++++++++++++++----
 gnu/lib/gcc120/libgcc_eh/Makefile                  |  34 +--
 gnu/lib/gcc120/libgcc_pic/Makefile                 |  40 +---
 gnu/lib/gcc120/libgcov/Makefile                    |  29 ++-
 gnu/lib/gcc120/libgomp/Makefile                    |  51 ++--
 gnu/lib/gcc120/libssp/Makefile                     |   2 +-
 gnu/lib/{gcc80 => gcc120}/libstdcxx/Makefile.inc   |   0
 gnu/lib/gcc120/libstdcxx/components/Makefile       |   2 +
 .../libstdcxx/components/libconv_1998/Makefile     |  81 +++----
 .../libstdcxx/components/libconv_1998/Makefile.src |  36 ++-
 .../libstdcxx/components/libconv_2011/Makefile     | 110 +++++----
 .../libstdcxx/components/libconv_2011/Makefile.src |  21 +-
 .../libstdcxx/components/libconv_2017/Makefile     |  32 +++
 .../libstdcxx/components/libconv_2017/Makefile.src |  23 ++
 .../libstdcxx/components/libconv_2020/Makefile     |  32 +++
 .../libstdcxx/components/libconv_2020/Makefile.src |   8 +
 .../libstdcxx/components/libconv_supc/Makefile     |  27 ++-
 .../libstdcxx/components/libconv_supc/Makefile.src |  16 +-
 gnu/lib/gcc120/libstdcxx/headers/Makefile          | 148 ++++--------
 gnu/lib/gcc120/libstdcxx/headers/Makefile.headers  | 261 ++++++++++++++------
 gnu/lib/gcc120/libstdcxx/product/Makefile          |  32 ++-
 gnu/lib/gcc120/libstdcxx/product/Makefile.src      |  22 +-
 gnu/usr.bin/cc120/Makefile.intcxx_lib              | 228 ------------------
 gnu/usr.bin/cc120/Makefile.langs                   | 100 ++++----
 gnu/usr.bin/cc120/Makefile.tgt                     |  19 +-
 gnu/usr.bin/cc120/Makefile.version                 |   1 +
 gnu/usr.bin/cc120/backends/guts/Makefile           |   2 +-
 gnu/usr.bin/cc120/backends/guts/guts-c/Makefile    |  13 +-
 .../cc120/backends/guts/guts-common/Makefile       |   9 +-
 gnu/usr.bin/cc120/backends/guts/guts-cxx/Makefile  |  26 +-
 .../cc120/backends/guts/guts-target/Makefile       |  12 +-
 gnu/usr.bin/cc120/backends/programs/cc1/Makefile   |  27 +--
 .../cc120/backends/programs/cc1plus/Makefile       |  25 +-
 .../cc120/backends/programs/collect2/Makefile      |  21 +-
 .../cc120/backends/programs/lto-wrapper/Makefile   |  12 +-
 gnu/usr.bin/cc120/backends/programs/lto1/Makefile  |  15 +-
 gnu/usr.bin/cc120/cc_prep/Makefile                 |  77 +++---
 gnu/usr.bin/cc120/cc_tools/Makefile                |   2 +-
 gnu/usr.bin/cc120/cc_tools/libcody/Makefile        |  31 ++-
 gnu/usr.bin/cc120/cc_tools/libcpp/Makefile         |  16 +-
 gnu/usr.bin/cc120/cc_tools/libiberty/Makefile      |  23 +-
 gnu/usr.bin/cc120/cc_tools/tools/Makefile          | 236 +++++++++---------
 gnu/usr.bin/cc120/drivers/Makefile.inc             |   4 +-
 gnu/usr.bin/cc120/drivers/c++/Makefile             |   5 +-
 gnu/usr.bin/cc120/drivers/cc/Makefile              |   3 +-
 gnu/usr.bin/cc120/drivers/cpp/Makefile             |   8 +-
 gnu/usr.bin/cc120/drivers/gcov/Makefile            |  10 +-
 gnu/usr.bin/cc120/libbackend/Makefile              | 171 ++++++--------
 .../cc120/support-libs/libbacktrace/Makefile       |  47 ++--
 gnu/usr.bin/cc120/support-libs/libcody/Makefile    |  22 +-
 .../cc120/support-libs/libcommon-target/Makefile   |  27 ++-
 gnu/usr.bin/cc120/support-libs/libcommon/Makefile  |  18 +-
 gnu/usr.bin/cc120/support-libs/libcpp/Makefile     |  15 +-
 .../cc120/support-libs/libdecnumber/Makefile       |   1 +
 gnu/usr.bin/cc120/support-libs/libiberty/Makefile  |  72 +-----
 .../cc120/support-libs/libiberty/Makefile.src      |  46 ++++
 .../cc120/support-libs/liblto_plugin/Makefile      |  27 ++-
 60 files changed, 1457 insertions(+), 1419 deletions(-)
 copy gnu/lib/{gcc80 => gcc120}/libstdcxx/Makefile.inc (100%)
 create mode 100644 gnu/lib/gcc120/libstdcxx/components/libconv_2017/Makefile
 create mode 100644 gnu/lib/gcc120/libstdcxx/components/libconv_2017/Makefile.src
 create mode 100644 gnu/lib/gcc120/libstdcxx/components/libconv_2020/Makefile
 create mode 100644 gnu/lib/gcc120/libstdcxx/components/libconv_2020/Makefile.src
 delete mode 100644 gnu/usr.bin/cc120/Makefile.intcxx_lib
 create mode 100644 gnu/usr.bin/cc120/support-libs/libiberty/Makefile.src

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7c9a20a60560382860e2d1f0e4e7b2233052f110


-- 
DragonFly BSD source repository


More information about the Commits mailing list