aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-11-22 15:39:50 +0100
committerThomas Schwinge <thomas@codesourcery.com>2023-11-27 15:54:35 +0100
commitf723f72061a7c76fbd6d44adbfff8cb3ed7391d5 (patch)
tree12e826f905bdc3afedd2c04facd2041d22ed594d
parent297fe5c166f1d920da6d5ef9c7e02846b0148575 (diff)
downloadgcc-f723f72061a7c76fbd6d44adbfff8cb3ed7391d5.zip
gcc-f723f72061a7c76fbd6d44adbfff8cb3ed7391d5.tar.gz
gcc-f723f72061a7c76fbd6d44adbfff8cb3ed7391d5.tar.bz2
GCN: Remove 'last_arg' spec function
The LLVM 13.0.1 assembler ('llvm-mc') indeed still does complain in presence of multiple '-mcpu=[...]' options: as: for the --mcpu option: may only occur zero or one times! However, as of "GCN: Tag '-march=[...]', '-mtune=[...]' as 'Negative' of themselves [PR112669]", the GCC-side special handling is no longer necessary. gcc/ * config.gcc <amdgcn-*-amdhsa> (extra_gcc_objs): Don't set. * config/gcn/driver-gcn.cc: Remove. * config/gcn/gcn-hsa.h (ASM_SPEC, EXTRA_SPEC_FUNCTIONS): Remove 'last_arg' spec function. * config/gcn/t-gcn-hsa (driver-gcn.o): Remove.
-rw-r--r--gcc/config.gcc1
-rw-r--r--gcc/config/gcn/driver-gcn.cc32
-rw-r--r--gcc/config/gcn/gcn-hsa.h8
-rw-r--r--gcc/config/gcn/t-gcn-hsa4
4 files changed, 1 insertions, 44 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index e62849c..7484301 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1770,7 +1770,6 @@ amdgcn-*-amdhsa)
native_system_header_dir=/include
extra_modes=gcn/gcn-modes.def
extra_objs="${extra_objs} gcn-tree.o"
- extra_gcc_objs="driver-gcn.o"
case "$host" in
x86_64*-*-linux-gnu )
if test "$ac_cv_search_dlopen" != no; then
diff --git a/gcc/config/gcn/driver-gcn.cc b/gcc/config/gcn/driver-gcn.cc
deleted file mode 100644
index 837633a..0000000
--- a/gcc/config/gcn/driver-gcn.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Subroutines for the gcc driver.
- Copyright (C) 2018-2023 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-
-const char *
-last_arg_spec_function (int argc, const char **argv)
-{
- if (argc == 0)
- return NULL;
-
- return argv[argc-1];
-}
diff --git a/gcc/config/gcn/gcn-hsa.h b/gcc/config/gcn/gcn-hsa.h
index aa1294c..4d72299 100644
--- a/gcc/config/gcn/gcn-hsa.h
+++ b/gcc/config/gcn/gcn-hsa.h
@@ -88,7 +88,7 @@ extern unsigned int gcn_local_sym_hash (const char *name);
/* Use LLVM assembler and linker options. */
#define ASM_SPEC "-triple=amdgcn--amdhsa " \
- "%:last_arg(%{march=*:-mcpu=%*}) " \
+ "%{march=*:-mcpu=%*} " \
"%{!march=*|march=fiji:--amdhsa-code-object-version=3} " \
"%{" NO_XNACK XNACKOPT "}" \
"%{" NO_SRAM_ECC SRAMOPT "} " \
@@ -102,12 +102,6 @@ extern unsigned int gcn_local_sym_hash (const char *name);
#define ENDFILE_SPEC ""
#define STANDARD_STARTFILE_PREFIX_2 ""
-/* The LLVM assembler rejects multiple -mcpu options, so we must drop
- all but the last. */
-extern const char *last_arg_spec_function (int argc, const char **argv);
-#define EXTRA_SPEC_FUNCTIONS \
- { "last_arg", last_arg_spec_function },
-
#undef LOCAL_INCLUDE_DIR
/* FIXME: Review debug info settings.
diff --git a/gcc/config/gcn/t-gcn-hsa b/gcc/config/gcn/t-gcn-hsa
index 18db707..e2aec71 100644
--- a/gcc/config/gcn/t-gcn-hsa
+++ b/gcc/config/gcn/t-gcn-hsa
@@ -16,10 +16,6 @@
GTM_H += $(HASH_TABLE_H)
-driver-gcn.o: $(srcdir)/config/gcn/driver-gcn.cc
- $(COMPILE) $<
- $(POSTCOMPILE)
-
CFLAGS-mkoffload.o += $(DRIVER_DEFINES) \
-DGCC_INSTALL_NAME=\"$(GCC_INSTALL_NAME)\"
mkoffload.o: $(srcdir)/config/gcn/mkoffload.cc