Hi Iain,

> Excerpts from Richard Biener's message of September 1, 2022 8:28 am:
>> On Wed, Aug 31, 2022 at 9:21 PM Iain Buclaw <ibuc...@gdcproject.org> wrote:
>>>
>>> Excerpts from Joseph Myers's message of August 31, 2022 7:16 pm:
>>> > On Wed, 31 Aug 2022, Iain Buclaw via Gcc-patches wrote:
>>> >
>>> >> Excerpts from Joseph Myers's message of August 30, 2022 11:53 pm:
>>> >> > On Fri, 26 Aug 2022, Richard Biener via Gcc-patches wrote:
>>> >> >
>>> >> >> I was hoping Joseph would chime in here - I recollect debugging
>>> >> >> this kind
>>> >> >> of thing and a thread about this a while back but unfortunately I do 
>>> >> >> not
>>> >> >> remember the details here (IIRC some things get included where they
>>> >> >> better should not be).
>>> >> >
>>> >> > See 
>>> >> > <https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582563.html>.
>>> >> > Is there some reason it's problematic to avoid having defaults.h or
>>> >> > ${cpu_type}/${cpu_type}.h included in tm_d.h, and instead have
>>> >> > tm_d.h only
>>> >> > include D-specific headers?
>>> >> >
>>> >>
>>> >> In targets such as arm-elf, we still need to pull in definitions from
>>> >> ${cpu_type}/${cpu_type}-d.cc into default-d.cc.
>>> >>
>>> >> All I can think that might suffice is having D-specific prototype
>>> >> headers in all targets as ${cpu_type}/${cpu_type}-d.h.
>>> >
>>> > As long as those prototypes don't involve any types that depend on an
>>> > inclusion of tm.h, that should be fine.
>>> >
>>>
>>> Updated patch that does what I described.
>> 
>> Ah yes - I think, even if a bit verbose, this is exactly how it was supposed
>> to be?
>> 
>> OK from my side.
>> 
>
> To access the TARGET macros from arm-d.cc, arm-protos.h had to be
> included (after tm_p.h was removed).
>
> All ~200 configurations in contrib/config-list.mk now build again with
> the D front-end enabled.

unfortunately, this patch broke all Solaris configs
(i386-pc-solaris2.11, sparc-sun-solaris2.11, sparcv9-sun-solaris2.11).
libphobos configure in stage2 fails with

can compile D sources
configure:5402: /var/gcc/regression/master/11.4-gcc/build/./gcc/gdc 
-B/var/gcc/regression/master/11.4-gcc/build/./gcc/ 
-B/vol/gcc/i386-pc-solaris2.11/bin/ -B/vol/gcc/i386-pc-solaris2.11/lib/ 
-isystem /vol/gcc/i386-pc-solaris2.11/include -isystem 
/vol/gcc/i386-pc-solaris2.11/sys-include   -fno-checking -c -fno-druntime 
-nostdinc -I /vol/gcc/src/hg/master/local/libphobos/libdruntime  -g -O2   
conftest.d >&5
core.exception.ArrayIndexError@/vol/gcc/src/hg/master/local/gcc/d/dmd/root/stringtable.d(291):
 index [3530971477] is out of bounds for array of length 0
gcc.deh(505): uncaught exception

I don't yet see why, though.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to