On Fri, Nov 13, 2026 at 11:14:13AM +0100, Andreas Schwab wrote:
> Breaks arm build.
> 
> make[3]: Entering directory 
> '/home/abuild/rpmbuild/BUILD/gcc17-17.0.1+git6204-build/gcc-17.0.1+git6204/obj-armv7hl-suse-linux-gnueabi/armv7hl-suse-linux-gnueabi/libgcc'
> /home/abuild/rpmbuild/BUILD/gcc17-17.0.1+git6204-build/gcc-17.0.1+git6204/obj-armv7hl-suse-linux-gnueabi/./gcc/xgcc
>  
> -B/home/abuild/rpmbuild/BUILD/gcc17-17.0.1+git6204-build/gcc-17.0.1+git6204/obj-armv7hl-suse-linux-gnueabi/./gcc/
>  -B/usr/armv7hl-suse-linux-gnueabi/bin/ 
> -B/usr/armv7hl-suse-linux-gnueabi/lib/ -isystem 
> /usr/armv7hl-suse-linux-gnueabi/include -isystem 
> /usr/armv7hl-suse-linux-gnueabi/sys-include   -fno-checking -O2 
> -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection 
> -Werror=return-type -g -O2  -O2 -funwind-tables -fasynchronous-unwind-tables 
> -fstack-clash-protection -Werror=return-type -g -DIN_GCC   -W -Wall 
> -Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wno-format 
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem 
> ./include  -fPIC -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc 
> -fno-stack-protector  -fPIC -fno-inline -I. -I. -I../.././gcc 
> -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc 
> -I../../../libgcc/../include  -DHAVE_CC_TLS   -o _negdi2.o -MT _negdi2.o -MD 
> -MP -MF _negdi2.dep -DL_negdi2 -c ../../../libgcc/libgcc2.c 
> -fvisibility=hidden -DHIDE_EXPORTS
> In file included from ../.././gcc/tm.h:40,
>                  from ../../../libgcc/libgcc2.c:29:
> ../../../libgcc/../gcc/config/arm/arm.h:1608:16: error: unknown type name 
> ‘rtx_code_label’
>  1608 | extern GTY(()) rtx_code_label *thumb_call_via_label[14];
>       |                ^~~~~~~~~~~~~~
> make[3]: *** [Makefile:513: _negdi2.o] Error 1
> make[3]: Leaving directory 
> '/home/abuild/rpmbuild/BUILD/gcc17-17.0.1+git6204-build/gcc-17.0.1+git6204/obj-armv7hl-suse-linux-gnueabi/armv7hl-suse-linux-gnueabi/libgcc'

bah, forgot tm.h can be included from libraries, testing the below.

thanks

Trev

commit 8ea0392c96856e7a7554736ef4c778f6a2530840 (cfarm120/arm)
Author: Trevor Saunders <[email protected]>
Date:   Fri Nov 13 17:08:15 2026 +0000

    only declare thumb_call_via_label when building gcc

    diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
    index 0cb394e810d..5406b127f36 100644
    --- a/gcc/config/arm/arm.h
    +++ b/gcc/config/arm/arm.h
    @@ -1598,14 +1598,14 @@ typedef struct GTY(()) machine_function
       int pacspval_needed;
        }
         machine_function;
         -#endif
         -
         -#define ARM_Q_BIT_READ (arm_q_bit_access ())
         -#define ARM_GE_BITS_READ (arm_ge_bits_access ())

          /* As in the machine_function, a global set of call-via
           * labels, for code
               that is in text_section.  */
                extern GTY(()) rtx_code_label *thumb_call_via_label[14];
                +#endif
                +
                +#define ARM_Q_BIT_READ (arm_q_bit_access ())
                +#define ARM_GE_BITS_READ (arm_ge_bits_access ())

                 /* The number of potential ways of assigning to a
                  * co-processor.  */
                   #define ARM_NUM_COPROC_SLOTS 1

Reply via email to