[llvm-bugs] [Bug 42453] New: Fails to build with gcc because the new compiler's internal headers are used with the bootstrap compiler

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 29 22:18:02 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42453

            Bug ID: 42453
           Summary: Fails to build with gcc because the new compiler's
                    internal headers are used with the bootstrap compiler
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: bero at lindev.ch
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Trying to build current LLVM trunk with all subprojects enabled with gcc 9.1
results in

/usr/bin/g++  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -Itools/clang/lib/Tooling/Inclusions
-I/builddir/build/BUILD/llvm-9.0.0-20190629/clang/lib/Tooling/Inclusions
-I/builddir/build/BUILD/llvm-9.0.0-20190629/clang/include -Itools/clang/include
-I/usr/include/libxml2 -Iinclude
-I/builddir/build/BUILD/llvm-9.0.0-20190629/llvm/include
-I/builddir/build/BUILD/llvm-9.0.0-20190629/clang/lib/Headers -Os
-fomit-frame-pointer -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2
-fstack-protector-strong --param=ssp-buffer-size=4 -march=rv64imafdc
-mabi=lp64d -O3 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
-D_FILE_OFFSET_BITS=64 -fuse-ld=bfd -fPIC -fvisibility-inlines-hidden
-Werror=date-time -std=c++1y -Wall -Wextra -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic
-Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized
-Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment
-fdiagnostics-color -ffunction-sections -fdata-sections -fno-common
-Woverloaded-virtual -fno-strict-aliasing -Os -fomit-frame-pointer -pipe
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong
--param=ssp-buffer-size=4 -march=rv64imafdc -mabi=lp64d -O3
-D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64
-fuse-ld=bfd -MD -MT
tools/clang/lib/Tooling/Inclusions/CMakeFiles/obj.clangToolingInclusions.dir/IncludeStyle.cpp.o
-MF
tools/clang/lib/Tooling/Inclusions/CMakeFiles/obj.clangToolingInclusions.dir/IncludeStyle.cpp.o.d
-o
tools/clang/lib/Tooling/Inclusions/CMakeFiles/obj.clangToolingInclusions.dir/IncludeStyle.cpp.o
-c
/builddir/build/BUILD/llvm-9.0.0-20190629/clang/lib/Tooling/Inclusions/IncludeStyle.cpp
In file included from /usr/include/c++/9.1.0/bits/cxxabi_init_exception.h:38,
                 from /usr/include/c++/9.1.0/bits/exception_ptr.h:38,
                 from /usr/include/c++/9.1.0/exception:143,
                 from /usr/include/c++/9.1.0/new:40,
                 from
/builddir/build/BUILD/llvm-9.0.0-20190629/llvm/include/llvm/Support/Compiler.h:19,
                 from
/builddir/build/BUILD/llvm-9.0.0-20190629/llvm/include/llvm/ADT/Optional.h:19,
                 from
/builddir/build/BUILD/llvm-9.0.0-20190629/llvm/include/llvm/Support/YAMLTraits.h:12,
                 from
/builddir/build/BUILD/llvm-9.0.0-20190629/clang/include/clang/Tooling/Inclusions/IncludeStyle.h:12,
                 from
/builddir/build/BUILD/llvm-9.0.0-20190629/clang/lib/Tooling/Inclusions/IncludeStyle.cpp:9:
/builddir/build/BUILD/llvm-9.0.0-20190629/clang/lib/Headers/stddef.h:22:19:
error: missing binary operator before token "("
   22 | #if !__has_feature(modules)
      |                   ^

Looks like the problem is that the internal headers for the compiler being
built (clang/lib/headers/stddef.h inside the source tree) are being used
instead of gcc's stddef.h

-- 
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/20190630/7dfc0545/attachment-0001.html>


More information about the llvm-bugs mailing list