[PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code

Jon Turney jon.turney@dronecode.org.uk
Wed Feb 9 19:42:03 GMT 2022


On 05/02/2022 07:34, Mike Frysinger wrote:
> This logic was added to libc & libm to get it working again after some
> reworks in the CPP handling, but now that that's settled, let's move
> this to the common newlib configure logic.  This will make it easier
> to consolidate all the configure calls into the top-level newlib dir.
> 
> This does create a lot of noise in the generate scripts, but that's
> because of the ordering of the calls, not because of correctness. We
> will try to draw that back down in follow up commits as we modernize
> the toolchain calls in here.

Somehow, this change seems to prevent a self-hosted cygwin build from 
working.

See e.g. https://github.com/cygwin/cygwin/runs/5118411294

Comparing this with the previous successful run, it looks like:

Because doc/makedoc appears in noinst_DATA, which the target all depends 
on, it tries to make the target doc/makedoc (without EXEEXT_FOR_BUILD 
appended), which uses a one step built-in(?) compiler rule, and fails as 
the directory $builddir/doc/ doesn't exist yet.

Note that 'make info' still works, as this properly depends on $(MKDOC).

So maybe something like this is needed?  But I have no idea what this 
change did to stop it working as before...

> diff --git a/newlib/doc/local.mk b/newlib/doc/local.mk
> index 15c43f225..de1dd1f2b 100644
> --- a/newlib/doc/local.mk
> +++ b/newlib/doc/local.mk
> @@ -1,8 +1,8 @@
> -# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
> -noinst_DATA += doc/makedoc
> -
>  MKDOC = doc/makedoc$(EXEEXT_FOR_BUILD)
>  
> +# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
> +noinst_DATA += $(MKDOC)
> +
>  # We don't use CFLAGS with CC_FOR_BUILD because here CFLAGS will
>  # actually be CFLAGS_FOR_TARGET, and in some cases that will include
>  # -Os, which CC_FOR_BUILD may not recognize.


More information about the Newlib mailing list