]> git.lttng.org Git - lttng-tools.git/commit
tests/unit: fix object files' location
authorSamuel Martin <s.martin49@gmail.com>
Tue, 1 Dec 2015 23:36:45 +0000 (00:36 +0100)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Dec 2015 10:26:54 +0000 (05:26 -0500)
commitfd6ad115a7f0a70e57bbcdb71034a2fa172e1096
tree0b9b6d7dae72223b2410c8f28031f09f86e098e1
parentcc1aea280e10332aa37a3839ca8e252cf2a2a2ec
tests/unit: fix object files' location

Referring to *.o files under a .libs/ directory is not recommended
because this belongs to libtool's innards.

Indeed, libtool decides to place the *.o files in an
implementation-specific location:
- PIC *.o files go into a .libs/ directory;
- non-PIC *.o files are generated along side to their corresponding
  source files.

Using PIC objects to build executable is legit, thought it may
introduce some minor overhead at runtime.

However, hard-coding these PIC object files in the Makefile.am to build
executables breaks the build in case of static only build.

In this case, no PIC object files is generated, so the linker will not
found some of the needed objects files.

Changing these dependencies' path fixes the static build, keeping the
shared one ok, though the non-PIC object files are now always built.

Fixes #983.

Fix tested on git master and v2.6 with no change needed.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/unit/Makefile.am
This page took 0.032562 seconds and 4 git commands to generate.