From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jun 3 22:11:26 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15996A0 for ; Tue, 3 Jun 2014 22:11:26 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA3EF20B4 for ; Tue, 3 Jun 2014 22:11:25 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s53MBPic005666 for ; Tue, 3 Jun 2014 23:11:25 +0100 (BST) (envelope-from no-reply-bugzilla-daemon@freebsd.org) From: no-reply-bugzilla-daemon@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 190592] New: [exp-run] Support LIBS variable (like LDFLAGS) Date: Tue, 03 Jun 2014 22:11:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Infrastructure X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tijl@FreeBSD.org X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 22:11:26 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190592 Bug ID: 190592 Summary: [exp-run] Support LIBS variable (like LDFLAGS) Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: Infrastructure Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: tijl@FreeBSD.org Created attachment 143345 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=143345&action=edit patch When a port builds two libraries with libtool with one linking to the other, libtool will relink that library on installation. I currently don't fully understand why it does this, but the way it does this in combination with staging means we need to be careful with things like LDFLAGS+=-L${LOCALBASE}/lib. During build phase when linking a library libA with libB using for instance ../libBsrc/libB.la, libtool will replace that path with ../libBsrc/libB.so and there's no problem. During staging phase however libtool relinks libA with "-L${STAGEDIR}${PREFIX}/lib -lB". It is important that this -L option precedes other -L options like -L${LOCALBASE}/lib, otherwise a pre-installed libB might be linked in instead of the freshly built one. Somewhat simplified the linker command line looks like: ${CC} ${src_LDFLAGS} ${LDFLAGS} ${src_LIBS} ${LIBS} where src_LDFLAGS and src_LIBS are controlled by upstream and LDFLAGS and LIBS can be controlled by us. Normally "../libBsrc/libB.la" would be part of src_LIBS which means we need to put flags like -L${LOCALBASE}/lib in LIBS instead of LDFLAGS like most ports currently do. Some ports already use LIBS. The attached patch improves support for that. - Add LIBS=${LIBS} to MAKE_ENV and CONFIGURE_ENV. - Add an option helper for LIBS. - Add a sanity check for LDFLAGS containing -L and/or -l options. (Currently only when GNU_CONFIGURE is defined.) - While here, add a sanity check for CFLAGS containing -D and/or -I options. (Currently only when GNU_CONFIGURE is defined.) - Adjust all ports that already use LIBS. Also remove references to PTHREAD_CFLAGS and PTHREAD_LIBS while here. -- You are receiving this mail because: You are the assignee for the bug.