diff mbox series

Fix bootstrap (was: Re: [PATCH][RFC] Sanitize equals and hash functions in hash-tables.)

Message ID 20190607151306.GS19695@tucnak
State New
Headers show
Series Fix bootstrap (was: Re: [PATCH][RFC] Sanitize equals and hash functions in hash-tables.) | expand

Commit Message

Jakub Jelinek June 7, 2019, 3:13 p.m. UTC
Hi!

Attached are two different fixes, each of which fixes the build.
The first one arranges gencondmd to be linked against build/errors.o,
so that it links fine, the second one instead doesn't define the function
and method which requires that, as it is only called from #if CHECKING_P
guarded code.

Ok for trunk?  Which one?

	Jakub
2019-06-07  Jakub Jelinek  <jakub@redhat.com>

	* Makefile.in (genprogerr): Add condmd.
	(genprog): Remove it here.
2019-06-07  Jakub Jelinek  <jakub@redhat.com>

	* hash-table.h (hashtab_chk_error, hash_table::verify): Only define
	if CHECKING_P.

--- gcc/hash-table.h.jj	2019-06-07 16:55:07.675622566 +0200
+++ gcc/hash-table.h	2019-06-07 17:05:36.212720156 +0200
@@ -1012,6 +1012,7 @@ hash_table<Descriptor, Lazy, Allocator>
 
 /* Report a hash table checking error.  */
 
+#if CHECKING_P
 ATTRIBUTE_NORETURN ATTRIBUTE_COLD
 static void
 hashtab_chk_error ()
@@ -1040,6 +1041,7 @@ hash_table<Descriptor, Lazy, Allocator>
 	hashtab_chk_error ();
     }
 }
+#endif
 
 /* This function deletes an element with the given COMPARABLE value
    from hash table starting with the given HASH.  If there is no

Comments

Martin Liška June 7, 2019, 3:20 p.m. UTC | #1
On 6/7/19 5:13 PM, Jakub Jelinek wrote:
> Ok for trunk?  Which one?

Thank you Jakub for the fix. I'm fine with both.

Martin
Richard Sandiford June 7, 2019, 3:32 p.m. UTC | #2
Jakub Jelinek <jakub@redhat.com> writes:
> Hi!
>
> Attached are two different fixes, each of which fixes the build.
> The first one arranges gencondmd to be linked against build/errors.o,
> so that it links fine, the second one instead doesn't define the function
> and method which requires that, as it is only called from #if CHECKING_P
> guarded code.
>
> Ok for trunk?  Which one?

First seems cleaner to me.

>
> 	Jakub
>
> 2019-06-07  Jakub Jelinek  <jakub@redhat.com>
>
> 	* Makefile.in (genprogerr): Add condmd.
> 	(genprog): Remove it here.

OK, thanks.

Richard
diff mbox series

Patch

--- gcc/Makefile.in.jj	2019-05-06 09:46:11.117792961 +0200
+++ gcc/Makefile.in	2019-06-07 16:59:21.248627607 +0200
@@ -2802,11 +2802,11 @@  genprogmd = $(genprogrtl) mddeps constan
 $(genprogmd:%=build/gen%$(build_exeext)): $(BUILD_MD)
 
 # All these programs need to report errors.
-genprogerr = $(genprogmd) genrtl modes gtype hooks cfn-macros
+genprogerr = $(genprogmd) genrtl modes gtype hooks cfn-macros condmd
 $(genprogerr:%=build/gen%$(build_exeext)): $(BUILD_ERRORS)
 
 # Remaining build programs.
-genprog = $(genprogerr) check checksum condmd match
+genprog = $(genprogerr) check checksum match
 
 # These programs need libs over and above what they get from the above list.
 build/genautomata$(build_exeext) : BUILD_LIBS += -lm