On Wed, Nov 14, 2018 at 02:08:05PM +0100, Tom de Vries wrote:
> > +btest_dwz_CFLAGS = $(AM_CFLAGS) -g -O0
>
> Hmm, I already discovered that specifying the -O0 doesn't work, since
> it's overridden by $(CFLAGS).
>
> With a hack like this:
> ...
> diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am
> index 2fec9bbb4b6..8bdf13b3546 100644
> --- a/libbacktrace/Makefile.am
> +++ b/libbacktrace/Makefile.am
> @@ -99,11 +99,14 @@ check_PROGRAMS += btest
> if HAVE_DWZ
>
> btest_dwz_SOURCES = btest_dwz.c testlib.c
> -btest_dwz_CFLAGS = $(AM_CFLAGS) -g -O0
> +btest_dwz_CFLAGS = $(AM_CFLAGS) -g
> btest_dwz_LDADD = libbacktrace.la
>
> check_PROGRAMS += btest_dwz
>
> +btest_dwz-btest_dwz.o: btest_dwz.c
> + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
> $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_dwz_CFLAGS) $(CFLAGS) -O0 -c -o
> btest_dwz-btest_dwz.o `test -f 'btest_dwz.c' || echo
> '$(srcdir)/'`btest_dwz.c
Can't you instead do something like:
btest_dwz.o: CFLAGS += -g -O0
or something similar (whatever the corresponding goal is)?
Otherwise, the patch looks generally ok to me, but yes, I've been wondering
how you can get away with DW_FORM_GNU_ref_alt not implemented properly.
Jakub