diff options
author | James Greenhalgh <james.greenhalgh@arm.com> | 2014-01-24 17:14:35 +0000 |
---|---|---|
committer | James Greenhalgh <jgreenhalgh@gcc.gnu.org> | 2014-01-24 17:14:35 +0000 |
commit | 1c05df5916233ac81d368fbf42f272a8692564c7 (patch) | |
tree | 6669f106b2ab9fa2fb0589c7c2661c9dabc647a2 /gcc/common | |
parent | 5f36e00fd9eaeadc6fc3494a4787faf156f41a4e (diff) | |
download | gcc-1c05df5916233ac81d368fbf42f272a8692564c7.zip gcc-1c05df5916233ac81d368fbf42f272a8692564c7.tar.gz gcc-1c05df5916233ac81d368fbf42f272a8692564c7.tar.bz2 |
[AArch64] fix big.LITTLE spec rewriting
gcc/
* common/config/aarch64/aarch64-common.c
(aarch64_rewrite_mcpu): Handle multiple names.
* config/aarch64/aarch64.h
(BIG_LITTLE_SPEC): Do not discard mcpu switches.
From-SVN: r207053
Diffstat (limited to 'gcc/common')
-rw-r--r-- | gcc/common/config/aarch64/aarch64-common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c index 6107007..e44b40a 100644 --- a/gcc/common/config/aarch64/aarch64-common.c +++ b/gcc/common/config/aarch64/aarch64-common.c @@ -110,13 +110,15 @@ aarch64_rewrite_selected_cpu (const char *name) /* Called by the driver to rewrite a name passed to the -mcpu argument in preparation to be passed to the assembler. The - name will be in ARGV[0], ARGC should always be 1. */ + names passed from the commend line will be in ARGV, we want + to use the right-most argument, which should be in + ARGV[ARGC - 1]. ARGC should always be greater than 0. */ const char * aarch64_rewrite_mcpu (int argc, const char **argv) { - gcc_assert (argc == 1); - return aarch64_rewrite_selected_cpu (argv[0]); + gcc_assert (argc); + return aarch64_rewrite_selected_cpu (argv[argc - 1]); } #undef AARCH64_CPU_NAME_LENGTH |