[M3devel] Stuck on adding new cm3 target (AMD64_DRAGONFLY)

John Marino adacore at marino.st
Fri Jan 24 00:42:01 CET 2014

On 1/19/2014 14:06, John Marino wrote:
> On 1/19/2014 13:50, Jay K wrote:
>> And there are advantages not yet implemented, in particular, efficient
>> exception handling by generating C++.
> Like FreeBSD (and unlike NetBSD and OpenBSD), DragonFly has implemented
> dl_iterate_phdr which gcc uses for efficient zero-cost exception
> handling.  That might come in handy here (I implemented it in
> DragonFly's real-time linker, mainly for Ada/GNAT but C++ benefited.)
>> Your patches should apply fairly cleanly to any new checkout.
>> I am willing to through them and apply them to CVS if you want --
>> depends on if you are ok with my stealing your credit, vs. you want to
>> commit them yourselves.
> I would love it if you did this - I'm happy with a mention in the commit
> message.  I just attached a tarball of all the patches I'm using right
> now.  Some of these changes are specifically for the cross compiler (I'm
> think of the /scripts changes mostly) but most are valid assuming they
> still apply to the head of the repo.  Please take as much as you want
> with my gratitude.
>> I already skimmed them and they all look easy.
>> DragonflyBSD is basically FreeBSD by another name.
> That's not an accident.  As a DragonFly developer that mostly works on
> userland, I've been converging FreeBSD and DragonFly again.  They
> drifted apart after 10 years, but I thought it better to keep the
> userlands as similar as possible for 3rd party applications.
>> Yes, a ton of work has been done on the kernel, file systems, maybe ports.
>> But the ABI is almost the same -- heck, for the most part,
>> Linux==NetBSD==FreeBSD==OpenBSD.
>> Sure, they might be implemented differently, but they are highly source
>> compatible and every highly object code compatible.
>>> I must be misunderstanding what you mean by "upgrade". It's the
>>> cross-compiler that's complaining, and it was built by the latest patches.
>> Agreed, we are both missing something simple.
>> Usually this is the error you get when you don't upgrade
>> Target.i3/Target.m3.
>> If you want to press on with the current approach and ignore my advise,
> I'm not ignoring it; it's more like I'm not quite ready to give up since
> I'm so close.  I think I could actually get these libs and cm3 to build
> on DragonFly if I used AMD64_FREEBSD as the target with the
> cm3cg-AMD_DRAGONFLY generator.  It was building before.  I just figured
> I'd then get stuck on the DragonFly side trying to compile cm3 with
> itself, theoretically I should get the same error there.
>> Ugh. I saw something about that in your diffs. Definitely we intend to
>> link statically.
>> I actually went to the trouble of removing use of gmp/mpfr/mpc in
>> current source.
>> They are used for actually very little and aren't worth it.

Hi Jay,
If you get those patches committed and publish an official snapshot
(compressed tarball) with those changes in it, then I'll update the
FreeBSD port to that snapshot.

If new patches are required, say to convert FreeBSD to use the C
backend, I'll feed those back too.

Then I'll try porting DragonFly again, your way.

More information about the M3devel mailing list