This patch breaks compilation on power:

g++ -fno-PIE -c -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I/home/seurer/gcc/gcc-test2/gcc -I/home/seurer/gcc/gcc-test2/gcc/. -I/home/seurer/gcc/gcc-test2/gcc/../include -I/home/seurer/gcc/gcc-test2/gcc/../libcpp/include -I/home/seurer/gcc/gcc-test2/gcc/../libdecnumber -I/home/seurer/gcc/gcc-test2/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/seurer/gcc/gcc-test2/gcc/../libbacktrace -o rs6000.o -MT rs6000.o -MMD -MP -MF ./.deps/rs6000.TPo /home/seurer/gcc/gcc-test2/gcc/config/rs6000/rs6000.c
In file included from /home/seurer/gcc/gcc-test2/gcc/target-def.h:106:0,
from /home/seurer/gcc/gcc-test2/gcc/config/rs6000/rs6000.c:77: ./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-hooks-def.h:1792:5: note: in expansion of macro 'TARGET_ASM_OUT'
/home/seurer/gcc/gcc-test2/gcc/config/rs6000/rs6000.c:40709:29: note: in expansion of macro 'TARGET_INITIALIZER'
 struct gcc_target targetm = TARGET_INITIALIZER;
make[2]: *** [rs6000.o] Error 1

On 09/22/16 12:04, Andre Vieira (lists) wrote:
On 22/09/16 16:28, Richard Earnshaw (lists) wrote:
On 22/09/16 16:04, Andre Vieira (lists) wrote:

I reworked the patch according to the comments above.

Is this OK?

2016-09-22  Andre Vieira  <>
            Terry Guo  <>

        * target.def (elf_flags_numeric): New target hook.
        * targhooks.h (default_asm_elf_flags_numeric): New.
        * varasm.c (default_asm_elf_flags_numeric): New.
          (default_elf_asm_named_section): Use new target hook.
        * config/arm/arm.opt (mpure-code): New.
        * config/arm/arm.h (SECTION_ARM_PURECODE): New.
        * config/arm/arm.c (arm_asm_init_sections): Add section
          attribute to default text section if -mpure-code.
          (arm_option_check_internal): Diagnose use of option with
          non supported targets and/or options.
          (arm_asm_elf_flags_numeric): New.
          (arm_function_section): New.
          (arm_elf_section_type_flags): New.
        * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Disable
          for -mpure-code.
        * gcc/doc/texi (TARGET_ASM_ELF_FLAGS_NUMERIC): New.
        * gcc/doc/ (TARGET_ASM_ELF_FLAGS_NUMERIC): Likewise.

2016-09-22  Andre Vieira  <>
            Terry Guo  <>

        * New.
        * New.
        * New.

I missed this last time around, but please can you wrap references to
SHF_ARM_PURECODE in the documentation with @code{...}.

OK with that change.


Done. Committed as revision r240379.


-Bill Seurer

Reply via email to