diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-12-17 04:11:34 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-01-09 02:21:44 +0300 |
commit | 1a4b7ee28bf7413af6513fb45ad0d0736048f866 (patch) | |
tree | 79f6d8ea698cab8f2eaf4f54b793d2ca7a1451ce /poky/meta/recipes-devtools/swig | |
parent | 5b9ede0403237c7dace972affa65cf64a1aadd0e (diff) | |
download | openbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.tar.xz |
reset upstream subtrees to yocto 2.6
Reset the following subtrees on thud HEAD:
poky: 87e3a9739d
meta-openembedded: 6094ae18c8
meta-security: 31dc4e7532
meta-raspberrypi: a48743dc36
meta-xilinx: c42016e2e6
Also re-apply backports that didn't make it into thud:
poky:
17726d0 systemd-systemctl-native: handle Install wildcards
meta-openembedded:
4321a5d libtinyxml2: update to 7.0.1
042f0a3 libcereal: Add native and nativesdk classes
e23284f libcereal: Allow empty package
030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG
179a1b9 gtest: update to 1.8.1
Squashed OpenBMC subtree compatibility updates:
meta-aspeed:
Brad Bishop (1):
aspeed: add yocto 2.6 compatibility
meta-ibm:
Brad Bishop (1):
ibm: prepare for yocto 2.6
meta-ingrasys:
Brad Bishop (1):
ingrasys: set layer compatibility to yocto 2.6
meta-openpower:
Brad Bishop (1):
openpower: set layer compatibility to yocto 2.6
meta-phosphor:
Brad Bishop (3):
phosphor: set layer compatibility to thud
phosphor: libgpg-error: drop patches
phosphor: react to fitimage artifact rename
Ed Tanous (4):
Dropbear: upgrade options for latest upgrade
yocto2.6: update openssl options
busybox: remove upstream watchdog patch
systemd: Rebase CONFIG_CGROUP_BPF patch
Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/swig')
3 files changed, 229 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch b/poky/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch new file mode 100644 index 000000000..a91385916 --- /dev/null +++ b/poky/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch @@ -0,0 +1,191 @@ +From b6c0ef4b8f6e5c089ac7104b3aaba8f1d17b8b82 Mon Sep 17 00:00:00 2001 +From: Olly Betts <olly@survex.com> +Date: Mon, 11 Jun 2018 15:51:53 +1200 +Subject: [PATCH] [Python] Fix new GCC8 warnings in generated code + +Avoid casts between incompatible function types where possible (when +keyword args are in use, it is not possible to avoid such warnings as +they are inherent in the design of Python's C API in that particular +case). Fixes #1259. + +Upstream-Status: Backport +[https://github.com/swig/swig/commit/7f9883011029674553a2a4b623d459f02b512458] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + Lib/python/pyinit.swg | 4 ++-- + Lib/python/pyrun.swg | 34 ++++++++++++++++++++++++++-------- + Source/Modules/python.cxx | 26 +++++++++++++------------- + 3 files changed, 41 insertions(+), 23 deletions(-) + +diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg +index 2cc5828..6bf68c1 100644 +--- a/Lib/python/pyinit.swg ++++ b/Lib/python/pyinit.swg +@@ -368,8 +368,8 @@ SWIG_init(void) { + (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL + }; + static SwigPyGetSet thisown_getset_closure = { +- (PyCFunction) SwigPyObject_own, +- (PyCFunction) SwigPyObject_own ++ SwigPyObject_own, ++ SwigPyObject_own + }; + static PyGetSetDef thisown_getset_def = { + (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure +diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg +index ab1237f..3d0b1b3 100644 +--- a/Lib/python/pyrun.swg ++++ b/Lib/python/pyrun.swg +@@ -465,6 +465,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) + return repr; + } + ++/* We need a version taking two PyObject* parameters so it's a valid ++ * PyCFunction to use in swigobject_methods[]. */ ++SWIGRUNTIME PyObject * ++SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) ++{ ++ return SwigPyObject_repr((SwigPyObject*)v); ++} ++ + SWIGRUNTIME int + SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) + { +@@ -594,11 +602,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) + } + + SWIGRUNTIME PyObject* +-#ifdef METH_NOARGS +-SwigPyObject_next(PyObject* v) +-#else + SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +-#endif + { + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { +@@ -633,6 +637,20 @@ SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) + return SWIG_Py_Void(); + } + ++#ifdef METH_NOARGS ++static PyObject* ++SwigPyObject_disown2(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ++{ ++ return SwigPyObject_disown(v); ++} ++ ++static PyObject* ++SwigPyObject_acquire2(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ++{ ++ return SwigPyObject_acquire(v); ++} ++#endif ++ + SWIGINTERN PyObject* + SwigPyObject_own(PyObject *v, PyObject *args) + { +@@ -673,12 +691,12 @@ SwigPyObject_own(PyObject *v, PyObject *args) + #ifdef METH_O + static PyMethodDef + swigobject_methods[] = { +- {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, +- {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, ++ {(char *)"disown", (PyCFunction)SwigPyObject_disown2, METH_NOARGS, (char *)"releases ownership of the pointer"}, ++ {(char *)"acquire", (PyCFunction)SwigPyObject_acquire2,METH_NOARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, +- {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, ++ {(char *)"__repr__",(PyCFunction)SwigPyObject_repr2, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} + }; + #else +@@ -689,7 +707,7 @@ swigobject_methods[] = { + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, +- {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, ++ {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} + }; + #endif +diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx +index a6801fc..72eaa77 100644 +--- a/Source/Modules/python.cxx ++++ b/Source/Modules/python.cxx +@@ -1109,7 +1109,7 @@ public: + * ------------------------------------------------------------ */ + int add_pyinstancemethod_new() { + String *name = NewString("SWIG_PyInstanceMethod_New"); +- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_O, NULL},\n", name, name); ++ Printf(methods, "\t { \"%s\", %s, METH_O, NULL},\n", name, name); + Delete(name); + return 0; + } +@@ -2479,17 +2479,17 @@ public: + if (!kw) { + if (n && funpack) { + if (num_required == 0 && num_arguments == 0) { +- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_NOARGS, ", name, function); ++ Printf(methods, "\t { \"%s\", %s, METH_NOARGS, ", name, function); + } else if (num_required == 1 && num_arguments == 1) { +- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_O, ", name, function); ++ Printf(methods, "\t { \"%s\", %s, METH_O, ", name, function); + } else { +- Printf(methods, "\t { (char *)\"%s\", %s, METH_VARARGS, ", name, function); ++ Printf(methods, "\t { \"%s\", %s, METH_VARARGS, ", name, function); + } + } else { +- Printf(methods, "\t { (char *)\"%s\", %s, METH_VARARGS, ", name, function); ++ Printf(methods, "\t { \"%s\", %s, METH_VARARGS, ", name, function); + } + } else { +- Printf(methods, "\t { (char *)\"%s\", (PyCFunction) %s, METH_VARARGS | METH_KEYWORDS, ", name, function); ++ Printf(methods, "\t { \"%s\", (PyCFunction)%s, METH_VARARGS|METH_KEYWORDS, ", name, function); + } + + if (!n) { +@@ -3857,7 +3857,7 @@ public: + if (shadow) { + if (builtin) { + String *rname = SwigType_namestr(real_classname); +- Printf(builtin_methods, " { \"__disown__\", (PyCFunction) Swig::Director::swig_pyobj_disown< %s >, METH_NOARGS, \"\" },\n", rname); ++ Printf(builtin_methods, " { \"__disown__\", Swig::Director::swig_pyobj_disown< %s >, METH_NOARGS, \"\" },\n", rname); + Delete(rname); + } else { + String *symname = Getattr(n, "sym:name"); +@@ -4694,13 +4694,13 @@ public: + int argcount = Getattr(n, "python:argcount") ? atoi(Char(Getattr(n, "python:argcount"))) : 2; + String *ds = have_docstring(n) ? cdocstring(n, AUTODOC_FUNC) : NewString(""); + if (check_kwargs(n)) { +- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_VARARGS|METH_KEYWORDS, (char *) \"%s\" },\n", symname, wname, ds); ++ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, METH_VARARGS|METH_KEYWORDS, \"%s\" },\n", symname, wname, ds); + } else if (argcount == 0) { +- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_NOARGS, (char *) \"%s\" },\n", symname, wname, ds); ++ Printf(builtin_methods, " { \"%s\", %s, METH_NOARGS, \"%s\" },\n", symname, wname, ds); + } else if (argcount == 1) { +- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_O, (char *) \"%s\" },\n", symname, wname, ds); ++ Printf(builtin_methods, " { \"%s\", %s, METH_O, \"%s\" },\n", symname, wname, ds); + } else { +- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_VARARGS, (char *) \"%s\" },\n", symname, wname, ds); ++ Printf(builtin_methods, " { \"%s\", %s, METH_VARARGS, \"%s\" },\n", symname, wname, ds); + } + Delete(fullname); + Delete(wname); +@@ -4801,10 +4801,10 @@ public: + Append(pyflags, "METH_VARARGS"); + if (have_docstring(n)) { + String *ds = cdocstring(n, AUTODOC_STATICFUNC); +- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, %s, (char *) \"%s\" },\n", symname, wname, pyflags, ds); ++ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, %s, \"%s\" },\n", symname, wname, pyflags, ds); + Delete(ds); + } else { +- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, %s, \"\" },\n", symname, wname, pyflags); ++ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, %s, \"\" },\n", symname, wname, pyflags); + } + Delete(fullname); + Delete(wname); +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch b/poky/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch new file mode 100644 index 000000000..10e4afd1b --- /dev/null +++ b/poky/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch @@ -0,0 +1,36 @@ +From 9825fcbab5c4ddd867432f9922bebfbec7b78af0 Mon Sep 17 00:00:00 2001 +From: Mark Dufour <m.dufour@kopano.com> +Date: Tue, 14 Feb 2017 10:34:37 +0100 +Subject: [PATCH] [Coverity] fix issue reported for SWIG_Python_FixMethods + +Fix Coverity issue reported for SWIG_Python_FixMethods: + +"buffer_size: Calling strncpy with a source string whose length +(10 chars) is greater than or equal to the size argument (10) +will fail to null-terminate buff." + +The issue is only reported for the "swig_ptr: " line, but for +consistency we replace both occurrences of strncpy with memcpy. +--- +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Backport [https://github.com/swig/swig/pull/898] + + Lib/python/pyinit.swg | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: swig-3.0.12/Lib/python/pyinit.swg +=================================================================== +--- swig-3.0.12.orig/Lib/python/pyinit.swg ++++ swig-3.0.12/Lib/python/pyinit.swg +@@ -306,9 +306,9 @@ SWIG_Python_FixMethods(PyMethodDef *meth + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; +- strncpy(buff, methods[i].ml_doc, ldoc); ++ memcpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; +- strncpy(buff, "swig_ptr: ", 10); ++ memcpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; diff --git a/poky/meta/recipes-devtools/swig/swig_3.0.12.bb b/poky/meta/recipes-devtools/swig/swig_3.0.12.bb index 15f734868..fe9d0747f 100644 --- a/poky/meta/recipes-devtools/swig/swig_3.0.12.bb +++ b/poky/meta/recipes-devtools/swig/swig_3.0.12.bb @@ -3,6 +3,8 @@ require ${BPN}.inc SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \ file://0001-configure-use-pkg-config-for-pcre-detection.patch \ file://0001-Add-Node-7.x-aka-V8-5.2-support.patch \ + file://swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch \ + file://Python-Fix-new-GCC8-warnings-in-generated-code.patch \ " SRC_URI[md5sum] = "82133dfa7bba75ff9ad98a7046be687c" SRC_URI[sha256sum] = "7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d" |