* Dimitry Andric (d...@freebsd.org) wrote:

> > Are we to fix new clang failures related to that clang now treats
> > unknown arguments as fatal errors:
> > 
> > ---
> > c++: error: unknown argument: '-R/usr/local/lib'
> > ---
> 
> Yes, just replace -R/usr/local/lib with -Wl,-rpath,/usr/local/lib.  This
> is very easy to do with sed.

I've just removed them and it worked. Or is there a reason for rpath to
system lib directory?

What about other keys? I've also encountered -fwhole-program and
-malign-double

What I plan to do is:

---
USES+=  compiler:env

.include <bsd.port.pre.mk>

post-patch:
.if ${COMPILER_TYPE} == "clang"
        @${REINPLACE_CMD} -e 's|-fwhole-program||' ${WRKSRC}/CMakeLists.txt
.endif
---

but what if next version of clang learns of this key? I'd like to have
something like

.if ! ${COMPILER_SUPPORTED_ARGUMENTS:M-fwhole-program}
        @${REINPLACE_CMD} -e 's|-fwhole-program||' ${WRKSRC}/CMakeLists.txt
.endif

.if ${COMPILER_SUPPORTED_ARGUMENTS:M-malign-double}
CXXFLAGS+=      -malign-double
.endif

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ru    http://www.amdmi3.ru
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to