diff mbox

gcc build problem (i386.c) -- missing declaration

Message ID 15754196d7b.ee211d9511911.500849851081562859@zoho.com
State New
Headers show

Commit Message

Louis Krupp Sept. 22, 2016, 10:52 p.m. UTC
As of revision 240383 , i386.c isn't compiling.  The errors are:  
  
In file included from ../../gcc_trunk/gcc/target-def.h:106:0,  
                 from ../../gcc_trunk/gcc/config/i386/i386.c:81:  
./target-hooks-def.h:92:38: error: ‘hook_uint_uintp_false’ was not declared in this scope  
 #define TARGET_ASM_ELF_FLAGS_NUMERIC hook_uint_uintp_false  
                                      ^  
./target-hooks-def.h:2205:5: note: in expansion of macro ‘TARGET_ASM_ELF_FLAGS_NUMERIC’  
     TARGET_ASM_ELF_FLAGS_NUMERIC, \  
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~  
./target-hooks-def.h:1792:5: note: in expansion of macro ‘TARGET_ASM_OUT’  
     TARGET_ASM_OUT, \  
     ^~~~~~~~~~~~~~  
../../gcc_trunk/gcc/config/i386/i386.c:50811:29: note: in expansion of macro ‘TARGET_INITIALIZER’  
 struct gcc_target targetm = TARGET_INITIALIZER;  
  
The problem seems to be that hook_uint_uintp_false() was added to hooks.c but not to hooks.h.  I have things working on my copy with this change:  
  
  
If I'm not missing something, and if this is a genuine build problem, and if this change looks good, I can commit it unless someone else is in the process of doing that.  I just need someone's approval.  (I should add that I'm on the Fortran commit-after-approval list, but I'm not on a general gcc list as far as I know.) 
 
Louis Krupp

Comments

Anton Blanchard Sept. 22, 2016, 11:56 p.m. UTC | #1
Hi,

>  extern unsigned hook_uint_void_0 (void);  
>  extern unsigned int hook_uint_mode_0 (machine_mode);  
> +extern bool hook_uint_uintp_false (unsigned int, unsigned int *);  

I'm seeing the same build issue on ppc64le, and your patch fixes it.
Thanks.

