Bug 1234 - configure adds opensc libs to LDFLAGS when it should use LIBS
Summary: configure adds opensc libs to LDFLAGS when it should use LIBS
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: Other Linux
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-23 14:53 AEST by Mike Frysinger
Modified: 2006-10-07 11:45 AEST (History)
0 users

See Also:


Attachments
openssh-opensc-libs.patch (622 bytes, patch)
2006-09-23 14:54 AEST, Mike Frysinger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Frysinger 2006-09-23 14:53:57 AEST
configure.ac does this:
                        LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
                        LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
                        CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
                        LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"

since we're grabbing libs, we actually want to be sticking that into LIBS

otherwise, when the binaries get linked, they're of the form:
$(CC) <objects> -o ssh $LDFLAGS <sshlibs> $LIBS

so -lopensc goes into LDFLAGS instead of LIBS and if we use something like -static or --as-needed in LDFLAGS, the build aborts because the <sshlibs> use symbols from -lopensc but -lopensc is discarded before sshlibs get processed
Comment 1 Mike Frysinger 2006-09-23 14:54:40 AEST
Created attachment 1186 [details]
openssh-opensc-libs.patch

patch against current portable openssh cvs tree
Comment 2 Darren Tucker 2006-09-23 16:26:27 AEST
Looks sane and test OK here.  Applied, thanks.
Comment 3 Darren Tucker 2006-10-07 11:45:57 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.