tests: put -no-pie in LDFLAGS instead of CFLAGS
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 13 Feb 2020 15:36:04 +0000 (10:36 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 10 Mar 2020 02:12:03 +0000 (22:12 -0400)
commit234009e7170dbdbb857375718fa7249e6083bd25
tree6bc80cc0cff619818597fd70c71755a73edc42c6
parent3ec89b08ee373842b6be05d01a6e4aabd6db21a0
tests: put -no-pie in LDFLAGS instead of CFLAGS

When building with clang, we get:

    make[4]: Entering directory
    '/home/smarchi/build/lttng-tools-clang/tests/utils/testapp/gen-syscall-events-callstack'
      CC       gen-syscall-events-callstack.o
    clang: error: argument unused during compilation: '-no-pie'
    [-Werror,-Wunused-command-line-argument]

Indeed, -no-pie should be in LDFLAGS, not CFLAGS.

To make sure that Makefiles can use `AM_LDFLAGS += ...`, I have added
an AC_SUBST for AM_LDFLAGS in configure.ac.  This makes it so that if
we ever set AM_LDFLAGS for real in configure.ac, the Makefiles won't
inadvertently overwrite that value.

Change-Id: I7bad985bb135e50750917db6a928f2705a85b445
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac
tests/utils/testapp/gen-syscall-events-callstack/Makefile.am
This page took 0.033739 seconds and 4 git commands to generate.