SHA256
3
0
forked from pool/meson

Accepting request 715709 from home:marxin:branches:devel:tools:building

- Add fix-missing-return-statements-that-are-seen-with-Wer.patch which
  is an upstream version of: https://github.com/mesonbuild/meson/pull/5654

OBS-URL: https://build.opensuse.org/request/show/715709
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=140
This commit is contained in:
Martin Pluskal 2019-07-16 17:32:33 +00:00 committed by Git OBS Bridge
parent 0863ab893b
commit 9eeef516e5
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,48 @@
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 3b58a07..9ef9207 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -70,6 +70,7 @@ class CCompiler(CLikeCompiler, Compiler):
#ifndef {symbol}
{symbol};
#endif
+ return 0;
}}'''
return self.compiles(t.format(**fargs), env, extra_args=extra_args,
dependencies=dependencies)
diff --git a/mesonbuild/compilers/clike.py b/mesonbuild/compilers/clike.py
index e923ff2..7ba8bd3 100644
--- a/mesonbuild/compilers/clike.py
+++ b/mesonbuild/compilers/clike.py
@@ -375,6 +375,7 @@ class CLikeCompiler:
#ifndef {symbol}
{symbol};
#endif
+ return 0;
}}'''
return self.compiles(t.format(**fargs), env, extra_args=extra_args,
dependencies=dependencies)
@@ -583,6 +584,7 @@ class CLikeCompiler:
{prefix}
int main(int argc, char **argv) {{
{type} something;
+ return 0;
}}'''
if not self.compiles(t.format(**fargs), env, extra_args=extra_args,
dependencies=dependencies)[0]:
@@ -661,6 +663,7 @@ class CLikeCompiler:
#include <stdio.h>
int main(int argc, char *argv[]) {{
printf ("{fmt}", {cast} {f}());
+ return 0;
}}'''.format(**fargs)
res = self.run(code, env, extra_args=extra_args, dependencies=dependencies)
if not res.compiled:
@@ -813,6 +816,7 @@ class CLikeCompiler:
#error "No definition for __builtin_{func} found in the prefix"
#endif
#endif
+ return 0;
}}'''
return self.links(t.format(**fargs), env, extra_args=extra_args,
dependencies=dependencies)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 16 14:11:28 UTC 2019 - Martin Liška <mliska@suse.cz>
- Add fix-missing-return-statements-that-are-seen-with-Wer.patch which
is an upstream version of: https://github.com/mesonbuild/meson/pull/5654
-------------------------------------------------------------------
Wed Jun 26 10:51:31 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -50,6 +50,7 @@ Patch4: meson-fix-gcc48.patch
# PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal@suse.com -- build and install using distutils instead of full setuptools
Patch5: meson-distutils.patch
Patch6: gcc9-sanitizer.patch
Patch7: fix-missing-return-statements-that-are-seen-with-Wer.patch
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-base
@ -163,6 +164,7 @@ This package provides support for meson.build files in Vim.
%patch5 -p1
%endif
%patch6 -p1
%patch7 -p1
# Remove static boost tests from "test cases/frameworks/1 boost/".
sed -i "/static/d" test\ cases/frameworks/1\ boost/meson.build