Subject: pkg/15652: gettext-lib/buildlink.mk blindly uses -R flag for INTLIBS
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rob@terizla.org>
List: netbsd-bugs
Date: 02/18/2002 00:51:52
>Number:         15652
>Category:       pkg
>Synopsis:       gettext-lib/buildlink.mk blindly uses -R flag for INTLIBS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 18 00:52:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Rob Latham
>Release:        pkgsrc on darwin (os x)
>Organization:
>Environment:
Darwin localhost 5.2 Darwin Kernel Version 5.2: Fri Dec  7 21:39:35 PST 2001; root:xnu/xnu-201.14.obj~1/RELEASE_PPC  Power Macintosh powerpc

>Description:
not every pkgsrc platform needs or even understands the -R linker flag. The _USE_RPATH macro can be checked if -R is needed
>How-To-Repeat:
build any package that uses gettext/buildlink.mk on an operating system that doesn't understand the -R flag to the linker ( Mac OS X for one )
>Fix:
Index: buildlink.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gettext-lib/buildlink.mk,v
retrieving revision 1.12
diff -u -w -u -r1.12 buildlink.mk
--- buildlink.mk        2001/10/26 19:18:36     1.12
+++ buildlink.mk        2002/02/18 08:49:48
@@ -53,7 +53,9 @@
 #
 INTLLIBS=                      -L${BUILDLINK_DIR}/lib
 .if ${_NEED_GNU_GETTEXT} == "YES"
+.if ${_USE_RPATH} == "yes"
 INTLLIBS+=                     -Wl,-R${BUILDLINK_PREFIX.gettext}/lib
+.endif
 .endif
 INTLLIBS+=                     -lintl
 LIBS+=                         ${INTLLIBS}

>Release-Note:
>Audit-Trail:
>Unformatted: