On Wednesday, August 29 2018, Bruno Haible wrote: > Hi Sergio,
Hello, Bruno, Thanks for the reply. >> I've just updated GDB's gnulib copy using a recent commit, and now I'm >> noticing a few errors when compiling things on a RHEL 7.1 s390x system. >> Here's what I'm getting >> >> In file included from >> ../../../../binutils-gdb/gdb/gnulib/import/scratch_buffer.h:9:0, >> from ../../../../binutils-gdb/gdb/gnulib/import/glob.c:87: >> ../../../../binutils-gdb/gdb/gnulib/import/malloc/scratch_buffer.h:69:3: >> error: unknown type name max_align_t > > The type max_align_t is supposed to come from <stddef.h>. For this > reason, the gnulib module 'scratch_buffer' depends on the module 'stddef'. > > The module 'stddef' works like this: If at configure time, <stddef.h> is > found to not define max_align_t, a replacement <stddef.h> will be generated. > Otherwise the original <stddef.h> will be used. > > GCC's <stddef.h> defines max_align_t if and only if compiling for C11 > or a newer standard. > > Please look whether you have an stddef.h file in your build tree, and if so, > show it. Thanks for the explanation. I'll try to get access to the machine and check if stddef.h is present or not in the build tree. > >> ../../../../binutils-gdb/gdb/gnulib/import/glob.c: In function glob_in_dir: >> ../../../../binutils-gdb/gdb/gnulib/import/glob.c:1413:15: error: for loop >> initial declarations are only allowed in C99 mode >> for (size_t i = 0; i < cur; ++i) >> ^ > > To me, it looks like > 1) you are compiling with a GCC option that enforces the super-ancient > C89 or C90 mode, and Maybe that's the case. > 2) you added this GCC option after configuring. That is, you configured > with CC="gcc" and then added "-std=c89" in the Makefile. DON'T DO THIS. > YOU MUST PUT GCC OPTIONS THAT DETERMINE THE SUPPORTED LANGUAGE FEATURES > IN THE CC OR CFLAGS VARIABLE. Otherwise configure guesses wrong. I did not do this. I'm aware of the CC/CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS variables. > If you think this is not the case, please run configure with option "-C" > and attach also the config.cache and config.status files. When I get access to the machine, I'll post the results. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/