https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670
--- Comment #20 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Eric Gallager from comment #9) > (In reply to [email protected] from comment #2) > > > --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- > > > Or the header needs to include all variants with proper #ifdef-ery > > > > This is difficult for a header generated per multilib at build time. > > > > GNU diff can can merge two C/C++ header files with the proper ifdef-ery: see: > http://www.gnu.org/software/diffutils/manual/html_mono/diff.html#If-then-else > and also: > http://www.gnu.org/software/diffutils/manual/html_mono/diff. > html#Detailed%20If-then-else > > This could be done as part of the generation of the header at build time. ...for further context for this comment I left 11 years ago, this is how the MacPorts "muniversal" portgroup handles merging headers that differ between architectures; see code in muniversal-1.1.tcl for how that works there: https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/muniversal-1.1.tcl
