<div dir="ltr">Ups! Not a GCC issue, but still relevant to all us...<div><br></div><div>The issue happens only if using ccache. I have the system ccache package installed, and ccache is used via symlinks.</div><div><br></div><div><font face="monospace">$ mpicc -show<br>gcc -I/usr/include/mpich-x86_64 -L/usr/lib64/mpich/lib -Wl,-rpath -Wl,/usr/lib64/mpich/lib -Wl,--enable-new-dtags -lmpi<br>$ which gcc<br>/usr/lib64/ccache/gcc<br></font></div><div><br></div><div>Rebuilding this way:</div><div><br></div><div><font face="monospace">$ make clean<br></font></div><div><font face="monospace">...</font></div><div><font face="monospace">$ MPICH_CC=/usr/bin/gcc make</font></div><div><font face="monospace">...</font></div><div><font face="monospace">$ head -n 3 arch-linux2-c-debug/obj/sys/objects/init.d <br></font></div><div><font face="monospace">arch-linux2-c-debug/obj/sys/objects/init.o: \<br> /home/devel/petsc/dev/src/sys/objects/init.c \<br> /home/devel/petsc/dev/include/petscsys.h \<br></font></div><div><br></div><div>so I'm back to normal. </div><div><br></div><div>Now I need to figure out if this is a ccache miss-configuration (maybe from legacy values in my $HOME config file) or something else.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 20 Jan 2020 at 18:42, <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Ah, you're right. I'm still suspicious about how this behavior appeared on your machine. Would be interesting to check a vanilla build or gcc-10 branch. I'm still learning toward it being unintentional.</div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 20, 2020 07:57, Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com" target="_blank">dalcinl@gmail.com</a>> wrote:<br type="attribution"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div><div dir="ltr">On Mon, 20 Jan 2020 at 17:07, Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From my man page (contradicting the behavior Lisandro observed):<br>
<br>
-MD -MD is equivalent to -M -MF file, except that -E is not implied. The driver<br>
determines file based on whether an -o option is given. If it is, the driver uses<br>
its argument but with a suffix of .d, otherwise it takes the name of the input<br>
file, removes any directory components and suffix, and applies a .d suffix.<br>
<br>
<br>
Lisandro, what does your man page say?<br>
</blockquote></div><div><br></div><div>It says exactly the same. But you are confusing the flag, -MF is about naming the output dep filename, i.e. ompi-optg/obj/sys/objects/init.d in your example, that is just fine, I do get that file with that name.</div><div>My issue is with the contents GCC writes within that dep file, specifically the TARGET, which can be specified with -MT, but it is cumbersome to do, unless you use "-MT $@", though no idea how to update configure for that.</div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>
</blockquote></div><br></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div>