components/pcsc-lite/patches/01-ltmain.sh.patch
author Stephen Gaul Jr <steve.gaul@oracle.com>
Fri, 03 Jun 2016 09:30:42 -0700
changeset 6133 73641150a4de
permissions -rw-r--r--
PSARC/2016/217 Smartcard Reintroduction PSARC/2016/218 USB CCID PSARC/2016/221 PC/SC Lite smartcard middleware 22017759 Add pcsclite v1.8.14 to Userland consolidation 22017751 Add libccid v1.4.20 to Userland consolidation

In-house patch created as a workaround until BugID: 22985199 is completed.

This patch is Solaris buildenv specific and may not be suitable for upstream.

--- pcsc-lite-1.8.14/ltmain.sh	2016-05-05 13:01:01.885421474 -0400
+++ pcsc-lite-1.8.14/ltmain.sh	2016-03-10 19:52:10.679807000 -0500
@@ -5662,7 +5662,8 @@
 	func_append finalize_command " $arg"
 	case "$new_inherited_linker_flags " in
 	    *" $arg "*) ;;
-	    * ) func_append new_inherited_linker_flags " $arg" ;;
+	    * ) func_append new_inherited_linker_flags " $arg" 
+		;;
 	esac
 	continue
 	;;
@@ -6173,7 +6174,7 @@
 	    if test "$linkmode" = lib ; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
-		    * ) func_append new_inherited_linker_flags " $deplib" ;;
+		    * ) func_append new_inherited_linker_flags "" ;;
 		esac
 	    fi
 	  fi
@@ -7145,6 +7146,13 @@
 	    case $deplib in
 	    -L*) new_libs="$deplib $new_libs" ;;
 	    -R*) ;;
+	     #
+            # XXX: Special case handling for sunstudio and sunlinker on 
+            #      Solaris 11 and 12 as -pthread is no longer needed and 
+	     #      if passed as an arguement/option to ld, it will error 
+            #      when parsed by ld
+            #
+            -pthread) $new_libs = "$new_libs" ;;
 	    *)
 	      # And here is the reason: when a library appears more
 	      # than once as an explicit dependence of a library, or