public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: Jeff Johnston <jjohnstn@redhat.com>, newlib@sourceware.org
Subject: Re: arm-eabi fails in libc/sys/arm/: No rule to make target 'lib_a-trap.o', needed by 'lib.a'.
Date: Thu, 3 Feb 2022 16:49:12 +0000	[thread overview]
Message-ID: <1a230e3b-345b-da24-2954-d7daf2a87d26@foss.arm.com> (raw)
In-Reply-To: <Yfi73iw5tZ/8XHXZ@vapier>



On 01/02/2022 04:49, Mike Frysinger wrote:
> 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)
> 

Ah, sorry, I was struggling to identify the exact patch and thought I'd 
found the right one.


> 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

This seems to work although one small difference is that instead of 
building libc_a-trap.o it now builds trap.o.  I'm not sure if that 
really matters, though.

R.

> 
> 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

  reply	other threads:[~2022-02-03 16:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-23  6:04 [PATCH 0/7] newlib: reduce number of configure scripts Mike Frysinger
2022-01-23  6:04 ` [PATCH 1/7] newlib: libm: merge machine/ trampoline up a level Mike Frysinger
2022-01-26 15:58   ` Jon Turney
2022-01-27  2:46     ` Mike Frysinger
2022-01-27 15:28       ` Jon Turney
2022-01-28  0:37         ` Mike Frysinger
2022-01-28 14:28           ` Jon Turney
2022-01-29  4:56             ` Mike Frysinger
2022-01-23  6:04 ` [PATCH 2/7] newlib: libm: merge machine/ configure scripts " Mike Frysinger
2022-01-23  6:04 ` [PATCH 3/7] newlib: libc: merge machine/ trampoline " Mike Frysinger
2022-01-23  6:04 ` [PATCH 4/7] newlib: libc: merge sys/ " Mike Frysinger
2022-01-23  6:04 ` [PATCH 5/7] newlib: libc: install CRT0 straight out of subdir Mike Frysinger
2022-01-23  6:04 ` [PATCH 6/7] newlib: libc: merge most sys/ configure scripts up a level Mike Frysinger
2022-01-31 16:08   ` Richard Earnshaw
2022-02-01  4:49     ` arm-eabi fails in libc/sys/arm/: No rule to make target 'lib_a-trap.o', needed by 'lib.a' Mike Frysinger
2022-02-03 16:49       ` Richard Earnshaw [this message]
2022-02-04  1:44         ` Mike Frysinger
2022-01-23  6:04 ` [PATCH 7/7] newlib: libc: merge machine/ configure scripts up a level Mike Frysinger
2022-01-25 13:58 ` [PATCH 0/7] newlib: reduce number of configure scripts Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a230e3b-345b-da24-2954-d7daf2a87d26@foss.arm.com \
    --to=richard.earnshaw@foss.arm.com \
    --cc=jjohnstn@redhat.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).