Patchwork Ubsan merged into trunk

login
register
mail settings
Submitter Marek Polacek
Date Aug. 31, 2013, 3:15 p.m.
Message ID <20130831151555.GI23899@redhat.com>
Download mbox | patch
Permalink /patch/271538/
State New
Headers show

Comments

Marek Polacek - Aug. 31, 2013, 3:15 p.m.
On Fri, Aug 30, 2013 at 06:58:06PM -0400, David Edelsohn wrote:
> This patch  / merge broke bootstrap on AIX:
> 
> In file included from ./tm.h:18:0,
>                  from /home/dje/src/src/gcc/function.h:26,
>                  from /home/dje/src/src/gcc/basic-block.h:25,
>                  from /home/dje/src/src/gcc/cgraph.h:28,
>                  from /home/dje/src/src/gcc/ubsan.c:25:
> /home/dje/src/src/gcc/ubsan.c: In function 'tree_node*
> ubsan_type_descriptor(tree)':
> /home/dje/src/src/gcc/config/rs6000/xcoff.h:262:63: error:
> 'rs6000_xcoff_strip_dollar' was not declared in this scope
>    sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX),
> (unsigned) (NUM))
>                                                                ^
> /home/dje/src/src/gcc/ubsan.c:282:3: note: in expansion of macro
> 'ASM_GENERATE_INTERNAL_LABEL'
>    ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lubsan_type", type_var_id_num++);
>    ^
> /home/dje/src/src/gcc/ubsan.c: In function 'tree_node*
> ubsan_create_data(const char*, location_t, ...)':
> /home/dje/src/src/gcc/config/rs6000/xcoff.h:262:63: error:
> 'rs6000_xcoff_strip_dollar' was not declared in this scope
>    sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX),
> (unsigned) (NUM))
> 
> If you use macros like ASM_GENERATE_INTERNAL_LABEL, which may cal
> target-specific functions, you need to include tm_p.h to pull in
> <target>-protos.h.

I see, sorry.  Will commit the following fix as obvious in a bit.

2013-08-31  Marek Polacek  <polacek@redhat.com>

	* ubsan.c: Include tm_p.h.


	Marek
Jakub Jelinek - Sept. 1, 2013, 11:36 a.m.
On Sat, Aug 31, 2013 at 05:15:55PM +0200, Marek Polacek wrote:
> I see, sorry.  Will commit the following fix as obvious in a bit.
> 
> 2013-08-31  Marek Polacek  <polacek@redhat.com>
> 
> 	* ubsan.c: Include tm_p.h.

You need to add $(TM_P_H) to ubsan.o dependencies in Makefile.in too.
Ok with that change.

> --- gcc/ubsan.c.mp	2013-08-31 17:12:48.719219402 +0200
> +++ gcc/ubsan.c	2013-08-31 17:13:05.895281454 +0200
> @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3.
>  #include "hashtab.h"
>  #include "pointer-set.h"
>  #include "output.h"
> +#include "tm_p.h"
>  #include "toplev.h"
>  #include "ubsan.h"
>  #include "c-family/c-common.h"

	Jakub
Marek Polacek - Sept. 1, 2013, 11:43 a.m.
On Sun, Sep 01, 2013 at 01:36:37PM +0200, Jakub Jelinek wrote:
> On Sat, Aug 31, 2013 at 05:15:55PM +0200, Marek Polacek wrote:
> > I see, sorry.  Will commit the following fix as obvious in a bit.
> > 
> > 2013-08-31  Marek Polacek  <polacek@redhat.com>
> > 
> > 	* ubsan.c: Include tm_p.h.
> 
> You need to add $(TM_P_H) to ubsan.o dependencies in Makefile.in too.
> Ok with that change.

Argh, sorry.  I _always_ forgot to update the deps in Makefile.in. :(
Will fix it soon.

	Marek

Patch

--- gcc/ubsan.c.mp	2013-08-31 17:12:48.719219402 +0200
+++ gcc/ubsan.c	2013-08-31 17:13:05.895281454 +0200
@@ -27,6 +27,7 @@  along with GCC; see the file COPYING3.
 #include "hashtab.h"
 #include "pointer-set.h"
 #include "output.h"
+#include "tm_p.h"
 #include "toplev.h"
 #include "ubsan.h"
 #include "c-family/c-common.h"