aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.in
diff options
context:
space:
mode:
authorYunQiang Su <yunqiang.su@cipunited.com>2022-08-02 10:57:18 +0000
committerYunQiang Su <yunqiang.su@cipunited.com>2022-10-09 06:39:04 +0000
commit66c48be23e0fa5ee7474b4b078e013f901c71eed (patch)
treed8e437b2fb99d5820c2f84a8bbc01e4a1848f1ea /gcc/config.in
parentd7346a3bf6554ddaef9853c1b0fb770c4a3cd9d2 (diff)
downloadgcc-66c48be23e0fa5ee7474b4b078e013f901c71eed.zip
gcc-66c48be23e0fa5ee7474b4b078e013f901c71eed.tar.gz
gcc-66c48be23e0fa5ee7474b4b078e013f901c71eed.tar.bz2
MIPS: improve -march=native arch detection
If we cannot get info from options and cpuinfo, we try to get from: 1. getauxval(AT_BASE_PLATFORM), introduced since Linux 5.7 2. _MIPS_ARCH from host compiler. mnan=2008 option is also used if __mips_nan2008__ is used. This can fix the wrong loader usage on r5/r6 platform with -march=native. gcc/ChangeLog: * config.gcc: set with_arch to default_mips_arch if no defined. * config/mips/driver-native.cc (host_detect_local_cpu): try getauxval(AT_BASE_PLATFORM) and _MIPS_ARCH, too. pass -mnan=2008 if __mips_nan2008__ is defined. * config.in: define HAVE_SYS_AUXV_H and HAVE_GETAUXVAL. * configure.ac: detect sys/auxv.h and getauxval. * configure: regenerated.
Diffstat (limited to 'gcc/config.in')
-rw-r--r--gcc/config.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/config.in b/gcc/config.in
index 6ac17be..cc217b9 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1939,6 +1939,12 @@
#endif
+/* Define to 1 if you have the <sys/auxv.h> header file. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_SYS_AUXV_H
+#endif
+
+
/* Define to 1 if you have the <sys/file.h> header file. */
#ifndef USED_FOR_TARGET
#undef HAVE_SYS_FILE_H
@@ -2672,3 +2678,7 @@
#undef vfork
#endif
+/* Define to 1 if you have the `getauxval' function. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_GETAUXVAL
+#endif