From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 86D6A3858D28 for ; Mon, 6 Dec 2021 10:23:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 86D6A3858D28 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-541-bRPJpuEUM62FexjE385hlA-1; Mon, 06 Dec 2021 05:23:41 -0500 X-MC-Unique: bRPJpuEUM62FexjE385hlA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3485B1006AA5; Mon, 6 Dec 2021 10:23:39 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79E435F4E1; Mon, 6 Dec 2021 10:23:38 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 1B6ANY1T1982620 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 6 Dec 2021 11:23:35 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 1B6ANWAE1982619; Mon, 6 Dec 2021 11:23:32 +0100 Date: Mon, 6 Dec 2021 11:23:32 +0100 From: Jakub Jelinek To: Martin =?utf-8?B?TGnFoWth?= Cc: Iain Sandoe , Richard Biener , Jeff Law , gcc-patches@gcc.gnu.org Subject: [committed] avr: Fix AVR build [PR71934] Message-ID: <20211206102332.GN2646553@tucnak> Reply-To: Jakub Jelinek References: <20211104200218.24159-1-iain@sandoe.co.uk> <20211105095411.GG304296@tucnak> <20211105152515.GK304296@tucnak> <20211108114604.GI2710@tucnak> <20211108194807.GJ2710@tucnak> <20211118080459.GO2710@tucnak> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2021 10:23:46 -0000 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 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 *. --- 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; Jakub