Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 4.9.0
-
None
Description
Hi,
I try to use Qt Creator for code writing and basic debugging for Xilinx MicroBlaze soft CPU. I prepare simple CMakeLists.txt wrapper and all work well. But, there is problem: semantic highlight and code compilation does not work. At all. Navigation and refactoring seems work correctly.
I try to run Qt Creator (4.9 branch build) we next env variables:
export QT_LOGGING_RULES=qtc.clang*=true
export LIBCLANG_TIMING=1
export QTC_CLANG_ENABLE_STACKTRACES=1
And got next result:
Arguments to libclang: -nostdinc -nostdinc++ -fmessage-length=0 -ffunction-sections -fdata-sections -mlittle-endian -mxl-soft-mul -mcpu=v11.0 -g -std=gnu++1z -fsyntax-only -m64 --target=microblaze-xilinx-elf -DQ_CREATOR_RUN -I /home/hatred/programming/work/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/../kcu116-cxx-usb31-uvc_bsp/microblaze_0/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1 -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1/microblaze-xilinx-elf -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1/backward -isystem /usr/lib/clang/8.0.0/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/lib/gcc/microblaze-xilinx-elf/7.3.1/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/lib/gcc/microblaze-xilinx-elf/7.3.1/include-fixed -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/sysroot/usr/include -I /tmp/QtCreator-fyIgYw/clang-uiheader-SHuMZu -fmessage-length=0 -fdiagnostics-show-note-include-stack -fretain-comments-from-system-headers -fmacro-backtrace-limit=0 -ferror-limit=1000 -x c++-header -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-documentation-unknown-command -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-unused-macros -Wno-newline-eof -Wno-exit-time-destructors -Wno-global-constructors -Wno-gnu-zero-variadic-macro-arguments -Wno-documentation -Wno-shadow -Wno-switch-enum -Wno-missing-prototypes -Wno-used-but-marked-unused -v /home/hatred/programming/work/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/src/platform.h clang version 8.0.0 (tags/RELEASE_800/final) Target: microblaze-xilinx-unknown-elf Thread model: posix InstalledDir: Precompiling preamble: 0.0001 (100.0%) 0.0000 (100.0%) 0.0001 (100.0%) 0.0001 (100.0%) Parsing /home/hatred/programming/work/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/src/platform.h: 0.0000 (100.0%) 0.0000 (100.0%) 0.0000 (100.0%) 0.0000 (100.0%) Parsing /home/hatred/programming/work/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/src/platform.h failed: CXError_Failure Reparsing /home/hatred/programming/work/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/src/platform.h failed: 3
I try to run same command using clang++ command and got:
clang++ -nostdinc -nostdinc++ -fmessage-length=0 -ffunction-sections -fdata-sections -mlittle-endian -mxl-soft-mul -mcpu=v11.0 -g -std=gnu++1z -fsyntax-only -m64 --target=microblaze-xilinx-elf -DQ_CREATOR_RUN -I /home/hatred/programming/work/Epiphan/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/../kcu116-cxx-usb31-uvc_bsp/microblaze_0/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1 -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1/microblaze-xilinx-elf -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1/backward -isystem /usr/lib/clang/8.0.0/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/lib/gcc/microblaze-xilinx-elf/7.3.1/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/lib/gcc/microblaze-xilinx-elf/7.3.1/include-fixed -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/sysroot/usr/include -I /tmp/QtCreator-fyIgYw/clang-uiheader-SHuMZu -fmessage-length=0 -fdiagnostics-show-note-include-stack -fretain-comments-from-system-headers -fmacro-backtrace-limit=0 -ferror-limit=1000 -x c++-header -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-documentation-unknown-command -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-unused-macros -Wno-newline-eof -Wno-exit-time-destructors -Wno-global-constructors -Wno-gnu-zero-variadic-macro-arguments -Wno-documentation -Wno-shadow -Wno-switch-enum -Wno-missing-prototypes -Wno-used-but-marked-unused -v /home/hatred/programming/work/Epiphan/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/src/platform.h clang-8: error: unknown argument: '-mxl-soft-mul' clang version 8.0.0 (tags/RELEASE_800/final) Target: microblaze-xilinx-unknown-elf Thread model: posix InstalledDir: /usr/bin
I remove options MicroBlaze-related:
clang++ -nostdinc -nostdinc++ -fmessage-length=0 -ffunction-sections -fdata-sections -mlittle-endian -g -std=gnu++1z -fsyntax-only -m64 --target=microblaze-xilinx-elf -DQ_CREATOR_RUN -I /home/hatred/programming/work/Epiphan/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/../kcu116-cxx-usb31-uvc_bsp/microblaze_0/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1 -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1/microblaze-xilinx-elf -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1/backward -isystem /usr/lib/clang/8.0.0/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/lib/gcc/microblaze-xilinx-elf/7.3.1/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/lib/gcc/microblaze-xilinx-elf/7.3.1/include-fixed -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/sysroot/usr/include -I /tmp/QtCreator-fyIgYw/clang-uiheader-SHuMZu -fmessage-length=0 -fdiagnostics-show-note-include-stack -fretain-comments-from-system-headers -fmacro-backtrace-limit=0 -ferror-limit=1000 -x c++-header -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-documentation-unknown-command -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-unused-macros -Wno-newline-eof -Wno-exit-time-destructors -Wno-global-constructors -Wno-gnu-zero-variadic-macro-arguments -Wno-documentation -Wno-shadow -Wno-switch-enum -Wno-missing-prototypes -Wno-used-but-marked-unused -v /home/hatred/programming/work/Epiphan/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/src/platform.h clang version 8.0.0 (tags/RELEASE_800/final) Target: microblaze-xilinx-unknown-elf Thread model: posix InstalledDir: /usr/bin "/usr/bin/clang-8" -cc1 -triple microblaze-xilinx-unknown-elf -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name platform.h -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -no-integrated-as -mconstructor-aliases -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -nostdsysteminc -nobuiltininc -resource-dir /usr/lib/clang/8.0.0 -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1 -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1/microblaze-xilinx-elf -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include/c++/7.3.1/backward -isystem /usr/lib/clang/8.0.0/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/lib/gcc/microblaze-xilinx-elf/7.3.1/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/lib/gcc/microblaze-xilinx-elf/7.3.1/include-fixed -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/include -isystem /home/hatred/bin/Xilinx/2018.3/microblaze/baremetal/microblaze-xilinx-elf/sysroot/usr/include -D Q_CREATOR_RUN -I /home/hatred/programming/work/Epiphan/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/../kcu116-cxx-usb31-uvc_bsp/microblaze_0/include -I /tmp/QtCreator-fyIgYw/clang-uiheader-SHuMZu -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-documentation-unknown-command -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-unused-macros -Wno-newline-eof -Wno-exit-time-destructors -Wno-global-constructors -Wno-gnu-zero-variadic-macro-arguments -Wno-documentation -Wno-shadow -Wno-switch-enum -Wno-missing-prototypes -Wno-used-but-marked-unused -std=gnu++1z -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /home/hatred -ferror-limit 1000 -fmacro-backtrace-limit 0 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fdiagnostics-show-note-include-stack -fcolor-diagnostics -fretain-comments-from-system-headers -x c++-header /home/hatred/programming/work/Epiphan/Task/MicroBlaze/workspaces/kcu116-test/kcu116-cxx-usb31-uvc/src/platform.h error: unknown target triple 'microblaze-xilinx-unknown-elf', please use -triple or -arch
Seems, that it is impossible to use any gcc target with Clang Backed.
Note, Clion work in such case more correctly.
Sample CMake file is attached. Platform definition can be used any.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-22924 CLangCodeModel failed to parse project file
- Closed