Add possibility to debug undefined symbols only as optional

some tokens require symbols defined by proprietal libraries, that are not available during compile time.
This commit is contained in:
Jakub Jelen 2015-05-07 10:52:35 +02:00
parent 07bb211420
commit 56451388e6
3 changed files with 18 additions and 9 deletions

View File

@ -10,15 +10,6 @@ diff --git a/configure.in b/configure.in
dnl Checks for header files. dnl Checks for header files.
AC_DISABLE_STATIC AC_DISABLE_STATIC
@@ -571,7 +571,7 @@ fi
AM_CONDITIONAL([ENABLE_PKCSCCA_MIGRATE], [test "x$enable_pkcscca_migrate" = "xyes"])
AM_CONDITIONAL([ENABLE_PKCSEP11_MIGRATE], [test "x$enable_pkcsep11_migrate" = "xyes"])
-CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500"
+CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500 -Wl,--no-undefined"
CFLAGS+=' -DCONFIG_PATH=\"$(localstatedir)/lib/opencryptoki\" -DSBIN_PATH=\"$(sbindir)\" -DLIB_PATH=\"$(libdir)\" -DLOCKDIR_PATH=\"$(lockdir)\" -DOCK_CONFDIR=\"$(sysconfdir)/opencryptoki\"'
diff --git a/usr/lib/pkcs11/cca_stdll/cca_specific.c b/usr/lib/pkcs11/cca_stdll/cca_specific.c diff --git a/usr/lib/pkcs11/cca_stdll/cca_specific.c b/usr/lib/pkcs11/cca_stdll/cca_specific.c
--- a/usr/lib/pkcs11/cca_stdll/cca_specific.c --- a/usr/lib/pkcs11/cca_stdll/cca_specific.c
+++ b/usr/lib/pkcs11/cca_stdll/cca_specific.c +++ b/usr/lib/pkcs11/cca_stdll/cca_specific.c

View File

@ -0,0 +1,12 @@
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -571,7 +571,7 @@ fi
AM_CONDITIONAL([ENABLE_PKCSCCA_MIGRATE], [test "x$enable_pkcscca_migrate" = "xyes"])
AM_CONDITIONAL([ENABLE_PKCSEP11_MIGRATE], [test "x$enable_pkcsep11_migrate" = "xyes"])
-CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500"
+CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500 -Wl,--no-undefined"
CFLAGS+=' -DCONFIG_PATH=\"$(localstatedir)/lib/opencryptoki\" -DSBIN_PATH=\"$(sbindir)\" -DLIB_PATH=\"$(libdir)\" -DLOCKDIR_PATH=\"$(lockdir)\" -DOCK_CONFDIR=\"$(sysconfdir)/opencryptoki\"'

View File

@ -15,6 +15,10 @@ Patch0: %{name}-2.4-group.patch
Patch1: %{name}-3.2-conditional-manpages.patch Patch1: %{name}-3.2-conditional-manpages.patch
# Fix missing sources and libraries in makefiles causing undefined symbols (#1193560) # Fix missing sources and libraries in makefiles causing undefined symbols (#1193560)
Patch2: %{name}-3.2-missing-sources-and-libraries.patch Patch2: %{name}-3.2-missing-sources-and-libraries.patch
# Use --no-undefined to debug missing symbols
#Patch100: %{name}-3.2-no-undefined.patch
Requires(pre): shadow-utils coreutils sed Requires(pre): shadow-utils coreutils sed
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: trousers-devel BuildRequires: trousers-devel
@ -181,6 +185,8 @@ configured with Enterprise PKCS#11 (EP11) firmware.
%patch1 -p1 -b .man %patch1 -p1 -b .man
%patch2 -p1 -b .source %patch2 -p1 -b .source
#%patch100 -p1 -b .no-undefined
# Upstream tarball has unnecessary executable perms set on the sources # Upstream tarball has unnecessary executable perms set on the sources
find . -name '*.[ch]' -print0 | xargs -0 chmod -x find . -name '*.[ch]' -print0 | xargs -0 chmod -x