aboutsummaryrefslogtreecommitdiff
path: root/bfd/configure.com
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-07-31 19:25:32 +0930
committerAlan Modra <amodra@gmail.com>2022-08-01 09:30:33 +0930
commit1a5178fe284547ef2abd8ae66588c9999d61c524 (patch)
treea3e10f649adb19dfc046d345a73ecf2f1befdc3f /bfd/configure.com
parentdf0e73ff9307251d179aa4158347deccc9576b85 (diff)
downloadgdb-1a5178fe284547ef2abd8ae66588c9999d61c524.zip
gdb-1a5178fe284547ef2abd8ae66588c9999d61c524.tar.gz
gdb-1a5178fe284547ef2abd8ae66588c9999d61c524.tar.bz2
PR29348, BFD_VMA_FMT wrong
There is a problem with my commit 0e3c1eebb2, which replaced bfd_uint64_t with uint64_t: Some hosts typedef int64_t to long long even when long is the same size as long long. That confuses the code choosing one of "l", "ll", or "I64" for BFD_VMA_FMT, and results in warnings. Write a direct configure test for the printf int64_t style instead. This removes the last use of BFD_HOST_64BIT_LONG, so delete that. Note that the changes to configure.com are pure guesswork. PR 29348 * bfd-in.h (BFD_HOST_64BIT_LONG): Don't define. (BFD_VMA_FMT): Define using BFD_INT64_FMT when 64-bit. (bfd_vma, bfd_signed_vma): Move comments to 64-bit typedefs. * configure.ac (BFD_HOST_64BIT_LONG): Delete. (BFD_INT64_FMT): New config test. * configure.com: Update similarly. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate.
Diffstat (limited to 'bfd/configure.com')
-rw-r--r--bfd/configure.com30
1 files changed, 27 insertions, 3 deletions
diff --git a/bfd/configure.com b/bfd/configure.com
index cc8499a..cfff494 100644
--- a/bfd/configure.com
+++ b/bfd/configure.com
@@ -60,11 +60,11 @@ $DECK
ERASE(match_pos);
COPY_TEXT('64');
ENDIF;
- match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
+ match_pos := SEARCH_QUIETLY('@BFD_INT64_FMT@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
- COPY_TEXT('0');
+ COPY_TEXT('"l"');
ENDIF;
match_pos := SEARCH_QUIETLY('@bfd_file_ptr@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
@@ -114,7 +114,31 @@ $DECK
ERASE(match_pos);
COPY_TEXT('32');
ENDIF;
- match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
+ match_pos := SEARCH_QUIETLY('@bfd_default_target_size@', FORWARD, EXACT, rang);
+ IF match_pos <> 0 THEN;
+ POSITION(BEGINNING_OF(match_pos));
+ ERASE(match_pos);
+ COPY_TEXT('32');
+ ENDIF;
+ match_pos := SEARCH_QUIETLY('@BFD_INT64_FMT@', FORWARD, EXACT, rang);
+ IF match_pos <> 0 THEN;
+ POSITION(BEGINNING_OF(match_pos));
+ ERASE(match_pos);
+ COPY_TEXT('"ll"');
+ ENDIF;
+ match_pos := SEARCH_QUIETLY('@bfd_file_ptr@', FORWARD, EXACT, rang);
+ IF match_pos <> 0 THEN;
+ POSITION(BEGINNING_OF(match_pos));
+ ERASE(match_pos);
+ COPY_TEXT('bfd_signed_vma');
+ ENDIF;
+ match_pos := SEARCH_QUIETLY('@bfd_ufile_ptr@', FORWARD, EXACT, rang);
+ IF match_pos <> 0 THEN;
+ POSITION(BEGINNING_OF(match_pos));
+ ERASE(match_pos);
+ COPY_TEXT('bfd_vma');
+ ENDIF;
+ match_pos := SEARCH_QUIETLY('@supports_plugins@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);