diff mbox series

[committed] avr: Fix AVR build [PR71934]

Message ID 20211206102332.GN2646553@tucnak
State New
Headers show
Series [committed] avr: Fix AVR build [PR71934] | expand

Commit Message

Jakub Jelinek Dec. 6, 2021, 10:23 a.m. UTC
Hi!

On Mon, Dec 06, 2021 at 11:00:30AM +0100, Martin Liška wrote:
> Jakub, I think the patch broke avr-linux target:
>
> g++  -fno-PIE -c   -g   -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-erro
> /home/marxin/Programming/gcc/gcc/config/avr/avr.c: In function ‘void avr_output_data_section_asm_op(const void*)’:
> /home/marxin/Programming/gcc/gcc/config/avr/avr.c:10097:26: error: invalid conversion from ‘const void*’ to ‘const char*’ [-fpermissive]

This patch fixes that.
Tested with a cross-compiler from x86_64-linux that it builds, committed
as obvious.
I didn't notice that because avr isn't creating those sections
with that hook as argument, but is overriding the hooks in already created
section structure.

2021-12-06  Jakub Jelinek  <jakub@redhat.com>

	PR pch/71934
	* config/avr/avr.c (avr_output_data_section_asm_op,
	avr_output_bss_section_asm_op): Change argument type from const void *
	to const char *.



	Jakub

Comments

Martin Liška Dec. 6, 2021, 11:28 a.m. UTC | #1
On 12/6/21 11:23, Jakub Jelinek wrote:
> |This patch fixes that.|

Thanks for the quick fix!

Martin
diff mbox series

Patch

--- gcc/config/avr/avr.c.jj	2021-12-03 11:03:10.479503638 +0100
+++ gcc/config/avr/avr.c	2021-12-06 11:16:31.102208406 +0100
@@ -10089,7 +10089,7 @@  avr_asm_asm_output_aligned_bss (FILE *fi
    to track need of __do_copy_data.  */
 
 static void
-avr_output_data_section_asm_op (const void *data)
+avr_output_data_section_asm_op (const char *data)
 {
   avr_need_copy_data_p = true;
 
@@ -10102,7 +10102,7 @@  avr_output_data_section_asm_op (const vo
    to track need of __do_clear_bss.  */
 
 static void
-avr_output_bss_section_asm_op (const void *data)
+avr_output_bss_section_asm_op (const char *data)
 {
   avr_need_clear_bss_p = true;