HEAD clang failures due to unknown arguments
Dmitry Marakasov
amdmi3 at amdmi3.ru
Sat Mar 29 12:46:57 UTC 2014
* Dimitry Andric (dim at 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
amdmi3 at amdmi3.ru ..: jabber: amdmi3 at jabber.ru http://www.amdmi3.ru
More information about the freebsd-ports
mailing list