@@ -55,14 +55,39 @@ along with GCC; see the file COPYING3. If not see
#define TARGET_64BIT (__riscv_xlen == 64)
#endif /* IN_LIBGCC2 */
+#ifdef HAVE_AS_MNO_RELAX_OPTION
+#define ASM_MNO_RELAX_SPEC "%{mno-relax}"
+#else
+#define ASM_MNO_RELAX_SPEC ""
+#endif
+
#undef ASM_SPEC
#define ASM_SPEC "\
%(subtarget_asm_debugging_spec) \
%{" FPIE_OR_FPIC_SPEC ":-fpic} \
%{march=*} \
%{mabi=*} \
+%(asm_mno_relax_spec) \
%(subtarget_asm_spec)"
+/* This macro defines names of additional specifications to put in the specs
+ that can be used in various specifications like CC1_SPEC. Its definition
+ is an initializer with a subgrouping for each command option.
+
+ Each subgrouping contains a string constant, that defines the
+ specification name, and a string constant that used by the GCC driver
+ program.
+
+ Do not define this macro if it does not need to do anything. */
+
+#define EXTRA_SPECS \
+ { "asm_mno_relax_spec", ASM_MNO_RELAX_SPEC }, \
+ SUBTARGET_EXTRA_SPECS
+
+#ifndef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS
+#endif
+
#define TARGET_DEFAULT_CMODEL CM_MEDLOW
#define LOCAL_LABEL_PREFIX "."
@@ -4827,6 +4827,14 @@ pointers into PC-relative form.])
[Requesting --with-nan= requires assembler support for -mnan=])
fi
;;
+
+ riscv*-*-*)
+ gcc_GAS_CHECK_FEATURE([-mno-relax option], gcc_cv_as_riscv_mno_relax,,
+ [-mno-relax], [.text],,
+ [AC_DEFINE(HAVE_AS_MNO_RELAX_OPTION, 1,
+ [Define if your assembler supports -mno-relax option.])])
+ ;;
+
s390*-*-*)
gcc_GAS_CHECK_FEATURE([.gnu_attribute support],
gcc_cv_as_s390_gnu_attribute, [2,18,0],,