Anton
Jeff Law Sept. 29, 2016, 6:10 p.m. UTC | #2
On 09/22/2016 04:52 PM, Louis Krupp wrote:
> As of revision 240383 , i386.c isn't compiling.  The errors are:
>
> In file included from ../../gcc_trunk/gcc/target-def.h:106:0,
>                  from ../../gcc_trunk/gcc/config/i386/i386.c:81:
> ./target-hooks-def.h:92:38: error: ‘hook_uint_uintp_false’ was not declared in this scope
>  #define TARGET_ASM_ELF_FLAGS_NUMERIC hook_uint_uintp_false
>                                       ^
> ./target-hooks-def.h:2205:5: note: in expansion of macro ‘TARGET_ASM_ELF_FLAGS_NUMERIC’
>      TARGET_ASM_ELF_FLAGS_NUMERIC, \
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./target-hooks-def.h:1792:5: note: in expansion of macro ‘TARGET_ASM_OUT’
>      TARGET_ASM_OUT, \
>      ^~~~~~~~~~~~~~
> ../../gcc_trunk/gcc/config/i386/i386.c:50811:29: note: in expansion of macro ‘TARGET_INITIALIZER’
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
> The problem seems to be that hook_uint_uintp_false() was added to hooks.c but not to hooks.h.  I have things working on my copy with this change:
>
> --- hooks.h     (revision 240383)
> +++ hooks.h     (working copy)
> @@ -95,6 +95,7 @@ extern tree hook_tree_tree_int_treep_bool_null (tr
>
>  extern unsigned hook_uint_void_0 (void);
>  extern unsigned int hook_uint_mode_0 (machine_mode);
> +extern bool hook_uint_uintp_false (unsigned int, unsigned int *);
>
>  extern bool default_can_output_mi_thunk_no_vcall (const_tree, HOST_WIDE_INT,
>                                                   HOST_WIDE_INT, const_tree);
>
> If I'm not missing something, and if this is a genuine build problem, and if this change looks good, I can commit it unless someone else is in the process of doing that.  I just need someone's approval.  (I should add that I'm on the Fortran commit-after-approval list, but I'm not on a general gcc list as far as I know.)
>
Unfortunately you didn't indicate the target you used.  Just saying 
"i386.c" isn't helpful as significant amounts of code in i386.c are 
conditionalized based on the target triplet (ie something like 
x86_64-pc-linux-gnu or i686-pc-kfreebsd-gnu.

What specific target were you trying to build?

Jeff
Louis Krupp Sept. 29, 2016, 6:13 p.m. UTC | #3
My target was gfortran.

In any case, someone else fixed this problem.

Louis


 ---- On Thu, 29 Sep 2016 11:10:15 -0700 Jeff Law <law@redhat.com> wrote ---- 
 > On 09/22/2016 04:52 PM, Louis Krupp wrote: 
 > > As of revision 240383 , i386.c isn't compiling.  The errors are: 
 > > 
 > > In file included from ../../gcc_trunk/gcc/target-def.h:106:0, 
 > >                  from ../../gcc_trunk/gcc/config/i386/i386.c:81: 
 > > ./target-hooks-def.h:92:38: error: ‘hook_uint_uintp_false’ was not declared in this scope 
 > >  #define TARGET_ASM_ELF_FLAGS_NUMERIC hook_uint_uintp_false 
 > >                                       ^ 
 > > ./target-hooks-def.h:2205:5: note: in expansion of macro ‘TARGET_ASM_ELF_FLAGS_NUMERIC’ 
 > >      TARGET_ASM_ELF_FLAGS_NUMERIC, \ 
 > >      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 > > ./target-hooks-def.h:1792:5: note: in expansion of macro ‘TARGET_ASM_OUT’ 
 > >      TARGET_ASM_OUT, \ 
 > >      ^~~~~~~~~~~~~~ 
 > > ../../gcc_trunk/gcc/config/i386/i386.c:50811:29: note: in expansion of macro ‘TARGET_INITIALIZER’ 
 > >  struct gcc_target targetm = TARGET_INITIALIZER; 
 > > 
 > > The problem seems to be that hook_uint_uintp_false() was added to hooks.c but not to hooks.h.  I have things working on my copy with this change: 
 > > 
 > > --- hooks.h     (revision 240383) 
 > > +++ hooks.h     (working copy) 
 > > @@ -95,6 +95,7 @@ extern tree hook_tree_tree_int_treep_bool_null (tr 
 > > 
 > >  extern unsigned hook_uint_void_0 (void); 
 > >  extern unsigned int hook_uint_mode_0 (machine_mode); 
 > > +extern bool hook_uint_uintp_false (unsigned int, unsigned int *); 
 > > 
 > >  extern bool default_can_output_mi_thunk_no_vcall (const_tree, HOST_WIDE_INT, 
 > >                                                   HOST_WIDE_INT, const_tree); 
 > > 
 > > If I'm not missing something, and if this is a genuine build problem, and if this change looks good, I can commit it unless someone else is in the process of doing that.  I just need someone's approval.  (I should add that I'm on the Fortran commit-after-approval list, but I'm not on a general gcc list as far as I know.) 
 > > 
 > Unfortunately you didn't indicate the target you used.  Just saying  
 > "i386.c" isn't helpful as significant amounts of code in i386.c are  
 > conditionalized based on the target triplet (ie something like  
 > x86_64-pc-linux-gnu or i686-pc-kfreebsd-gnu. 
 >  
 > What specific target were you trying to build? 
 >  
 > Jeff 
 >  
 >
Gerald Pfeifer Oct. 3, 2016, 12:15 p.m. UTC | #4
On Thu, 29 Sep 2016, Louis Krupp wrote:
> My target was gfortran.
> 
> In any case, someone else fixed this problem.

Good.

Note that by target we are referring to the platform (processor plus
operating system).  You can see this by looking for a line started
with "Target:" in the output of `gcc -v`.

On one of my machines this says "Target: x86_64-suse-linux", on
another one "Target: i386-unknown-freebsd10.3", for example.

Gerald
diff mbox

Patch

--- hooks.h     (revision 240383)  
+++ hooks.h     (working copy)  
@@ -95,6 +95,7 @@  extern tree hook_tree_tree_int_treep_bool_null (tr  
  
 extern unsigned hook_uint_void_0 (void);  
 extern unsigned int hook_uint_mode_0 (machine_mode);  
+extern bool hook_uint_uintp_false (unsigned int, unsigned int *);  
  
 extern bool default_can_output_mi_thunk_no_vcall (const_tree, HOST_WIDE_INT,  
                                                  HOST_WIDE_INT, const_tree);