From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 5C11B382CF26 for ; Fri, 27 May 2022 07:32:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C11B382CF26 Received: by mail-pl1-x62c.google.com with SMTP id w3so3430872plp.13 for ; Fri, 27 May 2022 00:32:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KgZKAx1Wgp4xrLhyXuYuebO5sCqHM5WUDk5FevThA1I=; b=ko1msXB1vsOyC+5VBILKCN3Lc4ao0AYk0S8RvEPXW4HeTtuhLJIVuPI9dkctq6VwEz eaeobgGpApjI3xkKmCH1RNHlpYplOaT5BZr1CbEhqc7mdnR19dnIOuBzTp2ec/R+QsAN lXmD/Q0eb0GZ7RJjNQ3/C7p4TBGfBzfZrwOfQFrQSDXuIFI8B8udL92O9HPY/Oz/dF3v XNoShC+rxbqWrQg987CWJiJ4XTduQGlHcX2Pcq0T8Z/Dr4uxVgLhbV3nxVYGKdKWixWl CENprNjxcJ+I0XQAXoKYPEODeVdRvVTzhyICOk1HQ64ej7nDsPcvO3lRRsVlmsHChnIo YYTQ== X-Gm-Message-State: AOAM530kalGTfD37dpjDCzMScUopcVyd2Kt7PrESOG4t3QGwEob2l6m0 OssUNk9miVOQtl9hpTdSYE4gn7QecEQ= X-Google-Smtp-Source: ABdhPJwvIoQR+X/BvlOkiZCInYnqm2+iOr37XM8F7/zM3GbjCkM6u/MduHHeP5vT+WifNBKJ32orfg== X-Received: by 2002:a17:903:2291:b0:163:9ce2:1c90 with SMTP id b17-20020a170903229100b001639ce21c90mr818040plh.100.1653636728741; Fri, 27 May 2022 00:32:08 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id v129-20020a626187000000b0050dc762814asm2792270pfb.36.2022.05.27.00.32.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 00:32:08 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 4A32A1140757; Fri, 27 May 2022 17:02:05 +0930 (ACST) Date: Fri, 27 May 2022 17:02:05 +0930 From: Alan Modra To: binutils@sourceware.org Subject: Remove much of BFD_HOST configury Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3036.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_LINEPADDING, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2022 07:32:14 -0000 This patch removes the definition of bfd_uint64_t and bfd_int64_t as well as most BFD_HOST_* which are now unused. diff --git a/bfd/Makefile.in b/bfd/Makefile.in index b5f0c0a5c89..9999a07ea9b 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -332,10 +332,6 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BFD_HOSTPTR_T = @BFD_HOSTPTR_T@ BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@ -BFD_HOST_64BIT_LONG_LONG = @BFD_HOST_64BIT_LONG_LONG@ -BFD_HOST_64_BIT = @BFD_HOST_64_BIT@ -BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@ -BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 09c5728e944..8c4c838f3f8 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -70,13 +70,6 @@ extern "C" { #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ -#define BFD_HOST_64BIT_LONG_LONG @BFD_HOST_64BIT_LONG_LONG@ -#if @BFD_HOST_64_BIT_DEFINED@ -#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ -#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ -typedef BFD_HOST_64_BIT bfd_int64_t; -typedef BFD_HOST_U_64_BIT bfd_uint64_t; -#endif #include @@ -85,8 +78,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T @BFD_HOSTPTR_T@ -typedef BFD_HOSTPTR_T bfd_hostptr_t; +typedef @BFD_HOSTPTR_T@ bfd_hostptr_t; /* Forward declaration. */ typedef struct bfd bfd; @@ -112,10 +104,6 @@ typedef struct bfd bfd; #ifdef BFD64 -#ifndef BFD_HOST_64_BIT - #error No 64 bit integer type available -#endif /* ! defined (BFD_HOST_64_BIT) */ - typedef uint64_t bfd_vma; typedef int64_t bfd_signed_vma; typedef uint64_t bfd_size_type; @@ -160,19 +148,10 @@ typedef unsigned long bfd_size_type; #define HALF_BFD_SIZE_TYPE \ (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2)) -#ifndef BFD_HOST_64_BIT -/* Fall back on a 32 bit type. The idea is to make these types always - available for function return types, but in the case that - BFD_HOST_64_BIT is undefined such a function should abort or - otherwise signal an error. */ -typedef bfd_signed_vma bfd_int64_t; -typedef bfd_vma bfd_uint64_t; -#endif - /* An offset into a file. BFD always uses the largest possible offset based on the build time availability of fseek, fseeko, or fseeko64. */ typedef @bfd_file_ptr@ file_ptr; -typedef unsigned @bfd_file_ptr@ ufile_ptr; +typedef @bfd_ufile_ptr@ ufile_ptr; extern void bfd_sprintf_vma (bfd *, char *, bfd_vma); extern void bfd_fprintf_vma (bfd *, void *, bfd_vma); diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index d50885e76cf..8140b50f002 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -77,13 +77,6 @@ extern "C" { #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ -#define BFD_HOST_64BIT_LONG_LONG @BFD_HOST_64BIT_LONG_LONG@ -#if @BFD_HOST_64_BIT_DEFINED@ -#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ -#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ -typedef BFD_HOST_64_BIT bfd_int64_t; -typedef BFD_HOST_U_64_BIT bfd_uint64_t; -#endif #include @@ -92,8 +85,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T @BFD_HOSTPTR_T@ -typedef BFD_HOSTPTR_T bfd_hostptr_t; +typedef @BFD_HOSTPTR_T@ bfd_hostptr_t; /* Forward declaration. */ typedef struct bfd bfd; @@ -119,10 +111,6 @@ typedef struct bfd bfd; #ifdef BFD64 -#ifndef BFD_HOST_64_BIT - #error No 64 bit integer type available -#endif /* ! defined (BFD_HOST_64_BIT) */ - typedef uint64_t bfd_vma; typedef int64_t bfd_signed_vma; typedef uint64_t bfd_size_type; @@ -167,19 +155,10 @@ typedef unsigned long bfd_size_type; #define HALF_BFD_SIZE_TYPE \ (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2)) -#ifndef BFD_HOST_64_BIT -/* Fall back on a 32 bit type. The idea is to make these types always - available for function return types, but in the case that - BFD_HOST_64_BIT is undefined such a function should abort or - otherwise signal an error. */ -typedef bfd_signed_vma bfd_int64_t; -typedef bfd_vma bfd_uint64_t; -#endif - /* An offset into a file. BFD always uses the largest possible offset based on the build time availability of fseek, fseeko, or fseeko64. */ typedef @bfd_file_ptr@ file_ptr; -typedef unsigned @bfd_file_ptr@ ufile_ptr; +typedef @bfd_ufile_ptr@ ufile_ptr; extern void bfd_sprintf_vma (bfd *, char *, bfd_vma); extern void bfd_fprintf_vma (bfd *, void *, bfd_vma); diff --git a/bfd/configure b/bfd/configure index ee2bbe69c87..a0071d97b68 100755 --- a/bfd/configure +++ b/bfd/configure @@ -657,10 +657,6 @@ zlibdir EXEEXT_FOR_BUILD CC_FOR_BUILD BFD_HOSTPTR_T -BFD_HOST_U_64_BIT -BFD_HOST_64_BIT -BFD_HOST_64_BIT_DEFINED -BFD_HOST_64BIT_LONG_LONG BFD_HOST_64BIT_LONG HDEFINES MSGMERGE @@ -11092,7 +11088,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11095 "configure" +#line 11091 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11198,7 +11194,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11201 "configure" +#line 11197 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12709,13 +12705,6 @@ $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } -BFD_HOST_64BIT_LONG=0 -BFD_HOST_64BIT_LONG_LONG=0 -BFD_HOST_64_BIT_DEFINED=0 -BFD_HOST_64_BIT= -BFD_HOST_U_64_BIT= -BFD_HOSTPTR_T="unsigned long" - # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -12853,29 +12842,16 @@ if test "x${ac_cv_sizeof_void_p}" = "x8"; then host64=true fi +BFD_HOST_64BIT_LONG=0 +BFD_HOSTPTR_T="unsigned long" if test "x${ac_cv_sizeof_long}" = "x8"; then BFD_HOST_64BIT_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" elif test "x${ac_cv_sizeof_long_long}" = "x8"; then - BFD_HOST_64BIT_LONG_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" if test "x${ac_cv_sizeof_void_p}" = "x8"; then BFD_HOSTPTR_T="unsigned long long" fi fi -if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then - BFD_HOST_64_BIT_DEFINED=1 - BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" - BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" -fi - - - - - @@ -13710,12 +13686,6 @@ case ${host64}-${target64}-${want64} in wordsize=64 bfd64_libs='$(BFD64_LIBS)' all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' - if test $BFD_HOST_64_BIT_DEFINED = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have requested a 64 bit BFD configuration, but" >&5 -$as_echo "$as_me: WARNING: You have requested a 64 bit BFD configuration, but" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your compiler may not have a 64 bit integral type" >&5 -$as_echo "$as_me: WARNING: your compiler may not have a 64 bit integral type" >&2;} - fi if test -n "$GCC" ; then bad_64bit_gcc=no; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc version with buggy 64-bit support" >&5 @@ -14870,8 +14840,8 @@ bfd_file_ptr="long" bfd_ufile_ptr="unsigned long" if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ -o x"${ac_cv_sizeof_off_t}" = x8; then - bfd_file_ptr=BFD_HOST_64_BIT - bfd_ufile_ptr=BFD_HOST_U_64_BIT + bfd_file_ptr=int64_t + bfd_ufile_ptr=uint64_t fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_file_ptr" >&5 $as_echo "$bfd_file_ptr" >&6; } diff --git a/bfd/configure.ac b/bfd/configure.ac index 8004c3ef4bf..52e9f8f8dcc 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac @@ -209,13 +209,6 @@ AM_PO_SUBDIRS AC_SUBST(HDEFINES) AC_PROG_INSTALL -BFD_HOST_64BIT_LONG=0 -BFD_HOST_64BIT_LONG_LONG=0 -BFD_HOST_64_BIT_DEFINED=0 -BFD_HOST_64_BIT= -BFD_HOST_U_64_BIT= -BFD_HOSTPTR_T="unsigned long" - AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(long) @@ -225,30 +218,17 @@ if test "x${ac_cv_sizeof_void_p}" = "x8"; then host64=true fi +BFD_HOST_64BIT_LONG=0 +BFD_HOSTPTR_T="unsigned long" if test "x${ac_cv_sizeof_long}" = "x8"; then BFD_HOST_64BIT_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" elif test "x${ac_cv_sizeof_long_long}" = "x8"; then - BFD_HOST_64BIT_LONG_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" if test "x${ac_cv_sizeof_void_p}" = "x8"; then BFD_HOSTPTR_T="unsigned long long" fi fi -if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then - BFD_HOST_64_BIT_DEFINED=1 - BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" - BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" -fi - AC_SUBST(BFD_HOST_64BIT_LONG) -AC_SUBST(BFD_HOST_64BIT_LONG_LONG) -AC_SUBST(BFD_HOST_64_BIT_DEFINED) -AC_SUBST(BFD_HOST_64_BIT) -AC_SUBST(BFD_HOST_U_64_BIT) AC_SUBST(BFD_HOSTPTR_T) BFD_CC_FOR_BUILD @@ -782,10 +762,6 @@ case ${host64}-${target64}-${want64} in wordsize=64 bfd64_libs='$(BFD64_LIBS)' all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' - if test $BFD_HOST_64_BIT_DEFINED = 0; then - AC_MSG_WARN([You have requested a 64 bit BFD configuration, but]) - AC_MSG_WARN([your compiler may not have a 64 bit integral type]) - fi if test -n "$GCC" ; then bad_64bit_gcc=no; AC_MSG_CHECKING([for gcc version with buggy 64-bit support]) @@ -1087,8 +1063,8 @@ bfd_file_ptr="long" bfd_ufile_ptr="unsigned long" if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ -o x"${ac_cv_sizeof_off_t}" = x8; then - bfd_file_ptr=BFD_HOST_64_BIT - bfd_ufile_ptr=BFD_HOST_U_64_BIT + bfd_file_ptr=int64_t + bfd_ufile_ptr=uint64_t fi AC_MSG_RESULT($bfd_file_ptr) AC_SUBST(bfd_file_ptr) diff --git a/bfd/configure.com b/bfd/configure.com index 131f538a58a..2418bddd8af 100644 --- a/bfd/configure.com +++ b/bfd/configure.com @@ -66,36 +66,6 @@ $DECK ERASE(match_pos); COPY_TEXT('0'); ENDIF; - match_pos := SEARCH_QUIETLY('@BFD_HOST_LONG_LONG@', FORWARD, EXACT, rang); - IF match_pos <> 0 THEN; - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT('1'); - ENDIF; - match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG_LONG@', FORWARD, EXACT, rang); - IF match_pos <> 0 THEN; - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT('1'); - ENDIF; - match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang); - IF match_pos <> 0 THEN; - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT('1'); - ENDIF; - match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang); - IF match_pos <> 0 THEN; - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT('__int64'); - ENDIF; - match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang); - IF match_pos <> 0 THEN; - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT('unsigned __int64'); - ENDIF; match_pos := SEARCH_QUIETLY('@BFD_HOSTPTR_T@', FORWARD, EXACT, rang); IF match_pos <> 0 THEN; POSITION(BEGINNING_OF(match_pos)); @@ -108,11 +78,11 @@ $DECK ERASE(match_pos); COPY_TEXT('bfd_signed_vma'); ENDIF; - match_pos := SEARCH_QUIETLY('unsigned @bfd_file_ptr@ ufile_ptr', FORWARD, EXACT, rang); + 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 ufile_ptr'); + COPY_TEXT('bfd_vma'); ENDIF; match_pos := SEARCH_QUIETLY('@supports_plugins@', FORWARD, EXACT, rang); IF match_pos <> 0 THEN; @@ -156,26 +126,6 @@ $DECK ERASE(match_pos); COPY_TEXT('0'); ENDIF; - match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang); - IF match_pos <> 0 THEN; - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT('__DECC'); - SPLIT_LINE; - COPY_TEXT('#include '); - ENDIF; - match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang); - IF match_pos <> 0 THEN; - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT('int64'); - ENDIF; - match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang); - IF match_pos <> 0 THEN; - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT('uint64'); - ENDIF; WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file")); QUIT $ EOD -- Alan Modra Australia Development Lab, IBM