Closed vt-alt closed 1 year ago
It seems that previous version didn't even try to compile scratch_buffer_grow_preserve
.
hmm, it cannot be reproduced on Fedora 37 with gcc-12.2.1-2.fc37.x86_64, though many warnings are emitted..
$ make warn
...
CC save-cwd.o
CC malloc/scratch_buffer_grow.o
CC malloc/scratch_buffer_grow_preserve.o
CC malloc/scratch_buffer_set_array_size.o
CC setlocale_null.o
...
Thanks to note that, I will try to find the difference between setups.
Offending lines in /usr/include/bits/string_fortified.h
are
142 #ifdef __USE_MISC
143 __warndecl (__warn_strlcpy_size_zero,
144 "strlcpy used with a size argument of zero");
145 __warndecl (__warn_strlcpy_size_large,
146 "strlcpy used with a size argument which is too large");
147 extern size_t __strlcpy_chk (char *__dest, const char *__src, size_t __n,
148 size_t __destlen) __THROW;
149 extern size_t __REDIRECT_NTH (__strlcpy_alias,
150 (char *__dest, const char *__src, size_t __n),
151 strlcpy);
This seem related to that in bundled gdb's libc-config.h
(part of gnulib, which in turn is imported from glibc) where __warndecl
is undefined, thus making these (and following) statements fail.
I wonder how this should be approached though.
This is so peculiar to ALT perhaps I should just hack it around. So I did:
diff --git a/Makefile b/Makefile
index a94a243c24..d245bea6e1 100644
--- a/Makefile
+++ b/Makefile
@@ -293,6 +293,7 @@ gdb_unzip:
gdb_patch:
if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ]; then \
patch -p0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; fi
+ sed -i '/warndecl/d' gdb-*/gnulib/import/libc-config.h
library: ${OBJECT_FILES}
ar -rs ${PROGRAM}lib.a ${OBJECT_FILES}
When building last released version of
crash-8.0.3
ongcc version 12.2.1 20230322
error appears: