java/builtins.c needs to call can_compare_and_swap, which happens to be provided via optabs.h. As a result, we see the following in java/builtins.c: /* FIXME: All these headers are necessary for sync_compare_and_swap. Front ends should never have to look at that. */ #include "rtl.h" #include "insn-codes.h" #include "expr.h" #include "optabs.h" by providing a target hook and a default which simply calls can_compare_and_swap_p(), we can remove all that include crap from the front end. None of those 4 include files are now directly included by any front end files. Bootstraps on x86_64-unknown-linux-gnu, and no new testsuite failures. OK for trunk? Andrew