summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJohannes Bucher <johannes.bucher2@student.kit.edu>2019-11-29 17:50:29 +0100
committerJohannes Bucher <johannes.bucher2@student.kit.edu>2019-11-29 17:50:29 +0100
commita5e922545179f3c8c7161e5dc2dccf5ef720c157 (patch)
tree8d41bd713c5a9f5150acc1d572284e26b9f3d83c
parentda542e3d2f2ca8cf58e0a439d706226f330cfb98 (diff)
pass -mabi and -march flags to assembler/linker
This is relevant for RISC-V toolchains
-rw-r--r--src/driver/options.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/driver/options.c b/src/driver/options.c
index 5f18894..26ff4db 100644
--- a/src/driver/options.c
+++ b/src/driver/options.c
@@ -695,6 +695,13 @@ bool options_parse_early_target(options_state_t *s)
driver_add_flag(&asflags_obst, full_option);
driver_add_flag(&ldflags_obst, full_option);
target_size_override = atoi(option+1);
+ } else if (equals_arg("march", s) || equals_arg("mabi", s)) {
+ // relevant for RISC-V: pass -march and -mabi to assembler etc.
+ driver_add_flag(&cppflags_obst, full_option);
+ driver_add_flag(&asflags_obst, full_option);
+ driver_add_flag(&ldflags_obst, full_option);
+ // keep argument for parsing in backend options
+ return false;
} else {
bool truth_value;
const char *fopt;