pkgsrc/devel/bison/hacks.mk
jperkin c24ed9c54f The "rename" rule is a published synonym for the "opt" transform rule, however
only the latter is supported by cwrappers.  Change them all to "opt" rules for
consistency and to gain compatibility with cwrappers.
2014-12-15 11:46:34 +00:00

25 lines
809 B
Makefile

# $NetBSD: hacks.mk,v 1.6 2014/12/15 11:46:34 jperkin Exp $
.if !defined(BISON_HACKS_MK)
BISON_HACKS_MK= defined
.include "../../mk/compiler.mk"
### [Tue Nov 2 17:30:48 GMT 2004 : sketch]
### bison's quotearg_buffer_restyled() has issues with certain compilers
### (in particular, SunPro on Solaris/sparc) using optimisation flags.
### The resulting bison with optimisation breaks on at least net/libIDL.
###
.if !empty(PKGSRC_COMPILER:Msunpro)
PKG_HACKS+= optimisation
BUILDLINK_TRANSFORM+= rm:-O[0-9]*
.endif
### gcc-4.5.3 in NetBSD/arm 5.99.59 also breaks bison in net/libIDL.
### -O seems enough for workaround in this case.
.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) && !empty(CC_VERSION:Mgcc-4.5.*)
PKG_HACKS+= optimisation
BUILDLINK_TRANSFORM+= opt:-O[0-9]*:-O
.endif
.endif # BISON_HACKS_MK