[llvm-bugs] [Bug 48878] New: -MP argument not working properly
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 25 19:41:50 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48878
Bug ID: 48878
Summary: -MP argument not working properly
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: joao at overdrivepizza.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
The following bug was noticed when compiling glibc (grte branch) with clang. It
seems that -MP does not output the path to cstdlib when the input is not a
file.
Glibc's configure (line 5488) file tries to run the following line as an
attempt to retrieve the path to cstdlib ($1 expands to cstdlib):
echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \
| sed -n "\,$1:,{s/:\$//;p}"
But this doesn't return a path to cstdlib. This was verified to work properly
with GCC.
If the configure is changed to something like:
echo "#include <$1>" &> tmp.cpp
$CXX -M -MP -x c++ tmp.cpp 2>/dev/null | sed -n "\,$1:,{s/:\$//;p}"
The path to cstdlib is properly found.
This behavior was observed on fedora 33.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210126/3918235c/attachment.html>
More information about the llvm-bugs
mailing list