diff options
author | Chris Johns <chrisj@rtems.org> | 2023-06-07 10:57:37 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2023-06-07 10:57:37 +1000 |
commit | 759448c9bb1ef3503c90bbf47a3c1bb5c3cae26d (patch) | |
tree | 5456db7cadd181b39f632fcc16fe9251cb985b6f | |
parent | 3c8c2ce38a8fe0a622f88fb3422d1f8fa609609b (diff) |
gcc: Disable warningsdisable-warnings
GCC is making warnings be errors at the warning option level. There is
no means for us to disable this default configuration unless we track
the options that do this for each version.
As a result all warnings are supressed.
-rw-r--r-- | source-builder/config/gsed-1.cfg | 5 | ||||
-rw-r--r-- | source-builder/defaults.mc | 13 | ||||
-rw-r--r-- | source-builder/sb/darwin.py | 4 | ||||
-rw-r--r-- | source-builder/sb/freebsd.py | 4 |
4 files changed, 17 insertions, 9 deletions
diff --git a/source-builder/config/gsed-1.cfg b/source-builder/config/gsed-1.cfg index 9135414..cccd9e3 100644 --- a/source-builder/config/gsed-1.cfg +++ b/source-builder/config/gsed-1.cfg @@ -51,6 +51,11 @@ URL: https://www.gnu.org/software/sed/ %define gsed_localedir %{gsed_datarootdir}/locale # +# GSED's configure breaks if warnings are suppressed +# +%define rsb_no_warnings %{nil} + +# # Prepare the source code. # %prep diff --git a/source-builder/defaults.mc b/source-builder/defaults.mc index 6575e35..8f50d0f 100644 --- a/source-builder/defaults.mc +++ b/source-builder/defaults.mc @@ -61,16 +61,19 @@ rtems_release_url: none, none, 'https://ftp.rtems.org/pub/rtems/release # The user _uid: none, convert, '%(%{__id_u})' +# Disable warnings by default +rsb_no_warnings: none, convert, '-w' + # Default flags that can be overridded to supply specific host or build # flags and include paths to the tools. The host is the final platform # the tools will run on and build is the host building the tools. -host_cflags: none, convert, '-O2 -g -pipe' -host_cxxflags: none, convert, '-O2 -g -pipe' +host_cflags: none, convert, '-O2 -g -pipe %{rsb_no_warnings}' +host_cxxflags: none, convert, '-O2 -g -pipe %{rsb_no_warnings}' host_ldflags: none, convert, '' host_includes: none, convert, '' host_libs: none, convert, '' -build_cflags: none, convert, '-O2 -g -pipe' -build_cxxflags: none, convert, '-O2 -g -pipe' +build_cflags: none, convert, '-O2 -g -pipe %{rsb_no_warnings}' +build_cxxflags: none, convert, '-O2 -g -pipe %{rsb_no_warnings}' build_ldflags: none, convert, '' build_includes: none, convert, '' build_libs: none, convert, '' @@ -210,7 +213,7 @@ ___build_cmd: none, none, '%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} ___build_post: none, none, 'exit 0' # Prebuild set up script. -___build_pre: none, none, '''# ___build_pre as set up in defaults.py +___build_pre: none, none, '''#[][]# ___build_pre as set up in defaults.py # Save the original path away. export SB_ORIG_PATH=${PATH} # Directories diff --git a/source-builder/sb/darwin.py b/source-builder/sb/darwin.py index 95a2a4e..d772e25 100644 --- a/source-builder/sb/darwin.py +++ b/source-builder/sb/darwin.py @@ -65,8 +65,8 @@ def load(): if int(version) >= 13: defines['__cc'] = ('exe', 'required', '/usr/bin/cc') defines['__cxx'] = ('exe', 'required', '/usr/bin/c++') - defines['build_cflags'] = '-O2 -pipe -fbracket-depth=1024' - defines['build_cxxflags'] = '-O2 -pipe -fbracket-depth=1024' + defines['build_cflags'] = '-O2 -pipe -fbracket-depth=1024 %{rsb_no_warnings}' + defines['build_cxxflags'] = '-O2 -pipe -fbracket-depth=1024 %{rsb_no_warnings}' defines['_build'] = defines['_host'] defines['_build_vendor'] = defines['_host_vendor'] diff --git a/source-builder/sb/freebsd.py b/source-builder/sb/freebsd.py index 628ef22..3a598d7 100644 --- a/source-builder/sb/freebsd.py +++ b/source-builder/sb/freebsd.py @@ -104,8 +104,8 @@ def load(): cvs = 'cvs' if check.check_exe(cvs, cvs): defines['__cvs'] = cvs - defines['build_cflags'] = '-O2 -pipe' - defines['build_cxxflags'] = '-O2 -pipe' + defines['build_cflags'] = '-O2 -pipe %{rsb_no_warnings}' + defines['build_cxxflags'] = '-O2 -pipe %{rsb_no_warnings}' if fb_version <= 12: # # Assume the compiler is clang and so we need to increase |