Subject: diffs to use boehm-gc with any package (and an example)
To: None <pkgsrc-users@netbsd.org>
From: Blair Sadewitz <blair.sadewitz@gmail.com>
List: pkgsrc-users
Date: 04/20/2007 00:15:26
------=_Part_88409_1092444.1177042526987
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I thought it would be useful if boehm-gc could be easily buildlinked
into a package so that package could benefit from garbage collection.
The attached patch allows for this. I include a patch for elinks as
well. This allows elinks to be built with the 'fastmem' option while
boehm-gc worries about malloc() and associated functions.
I haven't checked to see if this does exactly what I intend it to, but
insofar as the pkgsrc make rules and linking against -lgc, it works.
If I've done this right, it would be nice to see this committed, at
least to boehm-gc.
Regards,
--Blair
------=_Part_88409_1092444.1177042526987
Content-Type: application/octet-stream; name="elinks-gc.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="elinks-gc.patch"
LS0tIGRldmVsL2JvZWhtLWdjL01ha2VmaWxlCTUgTm92IDIwMDYgMTc6NDk6MzMgLTAwMDAJMS41
OAorKysgZGV2ZWwvYm9laG0tZ2MvTWFrZWZpbGUJMjAgQXByIDIwMDcgMDQ6MDc6MDQgLTAwMDAK
QEAgLTIzLDYgKzIzLDggQEAKIAogVEVTVF9UQVJHRVQ9CQljaGVjawogCisuaW5jbHVkZSAib3B0
aW9ucy5tayIKKwogLmluY2x1ZGUgIi4uLy4uL21rL2JzZC5wcmVmcy5tayIKIAogLmlmICR7T1BT
WVN9ICE9ICJEYXJ3aW4iCi0tLSBkZXZlbC9ib2VobS1nYy9idWlsZGxpbmszLm1rCTggSnVsIDIw
MDYgMjM6MTA6NDEgLTAwMDAJMS4xMgorKysgZGV2ZWwvYm9laG0tZ2MvYnVpbGRsaW5rMy5tawky
MCBBcHIgMjAwNyAwNDowNzowNCAtMDAwMApAQCAtMTcsNCArMTcsMTQgQEAKIEJVSUxETElOS19Q
S0dTUkNESVIuYm9laG0tZ2M/PQkuLi8uLi9kZXZlbC9ib2VobS1nYwogL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