summaryrefslogtreecommitdiff
path: root/gas/configure
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2018-04-26 15:12:42 +0100
committerNick Clifton <nickc@redhat.com>2018-04-26 15:12:42 +0100
commit0df8ad28f0f727fab3a696d6c98b9a8a77ee1024 (patch)
tree1c4194b04e789a81a0a82af590a12105209fd05b /gas/configure
parentaa684341294a9125c528041f81d17c488bed5552 (diff)
downloadbinutils-gdb-0df8ad28f0f727fab3a696d6c98b9a8a77ee1024.tar.gz
Extend the assembler so that it can automatically generate GNU Build attribute notes if none are present in the input files.
gas * as.c (flag_generate_build_notes): New variable. (show_usage): Add entry for --generate-missing-build-notes. (parse_args): Parse --generate-missing-build-notes. * as.h: Export flag_generate_build_notes. * symbols.c (save_symbol_name): Ensure that the name parameter is not NULL. * write.c (create_obj_attrs_section): Reformat. (create_note_reloc): New function - creates a relocation for a field in a GNU Build attribute note. (maybe_generate_build_notes): New function - created GNU Build attribute notes if none are present in the output file. (write_object_file): Call maybe_generate_build_notes. * configure.ac (--enable-generate-build-notes): New option. * NEWS: Announce the new feature. * doc/as.textinfo: Document the new option. * config.in: Regenerate. * configure: Regenerate. binutils* readelf.c (is_32bit_abs_reloc): Support R_PARISC_DIR32 as a 32-bit absolute reloc for the HPPA target. * testsuite/binutils-all/note-5.d: New test. * testsuite/binutils-all/note-5.s: Source file for new test. * testsuite/binutils-all/objcopy.exp: Run new test.
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 a45e531fec3..ea6b3b16a86 100755
--- a/gas/configure
+++ b/gas/configure
@@ -771,6 +771,7 @@ enable_checking
enable_compressed_debug_sections
enable_x86_relax_relocations
enable_elf_stt_common
+enable_generate_build_notes
enable_werror
enable_build_warnings
with_cpu
@@ -1426,6 +1427,9 @@ Optional Features:
generate x86 relax relocations by default
--enable-elf-stt-common generate ELF common symbols with STT_COMMON type by
default
+ --enable-generate-build-notes
+ generate GNU Build notes if none are provided by the
+ input
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings
--disable-nls do not use Native Language Support
@@ -10987,7 +10991,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10990 "configure"
+#line 10994 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11093,7 +11097,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11096 "configure"
+#line 11100 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11747,6 +11751,20 @@ if test "${enable_elf_stt_common+set}" = set; then :
esac
fi
+
+# Decide if the ELF assembler should default to generating
+# GNU Build notes if none are provided by the input.
+ac_default_generate_build_notes=0
+# Provide a configuration option to override the default.
+# Check whether --enable-generate_build_notes was given.
+if test "${enable_generate_build_notes+set}" = set; then :
+ enableval=$enable_generate_build_notes; case "${enableval}" in
+ yes) ac_default_generate_build_notes=1 ;;
+ no) ac_default_generate_build_notes=0 ;;
+esac
+fi
+
+
using_cgen=no
@@ -12670,6 +12688,12 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_GENERATE_BUILD_NOTES $ac_default_generate_build_notes
+_ACEOF
+
+
if test x$ac_default_compressed_debug_sections = xyes ; then
$as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h