Open Lucretia opened 6 years ago
gcc 6.4.0
Ahh my tree.h doesn't have it.
Please install dependence at first https://github.com/xiangzhai/dragonegg/wiki/Dependence take my LinuxBox Fedora 25 for an instance:
$ grep debug_tree -r /usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/
/usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/print-tree.h:extern void debug_tree (tree);
/usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/tree-into-ssa.h:extern void debug_tree_ssa (void);
/usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/tree-into-ssa.h:extern void debug_tree_ssa_stats (void);
/usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/tree-pretty-print.h:extern void debug_tree_chain (tree);
I have the corect files in the right place, but no matter what I do it cannot find them. It keeps trying to the find the system compiler's versions.
@Lucretia
#!/bin/bash
echo "Usage: for example ./debug-build /opt/gcc-git/bin/gcc /opt/llvm-svn/bin/llvm-config"
make clean
CC=$1
if [[ -z "$CC" ]]; then
CC=gcc
fi
$CC --version
LC=$2
if [[ -z "$LC" ]]; then
LC=llvm-config
fi
$LC --version
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$($LC --libdir)
LANG=en_US.UTF-8 GCC=$CC LLVM_CONFIG=$LC ENABLE_LLVM_PLUGINS=1 DRAGONBALL_DEBUG=1 make -j4 &> /tmp/build.log
Also tested with GNU cross-compiler:
$ ./debug-build /opt/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc /opt/llvm-svn/bin/llvm-config