luoyi@wslab$ pgCC -V
pgCC (aka pgcpp) 6.2-5 32-bit target on x86 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved.
luoyi@wslab$ pgCC -c -M source/common/func/common.cpp > M
luoyi@wslab$ pgCC -c -MM source/common/func/common.cpp > MM
luoyi@wslab$ diff M MM
luoyi@wslab$ head -5 M
common.o: source/common/func/common.cpp
common.o: /opt/pgi/linux86/6.2/include/CC/string
common.o: /opt/pgi/linux86/6.2/include/CC/stl/_prolog.h
common.o: /opt/pgi/linux86/6.2/include/CC/stl/_config.h
common.o: /opt/pgi/linux86/6.2/include/CC/stl_user_config.h
luoyi@wslab$
We can see that -MM generate the same resule as -M, and they all doesn’t ignore the system header files.
BTW: can I change the output file format to GCC-style, as like :
Thank you for the report. This looks like a bug in the C++ front end so I’ve filed a technical problem report (TPR#4038). We’ll have a compiler engineer look at the issue in more depth soon.
It was simple misconfiguration problem. It has been fixed internally and should be available in the next release (7.0) due out in a few weeks.
Unfortunantely, a few of the internal header files contain quoted include files so they get printed as well. I’ll ask that compiler engineers look at that to see if anything can be done.
As a side note, pgcc works as expected, it’s just pgcpp that has this issue.
pgCC 7.0-2 32-bit target on x86 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2007, STMicroelectronics, Inc. All Rights Reserved.
luoyi@skyking:~/qp/source/common/func$