Skip to content

Commit f50ab09

Browse files
author
Hon Ching(Vicky) Lo
committed
[PATCH] Makefile.am: make sure libintl is in LDFLAGS when needed
The build-system internally builds a couple of static libraries used to build the final programs. When linking these libraries and the final programs, we need to explicitly tell libtool to link with libintl in order to resolve all the missing symbols. This is done in the appropriate LDADD/LIBADD variables (or the per-target *_LDADD/*_LIBADD ones when they do not default to LDADD or LIBADD), for any sources using gettext/libintl functionalities. This change fixes build failures [2,3] in cross-compilation, triggered by Buildroot buildfarms [1]. [1] http://autobuild.buildroot.org/ [2] http://autobuild.buildroot.org/?reason=tpm-tools-1.3.8 [3] http://autobuild.buildroot.org/results/c82/c82a6c1f41c561b15f10e7b7ffcaed15fa0ec895/build-end.log Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Hon Ching (Vicky) Lo <honclo@linux.vnet.ibm.com>
1 parent edb95a0 commit f50ab09

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

‎lib/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ libtpm_utils_la_SOURCES = tpm_utils.c \
4444
#
4545
# TSPI interface library
4646
libtpm_tspi_la_SOURCES = tpm_tspi.c
47-
libtpm_tspi_la_LIBADD = libtpm_utils.la -ldl
47+
libtpm_tspi_la_LIBADD = libtpm_utils.la -ldl @INTLLIBS@
4848

4949
#
5050
# PKCS#11 interface library
5151
if P11_SUPPORT
5252
noinst_LTLIBRARIES += libtpm_pkcs11.la
5353

5454
libtpm_pkcs11_la_SOURCES= tpm_pkcs11.c
55-
libtpm_pkcs11_la_LIBADD = libtpm_utils.la
55+
libtpm_pkcs11_la_LIBADD = libtpm_utils.la @INTLLIBS@
5656
endif
5757

5858
#
@@ -80,4 +80,4 @@ endif
8080
# Unseal library - for addition to existing apps, counter part of seal cmd
8181
libtpm_unseal_la_SOURCES = tpm_unseal.c
8282
libtpm_unseal_la_LDFLAGS = -shared -version-info 1:0:0
83-
libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la
83+
libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la @INTLLIBS@

‎src/cmds/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ else
3030
AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX
3131
endif
3232

33-
LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -lcrypto
33+
LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -lcrypto @INTLLIBS@
3434

3535
tpm_sealdata_SOURCES = tpm_sealdata.c
3636
tpm_unsealdata_SOURCES = tpm_unsealdata.c

‎src/data_mgmt/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ noinst_HEADERS = data_common.h \
3838
# Common build flags
3939
AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX
4040

41-
LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl
41+
LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl @INTLLIBS@
4242

4343

4444
#

‎src/tpm_mgmt/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ else
5555
AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX
5656
endif
5757

58-
LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi
58+
LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi @INTLLIBS@
5959

6060
tpm_startup_SOURCES = tpm_startup.c
6161
tpm_reset_SOURCES = tpm_reset.c

0 commit comments

Comments
 (0)