pulp-platform / ri5cy_gnu_toolchain

22 stars 23 forks source link

Missing prototype for default_remapped_builtin() and default_omp_target_decl() #2

Closed klpeders closed 6 years ago

klpeders commented 8 years ago

Build fail because of missing prototype for default_remapped_builtin() and default_omp_target_decl():

g++ -c   -g [...]  -o riscv.o [...] ./build/src/newlib-gcc/gcc/config/riscv/riscv.c
./build/src/newlib-gcc/gcc/config/riscv/riscv.c:4447:470: error: ‘default_remapped_builtin’ was not declared in this scope
./build/src/newlib-gcc/gcc/config/riscv/riscv.c:4447:496: error: ‘default_omp_target_decl’ was not declared in this scope
Makefile:2076: recipe for target 'riscv.o' failed

Maybe add targhooks.h to patch:

diff --git a/gcc/gcc/targhooks.h b/gcc/gcc/targhooks.h
index 12a44ee..54f27f9 100644
--- a/gcc/gcc/targhooks.h
+++ b/gcc/gcc/targhooks.h
@@ -223,6 +223,9 @@ extern bool can_use_doloop_if_innermost (const widest_int &,
                                         const widest_int &,
                                         unsigned int, bool);

+extern int default_remapped_builtin(tree exp);
+extern tree default_omp_target_decl(int t_omp_code, int *Base, int *Index);
+
 extern rtx default_load_bounds_for_arg (rtx, rtx, rtx);
 extern void default_store_bounds_for_arg (rtx, rtx, rtx, rtx);
 extern rtx default_load_returned_bounds (rtx);
haugoug commented 7 years ago

I don't manage to reproduce this issue. Could you tell me how you compile the toolchain and using which gcc version ?