From 1bb2b31af2430f0759aa1f6f3bb6157bbe64715f Mon Sep 17 00:00:00 2001 From: SimplyTheOther Date: Thu, 9 Jul 2020 22:12:37 +0800 Subject: Added PRU target hook (or provisional one at least) --- gcc/config/pru/pru.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gcc') diff --git a/gcc/config/pru/pru.h b/gcc/config/pru/pru.h index 7f217fe..164cafb 100644 --- a/gcc/config/pru/pru.h +++ b/gcc/config/pru/pru.h @@ -37,6 +37,21 @@ } \ while (0) +#define TARGET_RUST_CPU_INFO() \ + do { \ + rust_add_target_info("target_arch", "pru"); \ + if (TARGET_MINRT) \ + rust_add_target_info("target_feature", "minrt"); \ + if (TARGET_OPT_LOOP) \ + rust_add_target_info("target_feature", "loop"); \ + if (pru_current_abi == PRU_ABI_GNU) \ + rust_add_target_info("target_feature", "abi-gnu"); \ + else if (pru_current_abi == PRU_ABI_TI) \ + rust_add_target_info("target_feature", "abi-ti"); \ + /*TODO: find way of getting no-relax and mcu info?*/ \ + /*TODO: add additional options for the changed abi things (e.g. pointer size, return value)?*/ \ + } while (0) + /* TI ABI implementation is not feature-complete enough (e.g. function pointers are not supported), so we cannot list it as a multilib variant. To prevent misuse from users, do not link any of the standard libraries. */ -- cgit v1.1