[committed] libgcc, arc: Fix build

Message ID Yz9UXQV4MrH5TbOC@tucnak
State New, archived
Headers
Series [committed] libgcc, arc: Fix build |

Commit Message

Jakub Jelinek Oct. 6, 2022, 10:19 p.m. UTC
  Hi!

On Thu, Oct 06, 2022 at 10:05:29PM +0000, Joseph Myers wrote:
> I'm seeing the following build failure for arc-linux-gnu after this 
> commit.  (Note that this is for building GCC *after* glibc, not for an 
> initial inhibit_libc bootstrap build of GCC.)
> 
> In file included from 
> /scratch/jmyers/glibc-bot/src/gcc/libgcc/unwind-dw2.c:413:
> ./md-unwind-support.h: In function 'arc_fallback_frame_state':
> ./md-unwind-support.h:103:10: warning: assignment to 'struct sigcontext *' from incompatible pointer type 'mcontext_t *' [-Wincompatible-pointer-types]
>   103 |       sc = &rt_->uc.uc_mcontext;
>       |          ^
> ./md-unwind-support.h:118:45: error: 'struct <anonymous>' has no member named 'how'
>   118 |       fs->regs.reg[register_id_for_index[i]].how = REG_SAVED_OFFSET;
>       |                                             ^
> /scratch/jmyers/glibc-bot/src/gcc/libgcc/shared-object.mk:14: recipe for target 'unwind-dw2.o' failed
> 
> https://sourceware.org/pipermail/libc-testresults/2022q4/010333.html

Oops, sorry.
Missed one spot in the r13-3108-g146e45914032 change (my sed script
didn't expect nested []s).

Committed to trunk as obvious.

2022-10-07  Jakub Jelinek  <jakub@redhat.com>

	* config/arc/linux-unwind.h (arc_fallback_frame_state): Use
	fs->regs.how[X] instead of fs->regs.reg[X].how.



	Jakub
  

Patch

--- libgcc/config/arc/linux-unwind.h.jj	2022-10-06 11:04:33.254058274 +0200
+++ libgcc/config/arc/linux-unwind.h	2022-10-07 00:10:24.353464043 +0200
@@ -115,7 +115,7 @@  arc_fallback_frame_state (struct _Unwind
     {
       if (register_id_for_index[i] == -1)
 	continue;
-      fs->regs.reg[register_id_for_index[i]].how = REG_SAVED_OFFSET;
+      fs->regs.how[register_id_for_index[i]] = REG_SAVED_OFFSET;
       fs->regs.reg[register_id_for_index[i]].loc.offset
 	= ((_Unwind_Ptr) &(regs[i])) - new_cfa;
     }