diff mbox

Ubsan merged into trunk

Message ID 20130831151555.GI23899@redhat.com
State New
Headers show

Commit Message

Marek Polacek Aug. 31, 2013, 3:15 p.m. UTC
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

Comments

Jakub Jelinek Sept. 1, 2013, 11:36 a.m. UTC | #1
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. UTC | #2
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
diff mbox

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"