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:27 +0000 (05:26 -0500)
commit5dae459717df0d6c2a3194987712bf4e545e9ee7
tree3ebc94332275ac1eeddcf60cdb776fda5849f97f
parent75df93099f6fc18ddd1599efd1313d5260c4d49a
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.025738 seconds and 4 git commands to generate.