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 08:47:06 +0000 (03:47 -0500)
commit3622d7c3931685fab8d1b2e5585a369b78cefd12
tree188f9a981767b654c9e3472db4dddbdfd5731617
parente9cee23a2e92694ba1347fd1242026d4c19413a8
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.025975 seconds and 4 git commands to generate.