Hello, Sorry for slight delay. Very happy if i could prepare prototype of this solution.
My best guess is if we could hookify all target code everything callable either from frontends or midend, we could try to severly cut this estimate. I also went back to thread you memtioned, i underestimated time for making gcc driver multitarget and likewise for collect binary. What also puzzles me is work on multilib, i still understand multilib clearly enough. In my previous rant i focused mostly on compiler main exec and making it multitarget. We should if this project makes any or some sense think of how configure flags influence codegen of target sources. Im not 100% sure here. If running such project, id focus first on hookifying and possibly wrapping in functions all target genned and callable code. Then id try to make gcc driver multitarget, then same for collect then same for multilib and in the end for gcc main frontend-specific exec ie interface between midend and target and switching configure to gen all code for all targets selected. If still interested and if i should go to clarifying and researching making driver collect multilib multitarget, please let me know. Also if what i say doesnt make much sense, please also let me know. Best regards, Pawel kunio pon., 29.03.2021, 19:25 użytkownik Joseph Myers <jos...@codesourcery.com> napisał: > On Sun, 28 Mar 2021, pawel k. via Gcc wrote: > > > Hello, > > I would like to ask whether there would be interest in the project to be > > able to build a single binary of gcc where target would be selectable > with > > option flags ie more than one target could be included and aimed for by > > single binary. > > > > If so i could try myself at adding such feature to gcc. It looks > ambitious > > but doable. > > I've estimated this as taking about two person-years of work (that is, two > person-years of work for someone with extensive experience in GCC > development). > > https://gcc.gnu.org/legacy-ml/gcc-patches/2010-06/msg02675.html > > While there have, for example, been various conversions of target macros > to hooks, and other such similar changes, since then, I don't think > anything fundamentally changes the basic estimate. > > -- > Joseph S. Myers > jos...@codesourcery.com >