[libcpp] Reimplement mkdeps data structures

Nathan Sidwell nathan@acm.org
Tue May 7 18:13:00 GMT 2019


On 5/7/19 10:31 AM, Christophe Lyon wrote:

> After your commit, I'm seeing an ICE while building glibc headers:
> <built-in>: internal compiler error: Segmentation fault
> 0xc2eeaf crash_signal
>          /tmp/2191418_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/toplev.c:326
> 0x151ad0d munge
>          /tmp/2191418_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libcpp/mkdeps.c:176

> while trying to build glibc-headers/bits/stdio_lim.st
> 
> (seen on aarch64)

When compiling from stdin, the preprocessor registers an empty file 
dependency (as the first dependency), which previously silently output 
nothing.  That now causes a null pointer dereference.  We shouldn't be 
registering such blank names.

Fixed thusly.

I see glibc uses -MT file1\ file1 to register multiple targets, that's 
somewhat implementation & make specific, but not our problem ...

nathan

-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deps-3.diff
Type: text/x-patch
Size: 1394 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190507/84be08f3/attachment.bin>


More information about the Gcc-patches mailing list