Commit 19464804 authored by Christoph Müllner's avatar Christoph Müllner Committed by Christoph Müllner
Browse files

Add support to build a host GCC for building the toolchain



A significant amount of users of this project are using it for toolchain
development. These users need to ensure that their code is warning free
before submitting it upstream. Let's support this use case by adding a
configure flag '--enable-host-gcc', which does exactly that:
* build a host GCC before building other components
* setting PATH such that this new GCC is used to build the cross
  toolchain
* enable -Werror for the GCC build

This patch was tested on a Fedora 39 machine (GCC 13),
with the following modification in a GCC source file:
  #if __GNUC__ == 13
  #error Host compiler in use!
  #endif
This fails when building without the new flag and does not fail
when building with latest upstream/master (GCC 14 prerelease).

The '--enable-werror-always' was tested with a warning that showed
up recently in upstream GCC.

Signed-off-by: default avatarChristoph Müllner <christoph.muellner@vrull.eu>
parent aac79d6f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment