+ if candidate_march != part_number_config['march']
+ warning('Configuration march version is ' +
+ '@0@, but the compiler supports only @1@.'
+ .format(part_number_config['march'], candidate_march))
+ endif
+ candidate_march = '-march=' + candidate_march
+
+ march_features = []
+ if part_number_config.has_key('march_features')
+ march_features += part_number_config['march_features']
+ endif
+ if soc_config.has_key('extra_march_features')
+ march_features += soc_config['extra_march_features']
+ endif
+ foreach feature: march_features
+ if cc.has_argument('+'.join([candidate_march, feature]))
+ candidate_march = '+'.join([candidate_march, feature])
+ else
+ warning('The compiler does not support feature @0@'
+ .format(feature))
+ endif
+ endforeach
+ machine_args += candidate_march
+ endif
+
+ # apply supported compiler options
+ if part_number_config.has_key('compiler_options')
+ foreach flag: part_number_config['compiler_options']
+ if cc.has_argument(flag)
+ machine_args += flag
+ else
+ warning('Configuration compiler option ' +
+ '@0@ isn\'t supported.'.format(flag))
+ endif
+ endforeach
+ endif