From: Indu Bhagat <indu.bhagat@oracle.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: binutils@sourceware.org
Subject: Re: [PATCH,V2 05/15] libsframe: add the SFrame library
Date: Sun, 30 Oct 2022 00:37:07 -0700 [thread overview]
Message-ID: <4905532c-9e02-8d07-0898-c94d61890f2f@oracle.com> (raw)
In-Reply-To: <Y1rIxVChnXBJ1Vqk@vapier>
Hi Mike,
On 10/27/22 11:07, Mike Frysinger wrote:
> On 17 Oct 2022 15:16, Indu Bhagat via Binutils wrote:
>> --- /dev/null
>> +++ b/libsframe/Makefile.am
>>
>> +SUBDIRS = testsuite
>
> since this is new code, can you avoid recurisve makes ? rename the subdir
> Makefile.am to local.mk and include them in this Makefile.am instead.
>
OK. I have made the change in V3 to avoid recursive make.
>> +BASEDIR = $(srcdir)/..
>
> you don't actually use this anywhere
>
>> +AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf
>
> you called AC_USE_SYSTEM_EXTENSIONS, so why do you need to use -D_GNU_SOURCE ?
>
>> +AM_CFLAGS = -std=gnu99 @ac_libsframe_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@
>
> most other projects have already moved to C11. why do you have to use such
> an ancient version ?
>
Removed -std=gnu99.
>> +libsframe_la_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir) -I$(srcdir)/../include \
>> + -I$(srcdir)/../libctf
>
> you should be using $(AM_CPPFLAGS) instead of manually duplicating the value
>
>> --- /dev/null
>> +++ b/libsframe/configure.ac
>>
>> +AC_CONFIG_MACRO_DIR(..)
>> +AC_CONFIG_MACRO_DIR(../config)
>> +AC_CONFIG_MACRO_DIR(../bfd)
>
> you're setting ACLOCAL_AMFLAGS already. pretty sure you don't need these.
>
>> +MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
>> +AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
>> +AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
>> +AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
>
> why do you need this logic ? isn't this covered by AM_MAINTAINER_MODE ?
>
>> +# Figure out what compiler warnings we can enable.
>> +# See config/warnings.m4 for details.
>
> use `dnl` for comments, not `#`
>
>> +ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wno-narrowing -Wwrite-strings \
>> + -Wmissing-format-attribute], [warn])
>> +ACX_PROG_CC_WARNING_OPTS([-Wstrict-prototypes -Wmissing-prototypes \
>> + -Wold-style-definition], [c_warn])
>> +ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
>> +
>> +# Only enable with --enable-werror-always until existing warnings are
>> +# corrected.
>> +ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
>
> this project is new. why aren't the warnings fixed to begin with ?
>
>> +DEJAGNU_CHECK_VERSION
>> +AM_CONDITIONAL([HAVE_COMPAT_DEJAGNU], [test "x$ac_cv_dejagnu_compat" = "xyes"])
>> +
>> +COMPAT_DEJAGNU=$ac_cv_dejagnu_compat
>> +AC_SUBST(COMPAT_DEJAGNU)
>> +
>> +AM_MAINTAINER_MODE
>> +AM_INSTALL_LIBBFD
>> +ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_libsframe_warn_cflags])
>
> you already probed -Wall above. do you really need to do it again ?
>
I have sanitized the bits around warning flags, and the code should be
warning-free now. Also addressed the other comments above.
>> +AC_FUNC_MMAP
>> +AC_CHECK_HEADERS(byteswap.h endian.h)
>> +
>> +dnl Check for bswap_{16,32,64}
>> +AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64], [], [], [[#include <byteswap.h>]])
>> +AC_CHECK_DECLS([asprintf, vasprintf, stpcpy])
>
> you aren't using most of this. are you just copying & pasting from another
> tree ?
>
>> +GNU_MAKE_JOBSERVER
>
> do you actually need this ?
>
I saw the commit d546b61084cec687e0063b2e0e169b4690341c23 and judged
that this may be needed.
>> --- /dev/null
>> +++ b/libsframe/testsuite/libsframe.decode/Makefile.am
>> @@ -0,0 +1,17 @@
>> +if HAVE_COMPAT_DEJAGNU
>> + check_PROGRAMS = be-flipping frecnt-1 frecnt-2
>> +else
>> + check_PROGRAMS =
>> +endif
>
> this style complicates things. use:
>
> check_PROGRAMS =
> if HAVE_COMPAT_DEJAGNU
> check_PROGRAMS += ...
> endif
> -mike
OK, changed to the suggested style.
Thanks for reviewing. I have addressed the comments in V3.
next prev parent reply other threads:[~2022-10-30 7:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 22:15 [PATCH,V2 00/15] Definition and support for SFrame unwind format Indu Bhagat
2022-10-17 22:15 ` [PATCH,V2 01/15] sframe.h: Add SFrame format definition Indu Bhagat
2022-10-17 22:15 ` [PATCH,V2 02/15] gas: add new command line option --gsframe Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 03/15] gas: generate .sframe from CFI directives Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 04/15] gas: testsuite: add new tests for SFrame unwind info Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 05/15] libsframe: add the SFrame library Indu Bhagat
2022-10-27 18:07 ` Mike Frysinger
2022-10-30 7:37 ` Indu Bhagat [this message]
2022-10-17 22:16 ` [PATCH,V2 06/15] bfd: linker: merge .sframe sections Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 07/15] readelf/objdump: support for SFrame section Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 08/15] unwinder: generate backtrace using SFrame format Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 09/15] unwinder: Add SFrame unwinder tests Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 10/15] gdb: sim: buildsystem changes to accommodate libsframe Indu Bhagat
2022-10-27 17:36 ` [PATCH, V2 " Mike Frysinger
2022-10-30 7:16 ` Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 11/15] libctf: add libsframe to LDFLAGS and LIBS Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 12/15] src-release.sh: Add libsframe Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 13/15] binutils/NEWS: add text for SFrame support Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 14/15] gas/NEWS: add text about new command line option and " Indu Bhagat
2022-10-17 22:16 ` [PATCH,V2 15/15] doc: add SFrame spec file Indu Bhagat
2022-10-21 10:52 ` [PATCH,V2 00/15] Definition and support for SFrame unwind format Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4905532c-9e02-8d07-0898-c94d61890f2f@oracle.com \
--to=indu.bhagat@oracle.com \
--cc=binutils@sourceware.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).