diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2024-05-02 10:57:31 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2024-05-02 23:03:08 +0200 |
commit | 85b09765c45e3fcfc1eb1400eff659454850a42f (patch) | |
tree | d71c13a42a5d436231dbe75a7e178a9ccb3ccee9 /lib/elf_py.c | |
parent | *: add XREF_SETUP() to libraries and utilites (diff) | |
download | frr-85b09765c45e3fcfc1eb1400eff659454850a42f.tar.xz frr-85b09765c45e3fcfc1eb1400eff659454850a42f.zip |
build: warn/fail on missing `XREF_SETUP()`
While clippy tries really, really hard to work under adverse conditions,
and this catches missing XREF_SETUP() on almost all CPU architectures,
this doesn't quite work on hppa. So, make it a warning on *all*
platforms (or error for --enable-dev-build) in order to catch it before
shipping off to Debian's buildd and blowing up there...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/elf_py.c')
-rw-r--r-- | lib/elf_py.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/elf_py.c b/lib/elf_py.c index 643495d8c..2b4fea373 100644 --- a/lib/elf_py.c +++ b/lib/elf_py.c @@ -1358,6 +1358,15 @@ bool elf_py_init(PyObject *pymod) (void)methods_elfpy; #endif +#if defined(HAVE_GELF_GETNOTE) && defined(HAVE_ELF_GETDATA_RAWCHUNK) + PyObject *elf_notes = Py_True; +#else + PyObject *elf_notes = Py_False; +#endif + Py_INCREF(elf_notes); + if (PyModule_AddObject(pymod, "elf_notes", elf_notes)) + Py_DECREF(elf_notes); + ELFFormatError = PyErr_NewException("_clippy.ELFFormatError", PyExc_ValueError, NULL); PyModule_AddObject(pymod, "ELFFormatError", ELFFormatError); |