diff mbox series

Fix arm target build with inhibit_libc

Message ID 20210830120111.113722-1-sebastian.huber@embedded-brains.de
State New
Headers show
Series Fix arm target build with inhibit_libc | expand

Commit Message

Sebastian Huber Aug. 30, 2021, 12:01 p.m. UTC
Do not declare abort in "libgcc/unwind-arm-common.inc" since it is already
provided by "tsystem.h".  It fixes the following build error:

In file included from libgcc/config/arm/unwind-arm.c:144:
libgcc/unwind-arm-common.inc:55:24: error: macro "abort" passed 1 arguments, but takes just 0
   55 | extern void abort (void);

libgcc/

	* unwind-arm-common.inc (abort): Remove.
---
 libgcc/unwind-arm-common.inc | 4 ----
 1 file changed, 4 deletions(-)

Comments

Sebastian Huber Sept. 1, 2021, 5:09 a.m. UTC | #1
On 30/08/2021 14:01, Sebastian Huber wrote:
> Do not declare abort in "libgcc/unwind-arm-common.inc" since it is already
> provided by "tsystem.h".  It fixes the following build error:
> 
> In file included from libgcc/config/arm/unwind-arm.c:144:
> libgcc/unwind-arm-common.inc:55:24: error: macro "abort" passed 1 arguments, but takes just 0
>     55 | extern void abort (void);
> 
> libgcc/
> 
> 	* unwind-arm-common.inc (abort): Remove.

Could someone please have a look at this patch. Currently, the arm build 
with inhibit_libc is broken.
Christophe Lyon Sept. 1, 2021, 7 a.m. UTC | #2
On Wed, Sep 1, 2021 at 7:09 AM Sebastian Huber <
sebastian.huber@embedded-brains.de> wrote:

> On 30/08/2021 14:01, Sebastian Huber wrote:
> > Do not declare abort in "libgcc/unwind-arm-common.inc" since it is
> already
> > provided by "tsystem.h".  It fixes the following build error:
> >
> > In file included from libgcc/config/arm/unwind-arm.c:144:
> > libgcc/unwind-arm-common.inc:55:24: error: macro "abort" passed 1
> arguments, but takes just 0
> >     55 | extern void abort (void);
> >
> > libgcc/
> >
> >       * unwind-arm-common.inc (abort): Remove.
>
> Could someone please have a look at this patch. Currently, the arm build
> with inhibit_libc is broken.
>
>
I'm OK with it since it looks like what I proposed a couple of days ago :-)
But I'm not a maintainer.

Thanks,

Christophe


> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber@embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
Jeff Law Sept. 1, 2021, 3:48 p.m. UTC | #3
On 9/1/2021 1:00 AM, Christophe Lyon via Gcc-patches wrote:
> On Wed, Sep 1, 2021 at 7:09 AM Sebastian Huber <
> sebastian.huber@embedded-brains.de> wrote:
>
>> On 30/08/2021 14:01, Sebastian Huber wrote:
>>> Do not declare abort in "libgcc/unwind-arm-common.inc" since it is
>> already
>>> provided by "tsystem.h".  It fixes the following build error:
>>>
>>> In file included from libgcc/config/arm/unwind-arm.c:144:
>>> libgcc/unwind-arm-common.inc:55:24: error: macro "abort" passed 1
>> arguments, but takes just 0
>>>      55 | extern void abort (void);
>>>
>>> libgcc/
>>>
>>>        * unwind-arm-common.inc (abort): Remove.
>> Could someone please have a look at this patch. Currently, the arm build
>> with inhibit_libc is broken.
OK.  Or just wrap it with #ifndef abort if removing it causes other 
problems.

Jeff
diff mbox series

Patch

diff --git a/libgcc/unwind-arm-common.inc b/libgcc/unwind-arm-common.inc
index c9b70c10d4f5..77ec02ec811e 100644
--- a/libgcc/unwind-arm-common.inc
+++ b/libgcc/unwind-arm-common.inc
@@ -50,10 +50,6 @@ 
 #define ARM_SIGCONTEXT_R0		0xc
 #endif
 
-/* We add a prototype for abort here to avoid creating a dependency on
-   target headers.  */
-extern void abort (void);
-
 /* Definitions for C++ runtime support routines.  We make these weak
    declarations to avoid pulling in libsupc++ unnecessarily.  */
 typedef unsigned char bool;