tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gcc wrapper silently dropping -L



I had a symlink in my WRKOBJDIR and hit this pretty hard:

David Holland <dholland-pkgtech%netbsd.org@localhost> writes:

> On Sun, Oct 27, 2013 at 02:42:40AM +0200, Hubert Feyrer wrote:
>  > My /usr/pkgsrc is a symlink, and apparently that causes problems:
>
> That's not allowed -- it would be better if it failed clearly.
>
> The problem is that in order to make the buildlinking work right the
> wrappers need to be able to recognize which paths lead to both the
> pkgsrc tree and the installed pkg tree; if there are symlinks and
> therefore multiple names, it misses some forms and then does the wrong
> things.
>

Does anyone have an opinion on a patch like this?
The main thing I'm nervous about is that it changes the behavior
in the case where ${PWD} is set.

Darrin

Index: bsd.prefs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.prefs.mk,v
retrieving revision 1.347
diff -u -r1.347 bsd.prefs.mk
--- bsd.prefs.mk        6 May 2014 14:48:06 -0000       1.347
+++ bsd.prefs.mk        20 Jul 2014 01:54:45 -0000
@@ -721,9 +721,14 @@
 
 # If WRKOBJDIR is set, use that tree to build
 .if defined(WRKOBJDIR)
+.  if exists(${WRKOBJDIR})
+_WRKOBJDIR!=           cd ${WRKOBJDIR} && ${PWD_CMD} -P
+BUILD_DIR?=            ${_WRKOBJDIR}/${PKGPATH}
+.  else
 BUILD_DIR?=            ${WRKOBJDIR}/${PKGPATH}
+.  endif
 .else
-BUILD_DIR!=            cd ${.CURDIR} && ${PWD_CMD}
+BUILD_DIR!=            cd ${.CURDIR} && ${PWD_CMD} -P
 .endif
 
 # If OBJHOSTNAME is set, use first component of hostname in directory name.


Home | Main Index | Thread Index | Old Index