arm-eabi fails in libc/sys/arm/: No rule to make target 'lib_a-trap.o', needed by 'lib.a'.

Mike Frysinger vapier@gentoo.org
Tue Feb 1 04:49:34 GMT 2022


On 31 Jan 2022 16:08, Richard Earnshaw wrote:
> This patch seems to have broken arm newlib builds (at least, when not 
> using libgloss).  I'm seeing:
> 
> make[5]: Entering directory 
> '/work/rearnsha/scratch/nightly/arm/master/arm-eabi/
> newlib/libc/sys/arm'
>    CC       lib_a-access.o
>    CC       lib_a-aeabi_atexit.o
> make[5]: *** No rule to make target 'lib_a-trap.o', needed by 'lib.a'. Stop.
> 
> And indeed, the Makefile in that directory now lacks anything to build 
> lib_a-trap.o from trap.S.  Something explicit is needed because of the 
> non-standard file rename that we use.

this patch series is unrelated.  this is due to a previous patch of mine:
newlib: delete (most) redundant lib_a_CCASFLAGS=$(AM_CCASFLAGS)

this is because i think newlib was relying on automake behavior that is
undocumented or unintended.  that said, i'm not sure why this Makefile.am
is written the way it is.  it'd be a lot simpler like:

--- a/newlib/libc/sys/arm/Makefile.am
+++ b/newlib/libc/sys/arm/Makefile.am
@@ -6,16 +6,10 @@ AM_CCASFLAGS = $(AM_CPPFLAGS)
 
 noinst_LIBRARIES = lib.a
 
+lib_a_SOURCES = access.c aeabi_atexit.c
 if MAY_SUPPLY_SYSCALLS
-extra_objs = $(lpfx)libcfunc.o $(lpfx)trap.o $(lpfx)syscalls.o
-else
-extra_objs =
+lib_a_SOURCES += libcfunc.c trap.S syscalls.c
 endif
-
-lib_a_SOURCES = access.c aeabi_atexit.c
-lib_a_LIBADD = $(extra_objs)
-EXTRA_lib_a_SOURCES = trap.S syscalls.c libcfunc.c
-lib_a_DEPENDENCIES = $(extra_objs)
 lib_a_CFLAGS = $(AM_CFLAGS)
 
 if MAY_SUPPLY_SYSCALLS

maybe Jeff can remember why it was written this way since it comes from:

commit 313f13497935d2831e76f9b8b61ccc762dc1cc65
Author: Jeff Johnston <jjohnstn@redhat.com>
Date:   Sat Feb 8 04:30:58 2003 +0000

    2003-02-07  Jeff Johnston  <jjohnstn@redhat.com>

            * acinclude.m4 (--disable-newlib-supplied-syscalls): New configuration
            option to allow disabling of syscalls being supplied in newlib.
            * aclocal.m4: Regenerated.
            * configure: Ditto.
            * configure.host: Add support of new configuration option and add
            -D__NO_SYSCALLS__ if newlib supplied syscalls are disabled.
            * doc/aclocal.m4: Regenerated.
            * doc/configure: Ditto.
            * libc/*aclocal.m4: Ditto.
            * libc/*configure: Ditto.
            * libm/*aclocal.m4: Ditto.
            * libm/*configure: Ditto.
            * libc/sys/arm/Makefile.am: Don't build syscalls.o if new option
            is disabled.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20220131/1cdf7980/attachment.sig>


More information about the Newlib mailing list