Subject: -Wl,-rpath on non-ELF systems
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-pkg
Date: 08/22/2002 13:43:45
--oC1+HKm2/end4ao3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

Do I understand it correctly that the '-rpath' option only works on
ELF-systems?  I found www/ap-php3 to only compile under Linux if I take
this option out -- I would assume that there are other instances where
this option might cause a build to fail.

Is the attached patch the right thing to do in this instance?

-Jan

-- 
I always said there was something fundamentally wrong with the universe.

--oC1+HKm2/end4ao3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ap-php3.nonelf.diff"

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap-php3/Makefile,v
retrieving revision 1.10
diff -b -u -r1.10 Makefile
--- Makefile	2002/02/28 15:07:16	1.10
+++ Makefile	2002/08/22 17:34:53
@@ -14,6 +14,12 @@
 
 CPPFLAGS+=		-DPHP_INTERNAL_FUNCS
 
+.if ${OBJECT_FMT} != ELF
+post-patch:
+	${SED} -e 's|@RPATHS@||' ${WRKSRC}/Makefile.in > ${WRKSRC}/Makefile.in.tmp
+	${MV} ${WRKSRC}/Makefile.in.tmp ${WRKSRC}/Makefile.in
+.endif
+
 do-install:
 	${INSTALL_DATA} ${WRKSRC}/libphp3.so ${PREFIX}/lib/httpd/mod_php3.so
 

--oC1+HKm2/end4ao3--