Hi Ian, > On Mon, May 15, 2017 at 7:24 AM, REIX, Tony <tony.r...@atos.net> wrote: >> Description: >> * This patch enables libbacktrace to handle XCOFF on AIX. >> >> Tests: >> * Fedora25/x86_64 + GCC v7.1.0 : Configure/Build: SUCCESS >> - build made by means of a .spec file based on Fedora gcc-7.0.1-0.12 >> .spec file >> ../configure --enable-bootstrap >> --enable-languages=c,c++,objc,obj-c++,fortran,go,lto --prefix=/usr >> --mandir=/usr/share/man --infodir=/usr/share/info >> --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared >> --enable-threads=posix --enable-checking=release --enable-multilib >> --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions >> --enable-gnu-unique-object --enable-linker-build-id >> --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin >> --enable-initfini-array --with-isl --enable-libmpx >> --enable-offload-targets=nvptx-none --without-cuda-driver >> --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 >> --build=x86_64-redhat-linux >> >> ChangeLog: >> * libbacktrace/Makefile.am : Add xcoff.c >> * libbacktrace/Makefile.in : Regenerated >> * libbacktrace/configure.ac : Add XCOFF output file type >> * libbacktrace/configure : Regenerated >> * libbacktrace/fileline.c : Handle AIX procfs tree >> * libbacktrace/filetype.awk : Add AIX XCOFF type detection >> * libbacktrace/xcoff.c : New file for handling XCOFF format > > Thanks. Committed with some minor changes, as follows. > > Ian > > > 2017-07-21 Tony Reix <tony.r...@atos.net> > > * filetype.awk: Add AIX XCOFF type detection. > * configure.ac: Recognize xcoff format. > * Makefile.am (FORMAT_FILES): Add xcoff.c. > * fileline.c: Include <unistd.h>. > (fileline_initialize): Add case for AIX procfs. > * xcoff.c: New file. > * configure, Makefile.in: Rebuild.
this patch broke Solaris bootstrap: /vol/gcc/src/hg/trunk/local/libbacktrace/fileline.c: In function 'fileline_initialize': /vol/gcc/src/hg/trunk/local/libbacktrace/fileline.c:105:41: error: format '%d' expects argument of type 'int', but argument 4 has type 'pid_t {aka long int}' [-Werror=format=] snprintf (buf, sizeof (buf), "/proc/%d/object/a.out", getpid ()); ~^ ~~~~~~~~~ %ld The following patch allowed bootstrap to finish. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2017-07-23 Rainer Orth <r...@cebitec.uni-bielefeld.de> * fileline.c (fileline_initialize): Print pid_t as long.
diff --git a/libbacktrace/fileline.c b/libbacktrace/fileline.c --- a/libbacktrace/fileline.c +++ b/libbacktrace/fileline.c @@ -102,7 +102,8 @@ fileline_initialize (struct backtrace_st filename = "/proc/curproc/file"; break; case 4: - snprintf (buf, sizeof (buf), "/proc/%d/object/a.out", getpid ()); + snprintf (buf, sizeof (buf), "/proc/%ld/object/a.out", + (long) getpid ()); filename = buf; break; default: