aboutsummaryrefslogtreecommitdiff
path: root/gas/configure
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-08-31 04:31:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-08-31 04:31:20 -0700
commitb4a3a7b44c98a9f78a27bd34d0d98741a0446e23 (patch)
treebf4dfc7e3ecaf69d1636fc4699203a5ce4e7989d /gas/configure
parent0cb8eedc9173b873db7a8990fb780d9fdeb1f41e (diff)
downloadgdb-b4a3a7b44c98a9f78a27bd34d0d98741a0446e23.zip
gdb-b4a3a7b44c98a9f78a27bd34d0d98741a0446e23.tar.gz
gdb-b4a3a7b44c98a9f78a27bd34d0d98741a0446e23.tar.bz2
x86: Extend assembler to generate GNU property notes
Add -mx86-used-note=[yes|no] option to generate (or not) GNU property notes with GNU_PROPERTY_X86_FEATURE_2_USED and GNU_PROPERTY_X86_ISA_1_USED properties. If the assembly input contains no instructions, set the GNU_PROPERTY_X86_UINT32_VALID bit in GNU_PROPERTY_X86_FEATURE_2_USED property. Add a --enable-x86-used-note configure time option to set the default behavior. Set the default if the configure option is not used to "no". * NEWS: Mention -mx86-used-note=[no|yes]. * configure.ac: Add --enable-x86-used-note. Define DEFAULT_X86_USED_NOTE. * config.in: Regenerated. * configure: Likewise. * config/tc-i386.c (x86_isa_1_used): New. (x86_feature_2_used): Likewise. (x86_used_note): Likewise. (_i386_insn): Add has_regmmx, has_regxmm, has_regymm and has_regzmm. (build_modrm_byte): Set i.has_regmmx, i.has_regzmm. i.has_regymm and i.has_regxmm. (x86_cleanup): New function. (output_insn): Update x86_isa_1_used and x86_feature_2_used. (OPTION_X86_USED_NOTE): New. (md_longopts): Add -mx86-used-note=. (md_parse_option): Handle OPTION_X86_USED_NOTE. (md_show_usage): Display -mx86-used-note=. * config/tc-i386.h (x86_cleanup): New prototype. (md_cleanup): New. * doc/c-i386.texi: Document -mx86-used-note=.
Diffstat (limited to 'gas/configure')
-rwxr-xr-xgas/configure28
1 files changed, 26 insertions, 2 deletions
diff --git a/gas/configure b/gas/configure
index 7dc72c0..35effb4 100755
--- a/gas/configure
+++ b/gas/configure
@@ -808,6 +808,7 @@ enable_compressed_debug_sections
enable_x86_relax_relocations
enable_elf_stt_common
enable_generate_build_notes
+enable_x86_used_note
enable_werror
enable_build_warnings
with_cpu
@@ -1469,6 +1470,7 @@ Optional Features:
--enable-generate-build-notes
generate GNU Build notes if none are provided by the
input
+ --enable-x86-used-note generate GNU x86 used ISA and feature properties
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings
--disable-nls do not use Native Language Support
@@ -11335,7 +11337,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11338 "configure"
+#line 11340 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11441,7 +11443,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11444 "configure"
+#line 11446 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12111,6 +12113,19 @@ esac
fi
+# Decide if the x86 ELF assembler should default to generating GNU x86
+# used ISA and feature properties.
+ac_default_generate_x86_used_note=unset
+# Provide a configuration option to override the default.
+# Check whether --enable-x86-used-note was given.
+if test "${enable_x86_used_note+set}" = set; then :
+ enableval=$enable_x86_used_note; case "${enableval}" in
+ yes) ac_default_generate_x86_used_note=1 ;;
+ no) ac_default_generate_x86_used_note=0 ;;
+esac
+fi
+
+
using_cgen=no
@@ -13039,6 +13054,15 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+if test ${ac_default_generate_x86_used_note} = unset; then
+ ac_default_generate_x86_used_note=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_X86_USED_NOTE $ac_default_generate_x86_used_note
+_ACEOF
+
+
if test x$ac_default_compressed_debug_sections = xyes ; then
$as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h