]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
2 years agolibgloss: fix more missing dir with parallel install
Mike Frysinger [Sat, 29 Jan 2022 06:33:44 +0000 (01:33 -0500)]
libgloss: fix more missing dir with parallel install

Depending on the processing order of rules when installing in parallel,
these install rules might be processed before some other rule happens
to create the respective dirs.  Make sure each one creates the needed
dirs before installing into them.

2 years agolibgloss: update Makefile regen rules for merged arches
Mike Frysinger [Sat, 29 Jan 2022 05:10:59 +0000 (00:10 -0500)]
libgloss: update Makefile regen rules for merged arches

For arches that had their configure merged into the top-level, make
sure they don't still depend on a subdir configure script that no
longer exists.  I had cleaned this up for some of the subdirs, but
these got lost in the shuffle.

2 years agoFinish this commit by prefixing HAVE_INITFINI_ARRAY and HAVE_INIT_FINI references...
Jeff Law [Sat, 29 Jan 2022 04:26:18 +0000 (21:26 -0700)]
Finish this commit by prefixing HAVE_INITFINI_ARRAY and HAVE_INIT_FINI references in libgloss in the same way.

Author: Mike Frysinger <vapier@gentoo.org>
Date:   Mon Jan 17 22:20:20 2022 -0500

    newlib: internalize HAVE_INITFINI_ARRAY

    This define is only used by newlib internally, so stop exporting it
    as HAVE_INITFINI_ARRAY since this can conflict with defines packages
    use themselves.

    We don't really need to add _ to HAVE_INIT_FINI too since it isn't
    exported in newlib.h, but might as well be consistent here.

    We can't (easily) add this to newlib_cflags like HAVE_INIT_FINI is
    because this is based on a compile-time test in the top configure,
    not on plain shell code in configure.host.  We'd have to replicate
    the test in every subdir in order to have it passed down.

2 years agonewlib: hoist crt0 install up another dir
Mike Frysinger [Fri, 28 Jan 2022 12:24:18 +0000 (07:24 -0500)]
newlib: hoist crt0 install up another dir

Commit dd23de27c8e45513ad276f503a0036c3bc4e487b ("newlib: libc: install
CRT0 straight out of subdir") got rid of the libc/sys/ intermediate for
copying the file up, but the top-level newlib/ dir was still expecting
a libc/crt0.o to exist so it could install.  Update that to also look
for the crt0 file directly under libc/ like we already do for crt1.

2 years agolibgloss: aarch64/sparc: fix missing dir with parallel install
Mike Frysinger [Fri, 28 Jan 2022 11:21:41 +0000 (06:21 -0500)]
libgloss: aarch64/sparc: fix missing dir with parallel install

Depending on the processing order of rules when installing in parallel,
install-board might run first and the target dirs don't yet exist.

2 years agolibgloss: bfin: fix missing dir with parallel install
Mike Frysinger [Fri, 28 Jan 2022 10:56:36 +0000 (05:56 -0500)]
libgloss: bfin: fix missing dir with parallel install

Depending on the processing order of rules when installing in parallel,
install-board might run first and the target dirs don't yet exist.

2 years agoCygwin: drop autoloading kernel32 symbols available since Windows 7
Corinna Vinschen [Fri, 28 Jan 2022 09:33:50 +0000 (10:33 +0100)]
Cygwin: drop autoloading kernel32 symbols available since Windows 7

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agolibgloss: Fix PRU & Blackfin mkinstalldirs path
Dimitar Dimitrov [Thu, 27 Jan 2022 18:52:43 +0000 (20:52 +0200)]
libgloss: Fix PRU & Blackfin mkinstalldirs path

With the move of configure scripts out of target directories, relative
paths to top_srcdir got broken:

  /bin/sh: .../newlib/libgloss/../../mkinstalldirs: No such file or directory

Fix the PRU build by switching to srcroot relative path, as rest of targets do.

Fix the Blackfin build in the same way.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2 years agonewlib: merge iconvdata into top-level Makefile
Mike Frysinger [Fri, 31 Dec 2021 01:53:04 +0000 (20:53 -0500)]
newlib: merge iconvdata into top-level Makefile

Avoid a recursive make with this tiny subdir to speed things up a bit.

2 years agonewlib: drop unused saber file
Mike Frysinger [Thu, 27 Jan 2022 09:30:17 +0000 (04:30 -0500)]
newlib: drop unused saber file

I can't find any references to this, and it looks like a generated
build log from a specific old sparc system.

2 years agoRevert "Cygwin: fix permission problem when writing DAC info on Samba shares"
Corinna Vinschen [Thu, 27 Jan 2022 14:22:39 +0000 (15:22 +0100)]
Revert "Cygwin: fix permission problem when writing DAC info on Samba shares"

This reverts commit 0390cc85727b0165b5cdfcff7578cac94ae3371d.

There's no indication what exact situation this patch was supposed to
solve, and local testing doesn't show any such problems.  However, this
patch itself introduced a new problem, as outlined by
https://cygwin.com/pipermail/cygwin/2022-January/250629.html

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agonewlib: fix info+man page builds
Mike Frysinger [Thu, 27 Jan 2022 02:41:47 +0000 (21:41 -0500)]
newlib: fix info+man page builds

The work to merge libc/machine/ up a dir lost the stub doc targets.
So when libc/ recursed into machine/, it would stop going deeper as
the doc rules were empty.  But now that libc/ goes directly into the
libc/machine/$arch/ and those have never had doc stubs, the build
fails.  Add a quick hack to the top dir to ignore all machine/$arch/
dirs when generating docs.  A follow up series will delete all of
this code as it merges all the doc rules into the top newlib dir.

2 years agoFix null-pointer dereference in nano-malloc
Cyril Yared [Tue, 25 Jan 2022 15:44:10 +0000 (07:44 -0800)]
Fix null-pointer dereference in nano-malloc

If p is NULL, then the free_list is empty and we should return the
correct failure values.

2 years agolibgloss: merge stub iq2000 configure scripts up a level
Mike Frysinger [Wed, 26 Jan 2022 09:42:09 +0000 (04:42 -0500)]
libgloss: merge stub iq2000 configure scripts up a level

This was supposed to be included in the previous commit.

2 years agolibgloss: merge stub arch configure scripts up a level
Mike Frysinger [Sun, 23 Jan 2022 06:10:33 +0000 (01:10 -0500)]
libgloss: merge stub arch configure scripts up a level

For about half the ports, we don't need a subdir configure script.
They're using the config/default.m[ht] rules, and they aren't doing
any unique configure tests, so they exist just to pass top-level
settings down to create the arch Makefile.  We can just as easily
do that from the top-level Mkaefile directly and skip configure.

Most of the remaining configure scripts could be migrated up to
the top-level too, but that would require care in each subdir.
So let's be lazy and put that off to another day.

2 years agolibgloss: iq2000: drop unused configure vars
Mike Frysinger [Mon, 24 Jan 2022 05:35:52 +0000 (00:35 -0500)]
libgloss: iq2000: drop unused configure vars

This will make it easier to merge up as it won't have unique settings.

2 years agonewlib: switch to multilib.am
Mike Frysinger [Mon, 24 Jan 2022 01:04:59 +0000 (20:04 -0500)]
newlib: switch to multilib.am

We use the common config-ml.in for configure, so switch the makefile
over to the common multilib.am.  It's almost exactly the same code,
but there are two differences:
* Common code hooks install-exec-local for install-multi, but newlib
  doesn't currently install any executables, so that doesn't fire.
  Newlib already has install-data-local that inlined install-multi,
  so switch that to the common install-multi.
* Common code doesn't provide a check-multi at all.  Keep ours for
  now.  Some day common code might get it.  Or not.  Who knows.

2 years agonewlib: libc: merge machine/ configure scripts up a level
Mike Frysinger [Sun, 23 Jan 2022 05:23:28 +0000 (00:23 -0500)]
newlib: libc: merge machine/ configure scripts up a level

The machine configure scripts are all effectively stub scripts that
pass the higher level options to its own makefile.  There were only
three doing custom tests.  The rest were all effectively the same as
the libc/ configure script.

So instead of recursively running configure in all of these subdirs,
generate their makefiles from the top-level configure.  For the few
unique ones, deploy a pattern of including subdir logic via m4:
m4_include([machine/nds32/acinclude.m4])

Some of the generated machine makefiles have a bunch of extra stuff
added to them, but that's because they were inconsistent in their
configure libtool calls.  The top-level has it, so it exports some
new vars to the ones that weren't already.

2 years agonewlib: libc: merge most sys/ configure scripts up a level
Mike Frysinger [Sun, 23 Jan 2022 04:31:31 +0000 (23:31 -0500)]
newlib: libc: merge most sys/ configure scripts up a level

The sys configure scripts are almost all effectively stub scripts that
pass the higher level options to its own makefile.  The phoenix & linux
ones are a bit more complicated with nested subdirs, so those have been
left alone for now.  Plus, I don't really have a way of testing them.

2 years agonewlib: libc: install CRT0 straight out of subdir
Mike Frysinger [Sun, 23 Jan 2022 04:17:35 +0000 (23:17 -0500)]
newlib: libc: install CRT0 straight out of subdir

There's no need to have a sys/ subdir just to copy the sys/$arch/crt0.o
up to sys/crt0.o, and then have libc/ copy sys/crt0.o up again.  Just
have libc/ refer to sys/$arch/crt0.o directly and drop the intermediate
makefile entirely.

2 years agonewlib: libc: merge sys/ trampoline up a level
Mike Frysinger [Sun, 23 Jan 2022 04:10:46 +0000 (23:10 -0500)]
newlib: libc: merge sys/ trampoline up a level

The sys/{configure,Makefile} files exist to fan out to the specific
sys/$arch/ subdir, and to possibly generate a crt0.  We already have
all that same info in the libc/ dir itself, so by moving the recursive
configure and make calls into it, we can cut off some of this logic
entirely and save the overhead.

For arches that don't have a sys subdir, it means they can skip the
logic entirely.

The sys subdir itself is kept for the crt0 logic, for now.  We'll try
and clean that up next.

2 years agonewlib: libc: merge machine/ trampoline up a level
Mike Frysinger [Sun, 23 Jan 2022 04:00:39 +0000 (23:00 -0500)]
newlib: libc: merge machine/ trampoline up a level

The machine/{configure,Makefile} files exist only to fan out to the
specific machine/$arch/ subdir.  We already have all that same info
in the libc/ dir itself, so by moving the recursive configure and
make calls into it, we can cut off this logic entirely and save the
overhead.

For arches that don't have a machine subdir, it means they can skip
the logic entirely.  Although there's prob not too many of those.

2 years agonewlib: libm: merge machine/ configure scripts up a level
Mike Frysinger [Sun, 23 Jan 2022 01:19:41 +0000 (20:19 -0500)]
newlib: libm: merge machine/ configure scripts up a level

The machine configure scripts are all effectively stub scripts that
pass the higher level options to its own makefile.  The only one doing
any custom tests was nds32.  The rest were all effectively the same as
the libm/ configure script.

So instead of recursively running configure in all of these subdirs,
generate their makefiles from the top-level configure.  For nds32,
deploy a pattern of including subdir logic via m4:
m4_include([machine/nds32/acinclude.m4])

Even its set of checks are very small -- it does 2 preprocessor tests
and sets up 2 makefile conditionals.

Some of the generated machine makefiles have a bunch of extra stuff
added to them, but that's because they were inconsistent in their
configure libtool calls.  The top-level has it, so it exports some
new vars to the ones that weren't already.

2 years agonewlib: libm: merge machine/ trampoline up a level
Mike Frysinger [Sun, 23 Jan 2022 00:54:54 +0000 (19:54 -0500)]
newlib: libm: merge machine/ trampoline up a level

The machine/{configure,Makefile} files exist only to fan out to the
specific machine/$arch/ subdir.  We already have all that same info
in the libm/ dir itself, so by moving the recursive configure and
make calls into it, we can cut off this logic entirely and save the
overhead.

For arches that don't have a machine subdir, it means they can skip
the logic entirely.

2 years agolibgloss: define default target_makefile_frag in top-level
Mike Frysinger [Mon, 24 Jan 2022 05:23:10 +0000 (00:23 -0500)]
libgloss: define default target_makefile_frag in top-level

A bunch of subdirs want this, so make it available in the common
dir to ease future merges.  It isn't used directly in libgloss so
it should be harmless as-is.

2 years agonewlib: libm: drop unused config.h.in file
Mike Frysinger [Mon, 24 Jan 2022 03:46:59 +0000 (22:46 -0500)]
newlib: libm: drop unused config.h.in file

Not sure how this snuck in.  It's never been used in libm/, so punt it.

2 years agoCygwin: ACLs: don't set indicator for default ACEs prematurely
Corinna Vinschen [Tue, 25 Jan 2022 18:53:40 +0000 (19:53 +0100)]
Cygwin: ACLs: don't set indicator for default ACEs prematurely

Commit a2bfe7cae61a introduced a change ignoring default ACEs on files
to come up with a valid POSIX ACL, reflecting the Windows ACEs actually
making sense on files.

However, if CREATOR OWNER or CREATOR GROUP ACEs - both only making sense
as default ACEs - are found in the ACL, a value indicating the presence
of default ACEs gets set, even on files.  This in turn breaks a
subsequent integrity check and get_posix_access returns EINVAL.

The code path handling default ACEs on directories sets this indicator
anyway, so don't set it just because one of the above SIDs are found.

Fixes: a2bfe7cae61a ("Cygwin: ACLs: ignore *_INHERIT flags in file ACLs")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agonewlib: powerpc: move libc machine list to Makefile
Mike Frysinger [Sun, 23 Jan 2022 05:19:08 +0000 (00:19 -0500)]
newlib: powerpc: move libc machine list to Makefile

This makes the makefile logic a bit cleaner so we don't have two
files maintaining lists of sources & objects.  Since the logic is
tied to cpu capabilities, past those boolean settings down from
the configure logic to the makefile logic.

This will also make it easier to throw away the configure script
in a follow up commit and just keep the makefile.

2 years agonewlib: update preprocessor configure checks
Mike Frysinger [Sun, 23 Jan 2022 01:35:00 +0000 (20:35 -0500)]
newlib: update preprocessor configure checks

The nds32 & spu dirs are using compile tests to look for some
preprocessor defines, but we don't need to compile the code,
just preprocess it.  So switch to AC_PREPROC_IFELSE.

The sh dir is using a preprocessor test via grep, but let's
switch it to AC_PREPROC_IFELSE too to be consistent.

This should allow us to drop the uncommon AC_NO_EXECUTABLES call.

2 years agolibgloss: bfin: fix subdir install for sim files
Mike Frysinger [Mon, 24 Jan 2022 02:08:07 +0000 (21:08 -0500)]
libgloss: bfin: fix subdir install for sim files

When building in parallel, make sure the subdir for the sim files
exist before trying to install into them.

2 years agonewlib: punt unused LIBC_EXTRA_LIB settings
Mike Frysinger [Fri, 21 Jan 2022 12:04:19 +0000 (07:04 -0500)]
newlib: punt unused LIBC_EXTRA_LIB settings

This was added decades ago, but the commit message lacks any
explanation, and it was unused when it was merged.  It's still
unused today.  So punt it all.

2 years agonewlib: stop making .def generation conditional
Mike Frysinger [Fri, 21 Jan 2022 11:57:33 +0000 (06:57 -0500)]
newlib: stop making .def generation conditional

Generating these files is very cheap, so let's just do it all the time.
This makes the build logic simpler, and keeps errors for slipping in in
codepaths that are not well tested.  Creating these files doesn't mean
they'll be included in the manual implicitly.

For example, some of the nano stdio files break documentation because
they don't have any chew directives in them.  But no one noticed since
that code path is rarely enabled.  So drop the _i and _float def files.

2 years agonewlib: drop redundant CFLAGS export
Mike Frysinger [Fri, 21 Jan 2022 04:57:43 +0000 (23:57 -0500)]
newlib: drop redundant CFLAGS export

This is already handled by autotools for us automatically.  You can
tell as the generated output is exactly the same other than deleting
a few blank lines.

2 years agonewlib: stop clobbering LDFLAGS with non-standard $ldflags
Mike Frysinger [Fri, 21 Jan 2022 04:45:23 +0000 (23:45 -0500)]
newlib: stop clobbering LDFLAGS with non-standard $ldflags

It's unclear why this was added originally, but assuming it was needed
20 years ago, it shouldn't be explicitly required nowadays.  Current
versions of autotools already take care of exporting LDFLAGS to the
Makefile as needed (things are actually getting linked).  That's why
the configure diffs show LDFLAGS still here, but shifted to a diff
place in the output list.  A few dirs stop exporting LDFLAGS, but
that's because they don't do any linking, only compiling, so it's
correct.

As for the use of $ldflags instead of the standard $LDFLAGS, I can't
really explain that at all.  Just use the right name so users don't
have to dig into why their setting isn't respected, and then use a
non-standard name instead.  Adjust the testsuite to match.

2 years agonewlib: stop checking --enable-multilib in subdirs
Mike Frysinger [Fri, 21 Jan 2022 03:52:38 +0000 (22:52 -0500)]
newlib: stop checking --enable-multilib in subdirs

None of the subdirs actually use the multilib arg, so include the
logic only in the top-level configure.

2 years agonewlib: move to ../config/multi.m4 for multilib logic
Mike Frysinger [Fri, 21 Jan 2022 03:52:02 +0000 (22:52 -0500)]
newlib: move to ../config/multi.m4 for multilib logic

The current newlib multilib logic is almost exactly the same as the
config/multi.m4, and the differences should be minor, so switch over
to that to delete custom logic on ourside.

2 years agonewlib: punt unused template file
Mike Frysinger [Fri, 21 Jan 2022 04:00:45 +0000 (23:00 -0500)]
newlib: punt unused template file

This was needed by ancient versions of automake, but that hasn't been
the case since at least automake-1.5, so punt this unused stub.

2 years agonewlib: switch to autoconf long double macro
Mike Frysinger [Fri, 21 Jan 2022 03:47:47 +0000 (22:47 -0500)]
newlib: switch to autoconf long double macro

Now that we require a recent version of autoconf, we can rely on this
macro working.  This change was already made to libm, but these other
dirs were missed as I didn't notice it being duplicated in 3 places.

2 years agonewlib: switch newlib.h to autoheader
Mike Frysinger [Tue, 18 Jan 2022 01:10:38 +0000 (20:10 -0500)]
newlib: switch newlib.h to autoheader

Now that newlib.hin has been brought up to date and all of its defines
are produced by configure, we can switch it to using autoheader without
manual editing.  This relies on a few pieces:
* Moving the header & footer into configure.ac via AH_TOP & AH_BOTTOM.
* Running a post-process step on newlib.h to delete all the defines we
  didn't export ourselves.  Basically, anything without a _ prefix.

This will leave behind some spurious comments in newlib.h related to
the defines we filtered out, but should be harmless, so it's probably
not worth the effort to construct a more complicated sed expression to
also strip those out.

2 years agonewlib: iconv: autogenerate iconv define list
Mike Frysinger [Tue, 18 Jan 2022 03:00:26 +0000 (22:00 -0500)]
newlib: iconv: autogenerate iconv define list

The list of iconv to/from defines is hand maintained in newlib.hin.
Lets leverage mkdeps.pl to generate this list automatically from the
list of known encodings.  The newlib.hin list is up-to-date, so the
list in iconv.m4 matches the list already generated.

2 years agonewlib: add missing _NANO_MALLOC to newlib.hin
Mike Frysinger [Tue, 18 Jan 2022 02:25:17 +0000 (21:25 -0500)]
newlib: add missing _NANO_MALLOC to newlib.hin

This was added to configure, but never to the header file.  Nothing
uses this currently, so it's not a big deal (as all the dynamic logic
is via automake conditionals), but might as well restore it now to
keep autoheader output in sync.

2 years agonewlib: move version defines out of the config headers
Mike Frysinger [Tue, 18 Jan 2022 02:17:54 +0000 (21:17 -0500)]
newlib: move version defines out of the config headers

This will make it easier to move newlib.h to use autoheader directly.
We only want the newlib version defines in our hand curated version
file, _newlib_version.h, not in the template header, newlib.h, so
using AC_DEFINE doesn't make much sense.

2 years agonewlib: sort newlib.h output
Mike Frysinger [Tue, 18 Jan 2022 01:10:38 +0000 (20:10 -0500)]
newlib: sort newlib.h output

Sort the symbols lexically like autoheader does.  There are no other
changes in here.  This will make it easier to sync with autoheader.

2 years agonewlib: clean up autoheader templates
Mike Frysinger [Thu, 13 Jan 2022 04:05:16 +0000 (23:05 -0500)]
newlib: clean up autoheader templates

Sync these back from newlib.hin to configure.ac, and touchup some of
the forms to be consistent (like being full sentences).  Also use the
AC_DEFINE-vs-AC_DEFINE_UNQUOTED macros correctly.  This will make it
easier to re-enable autoheader for managing newlib.hin.

2 years agonewlib: merge acconfig.h changes into newlib.hin
Mike Frysinger [Tue, 18 Jan 2022 01:03:13 +0000 (20:03 -0500)]
newlib: merge acconfig.h changes into newlib.hin

The acconfig.h header was used to run autoheader and then manually
sync the output into newlib.hin.  Based on how the files have fallen
out of sync (with newlib.hin having many more templates), this has
not been run in a long time, and attempts to do so now would break
newlib.hin.

Further, if you try to run autoheader now, it will automatically
replace _newlib_version.hin since it's the first entry in the call
to AC_CONFIG_HEADERS.

So let's throw away acconfig.h entirely.  It only had 2 slightly
better comments, and the rest were either worse, missing, or stale.
This has the side benefit of avoiding autoheader warning about the
deprecated use of acconfig.h since newer autoconf only wants macro
calls in configure.ac.

2 years agonewlib: internalize HAVE_INITFINI_ARRAY
Mike Frysinger [Tue, 18 Jan 2022 03:20:20 +0000 (22:20 -0500)]
newlib: internalize HAVE_INITFINI_ARRAY

This define is only used by newlib internally, so stop exporting it
as HAVE_INITFINI_ARRAY since this can conflict with defines packages
use themselves.

We don't really need to add _ to HAVE_INIT_FINI too since it isn't
exported in newlib.h, but might as well be consistent here.

We can't (easily) add this to newlib_cflags like HAVE_INIT_FINI is
because this is based on a compile-time test in the top configure,
not on plain shell code in configure.host.  We'd have to replicate
the test in every subdir in order to have it passed down.

2 years agonewlib: libm: switch to autoconf long double macro
Mike Frysinger [Mon, 17 Jan 2022 05:42:53 +0000 (00:42 -0500)]
newlib: libm: switch to autoconf long double macro

Now that we require a recent version of autoconf, we can rely on this
macro working.  We shift the call in configure.ac down a little to
help keep the generated diff minimal -- there should be no functional
difference otherwise.  This is because the autoconf macros will call
a bunch of standard toolchain macros first, and arguably the current
code is incorrect in how it does its testing.

2 years agoCygwin: silence xsltproc when writing manpages
Jon Turney [Tue, 18 Jan 2022 20:52:46 +0000 (20:52 +0000)]
Cygwin: silence xsltproc when writing manpages

Unless make is invoked with V=1, have xmlto pass the parameter
'man.output.quietly=1' to xsltproc to suppress "Note: Writing foo.N"
output from the manpages stylesheet.

2 years agoCygwin: silence xsltproc when writing chunked html
Jon Turney [Tue, 18 Jan 2022 20:20:18 +0000 (20:20 +0000)]
Cygwin: silence xsltproc when writing chunked html

Unless make is invoked with V=1, have xmlto pass the parameter
'chunk.quietly=1' to xsltproc to suppress "Writing foo.html for
sect1(foo)" output from the chunker.xsl stylesheet.

2 years agoCygwin: silence dblatex when building PDFs
Jon Turney [Tue, 18 Jan 2022 18:17:38 +0000 (18:17 +0000)]
Cygwin: silence dblatex when building PDFs

Unless make is invoked with V=1, have xmlto pass '-q' to dblatex when
building PDFs, to supress repeated "default template used in
programlisting or screen" warnings from dblatex's verbatim.xsl
stylesheet.

2 years agoCygwin: silence most custom build rules
Jon Turney [Tue, 18 Jan 2022 17:06:15 +0000 (17:06 +0000)]
Cygwin: silence most custom build rules

2 years agoCygwin: resolver: cygwin_query() skip response header on internal error
Anton Lavrentiev via Cygwin-patches [Wed, 19 Jan 2022 13:12:55 +0000 (08:12 -0500)]
Cygwin: resolver: cygwin_query() skip response header on internal error

- When dn_comp() failed internally there is no longer any need to
fill the response header since it's now all cleared upon entry

2 years agoCygwin: Fix configure help for --{en,dis}able-doc option
Jon Turney [Tue, 18 Jan 2022 16:26:36 +0000 (16:26 +0000)]
Cygwin: Fix configure help for --{en,dis}able-doc option

Report '--disable-doc' in 'configure --help', as enable is the default.

2 years agoCygwin: add resolver fixes to release message
Corinna Vinschen [Wed, 19 Jan 2022 07:50:48 +0000 (08:50 +0100)]
Cygwin: add resolver fixes to release message

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: resolver: A few fixes for cygwin_query(), part 2
Anton Lavrentiev via Cygwin-patches [Wed, 19 Jan 2022 00:07:55 +0000 (19:07 -0500)]
Cygwin: resolver: A few fixes for cygwin_query(), part 2

Make sure Windows ResultSet is free'd when dn_comp failed internally

2 years agoCygwin: resolver: Targets in SRV DNS responses may not be compressed
Anton Lavrentiev via Cygwin-patches [Tue, 18 Jan 2022 22:39:16 +0000 (17:39 -0500)]
Cygwin: resolver: Targets in SRV DNS responses may not be compressed

RFC2782 clearly says so yet it's a common misconception to perform the
compression in the violation of the standard.  This patch fixes that

2 years agoCygwin: resolver: Fix to match response ID with request ID
Anton Lavrentiev via Cygwin-patches [Tue, 18 Jan 2022 22:39:15 +0000 (17:39 -0500)]
Cygwin: resolver: Fix to match response ID with request ID

In case when the native OS resolver is used (via os_query) the returned
response ID is always 0.  It should actually match the ID passed in to
res_send() in the DNS request header.  This patch fixes that

2 years agoCygwin: resolver: A few fixes for cygwin_query()
Anton Lavrentiev via Cygwin-patches [Tue, 18 Jan 2022 21:34:34 +0000 (16:34 -0500)]
Cygwin: resolver: A few fixes for cygwin_query()

- Make sure the answer buffer is properly cleared so there is no trailing
garbage when the response does not fit entirely in;
- Make sure an internal decomp failure gets reported correctly (w/return code -1);
- Make sure that the buffer is not overrun when filling out the header.

2 years agoCygwin: resolver: Process options forward (not backwards)
Anton Lavrentiev via Cygwin-patches [Tue, 18 Jan 2022 16:09:33 +0000 (11:09 -0500)]
Cygwin: resolver: Process options forward (not backwards)

Also, make sure the debug setting propagates to the parser of
the remainder of /etc/resolv.conf

2 years agonewlib: iconv: sort ccsbi.c contents
Mike Frysinger [Tue, 18 Jan 2022 02:41:37 +0000 (21:41 -0500)]
newlib: iconv: sort ccsbi.c contents

The current output doesn't happen to match what is produced on my
system, so force _iconv_ccs to be sorted like is already done in
the ccsbi.h header.

2 years agonewlib: iconv: sync mkdeps.pl with aliasesbi.c changes
Mike Frysinger [Tue, 18 Jan 2022 02:34:26 +0000 (21:34 -0500)]
newlib: iconv: sync mkdeps.pl with aliasesbi.c changes

Some changes were made to aliasesbi.c, but not to this file which
dynamically generates it.  Add those fixes to this file too.

2 years agonewlib: drop autoconf-2.59 workaround
Mike Frysinger [Tue, 18 Jan 2022 00:28:48 +0000 (19:28 -0500)]
newlib: drop autoconf-2.59 workaround

As the file comments say, this was a backport of an autoconf-2.60 fix,
and shouldn't matter for >autoconf-2.59 versions.  Drop it since we use
and require autoconf-2.69 now.

2 years agonewlib: enable automake subdir-objects in all dirs
Mike Frysinger [Mon, 17 Jan 2022 18:56:48 +0000 (13:56 -0500)]
newlib: enable automake subdir-objects in all dirs

Currently this is only enabled in the top-level as that's the only
place where it seemed to be used.  But the libc/sys/phoenix/ dir
also uses this functionality, but fails to explicitly enable it.
Automake workedaround it, but generated warnings.  Move the option
to NEWLIB_CONFIGURE so all dirs get it automatically iff they end
up using the option.  If they don't use the option, there's no
difference to the generated code.

2 years agonewlib: avoid duplicate awk checks
Mike Frysinger [Mon, 17 Jan 2022 18:14:06 +0000 (13:14 -0500)]
newlib: avoid duplicate awk checks

Since AM_INIT_AUTOMAKE calls AC_PROG_AWK, and some configure.ac
scripts call it too, we end up testing for awk multiple times.  If
we change NEWLIB_CONFIGURE to require the macro instead, then it
makes sure it's always expanded, but only once.

While we're here, do the same thing with AC_PROG_INSTALL since it
is also called by AM_INIT_AUTOMAKE, although it doesn't currently
result in duplicate configure checks.

2 years agonewlib: merge old AC_LIBTOOL_WIN32_DLL macro into LT_INIT
Mike Frysinger [Mon, 17 Jan 2022 17:45:10 +0000 (12:45 -0500)]
newlib: merge old AC_LIBTOOL_WIN32_DLL macro into LT_INIT

The AC_LIBTOOL_WIN32_DLL macro has been deprecated for a while and code
should call LT_INIT with win32-dll instead.  Update the calls to match.

The generated code is noisy not because of substantial differences, but
because the order of some macros change (i.e. instead of calling AS and
then CC, CC is called first and then AS).

2 years agonewlib: update libtool macro name
Mike Frysinger [Mon, 17 Jan 2022 17:29:21 +0000 (12:29 -0500)]
newlib: update libtool macro name

Replace old AM_PROG_LIBTOOL name with LT_INIT.  There's no change to
the generated files since they're aliases internally.

2 years agonewlib: delete (most) redundant lib_a_CCASFLAGS=$(AM_CCASFLAGS)
Mike Frysinger [Thu, 30 Dec 2021 19:32:09 +0000 (14:32 -0500)]
newlib: delete (most) redundant lib_a_CCASFLAGS=$(AM_CCASFLAGS)

Since automake already sets per-library CCASFLAGS to $(AM_CCASFLAGS)
by default, there's no need to explicitly set it here.

Many of these dirs don't have .S files in the first place, so the rule
doesn't even do anything.  That can easily be seen when Makefile.in has
no changes as a result.

For the dirs with .S files, the custom rules are the same as the pattern
.S.o rules, so this is a nice cleanup.

The only dir that was adding extra flags (newlib/libc/machine/mn10300/)
to the per-library setting can have it moved to the global AM_CCASFLAGS
since the subdir only has one target.  Although the setting just adds
extra debugging flags, so maybe it should be deleted in general.

There are a few dirs that we leave the redundant setting in place.  This
is to workaround an automake limitation in subdirs that support building
with & w/out libtool:
https://www.gnu.org/software/automake/manual/html_node/Objects-created-both-with-libtool-and-without.html

2 years agoCygwin: fhandler_base: Fix double free caused when open() fails.
Takashi Yano [Tue, 18 Jan 2022 13:17:37 +0000 (22:17 +0900)]
Cygwin: fhandler_base: Fix double free caused when open() fails.

- When open fails, archetype stored in archetypes[] is not cleared.
  This causes double free when next open fail. This patch fixes the
  issue.

Addresses:
  https://cygwin.com/pipermail/cygwin/2022-January/250518.html

2 years agoCygwin: add release text for last two patches
Corinna Vinschen [Tue, 18 Jan 2022 10:57:14 +0000 (11:57 +0100)]
Cygwin: add release text for last two patches

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: path_conv: do not get confused by a directory with `.lnk` suffix
Johannes Schindelin [Mon, 17 Jan 2022 20:20:45 +0000 (21:20 +0100)]
Cygwin: path_conv: do not get confused by a directory with `.lnk` suffix

When trying to create a directory called `xyz` in the presence of a
directory `xyz.lnk`, the Cygwin runtime errors out with an `ENOENT`.

The root cause is actually a bit deeper: the `symlink_info::check()`
method tries to figure out whether the given path refers to a symbolic
link as emulated via `.lnk` files, but since it is a directory, that is
not the case, and that hypothesis is rejected.

However, the `fileattr` field is not cleared, so that a later
`.exists()` call on the instance mistakenly thinks that the symlink
actually exists. Let's clear that field.

This fixes https://github.com/msys2/msys2-runtime/issues/81

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2 years agoCygwin: resolver: Added processing of AAAA records
Anton Lavrentiev via Cygwin-patches [Mon, 17 Jan 2022 18:03:14 +0000 (13:03 -0500)]
Cygwin: resolver: Added processing of AAAA records

AAAA records returned from Windows resolver were flagged as "No
structure" in debug output because of being processed (although
correctly) in the default catch-all case.  This patch makes the AAAA
records properly recognized.

2 years agoCygwin: resolver: A little more consistency in debug messages
Anton Lavrentiev via Cygwin-patches [Mon, 17 Jan 2022 18:03:13 +0000 (13:03 -0500)]
Cygwin: resolver: A little more consistency in debug messages

2 years agoCygwin: resolver: Format spec consistency for Windows errors
Anton Lavrentiev via Cygwin-patches [Mon, 17 Jan 2022 18:03:12 +0000 (13:03 -0500)]
Cygwin: resolver: Format spec consistency for Windows errors

2 years agoCygwin: resolver: Debug to output both IP and port # in native b.o.
Anton Lavrentiev via Cygwin-patches [Mon, 17 Jan 2022 18:03:10 +0000 (13:03 -0500)]
Cygwin: resolver: Debug to output both IP and port # in native b.o.

Also, change a few other debug output spots for consistency

2 years agoUse matching format for NTSTATUS
Anton Lavrentiev via Cygwin-patches [Fri, 14 Jan 2022 22:10:13 +0000 (17:10 -0500)]
Use matching format for NTSTATUS

2 years agoFix format specifier for wide-char string
Anton Lavrentiev via Cygwin-patches [Fri, 14 Jan 2022 22:10:12 +0000 (17:10 -0500)]
Fix format specifier for wide-char string

2 years agolibgloss: clean up redundant shared lib warnings
Mike Frysinger [Mon, 17 Jan 2022 08:58:13 +0000 (03:58 -0500)]
libgloss: clean up redundant shared lib warnings

Use standard AC_MSG_WARN macro in the top-level configure, and delete
the message from all the subdirs.  There's no need to issue this more
than once per libgloss build.

2 years agoMerge autoconf / automake update changes from GCC.
Joseph Myers [Wed, 31 Oct 2018 17:10:56 +0000 (17:10 +0000)]
Merge autoconf / automake update changes from GCC.

Top level:
Merge from GCC:
PR bootstrap/82856
* multilib.am: New file.  From automake.

config:
Merge from GCC:
PR bootstrap/82856
* math.m4, tls.m4: Use AC_LANG_SOURCE.

zlib:
Merge from GCC.
PR bootstrap/82856
* Makefile.am: Include multilib.am.
* Makefile.in: Regenerate.

2 years agonewlib: update to automake-1.15
Mike Frysinger [Fri, 31 Dec 2021 00:22:10 +0000 (19:22 -0500)]
newlib: update to automake-1.15

This matches what the other GNU toolchain projects have done already.
The generated diff in practice isn't terribly large.  This will allow
more use of subdir local.mk includes due to fixes & improvements that
came after the 1.11 release series.

2 years agorequire autoconf-2.69 exactly
Mike Frysinger [Thu, 30 Dec 2021 18:29:02 +0000 (13:29 -0500)]
require autoconf-2.69 exactly

The newlib & libgloss dirs are already generated using autoconf-2.69.
To avoid merging new code and/or accidental regeneration using diff
versions, leverage config/override.m4 to pin to 2.69 exactly.  This
matches what gcc/binutils/gdb are already doing.

The README file already says to use autoconf-2.69.

To accomplish this, it's just as simple as adding -I flags to the
top-level config/ dir when running aclocal.  This is because the
override.m4 file overrides AC_INIT to first require the specific
autoconf version before calling the real AC_INIT.

2 years agoCygwin: pty: Fix race issue between closing and opening master.
Takashi Yano [Fri, 14 Jan 2022 10:35:12 +0000 (19:35 +0900)]
Cygwin: pty: Fix race issue between closing and opening master.

- If the from_master is closed before cleaning up other pipes, such
  as from_slave_nat, the same pty may be allocated and pty master may
  try to open the pipe which is not closed yet, and it will fail.
  This patch fixes the issue.

2 years agoCygwin: console: Fix potential deadlock regarding acuqiring mutex.
Takashi Yano [Thu, 13 Jan 2022 11:57:15 +0000 (20:57 +0900)]
Cygwin: console: Fix potential deadlock regarding acuqiring mutex.

- Acquiring input_mutex and attach_mutex in console code has potential
  risk of deadlock. This patch fixes the issue.

2 years agoCygwin: pty: Stop closing and recreating attach_mutex.
Takashi Yano [Thu, 13 Jan 2022 10:44:43 +0000 (19:44 +0900)]
Cygwin: pty: Stop closing and recreating attach_mutex.

- Closing attach_mutex and recreating it causes the race issue
  between pty and console codes. With this patch, attach_mutex
  is created only once in a process which opens pty, and never
  closed in order to avoid this issue.

Addresses:
  https://cygwin.com/pipermail/cygwin-developers/2021-December/012548.html

2 years agoCygwin: pty: Fix memory leak in master_fwd_thread.
Takashi Yano [Thu, 13 Jan 2022 09:18:00 +0000 (18:18 +0900)]
Cygwin: pty: Fix memory leak in master_fwd_thread.

- If master_fwd_thread is terminated by cygthread::terminate_thread(),
  the opportunity to release tmp_pathbuf is missed, resulting in a
  memory leak. This patch fixes the issue.

2 years agoCygwin: pty, console: Fix deadlock in GDB regarding mutex.
Takashi Yano [Thu, 13 Jan 2022 09:16:31 +0000 (18:16 +0900)]
Cygwin: pty, console: Fix deadlock in GDB regarding mutex.

- GDB inferior may be suspended while the inferior grabs mutex.
  This causes deadlock in terminal I/O. With this patch, timeout
  for waiting mutex is set to 0 for the debugger process when the
  process calls CreateProcess() with DEBUG_PROCESS flag to avoid
  deadlock. This may cause the race issue in GDB, however, there
  is no other way than that.

Addresses:
 https://cygwin.com/pipermail/cygwin-developers/2021-December/012542.html

2 years agoCygwin: doc: drop mention of 32-bit installer
Jon Turney [Mon, 10 Jan 2022 18:22:17 +0000 (18:22 +0000)]
Cygwin: doc: drop mention of 32-bit installer

Drop mention of 32-bit installer, since it's offically discouraged, and
planned to be dropped soon.

Adjust various references to be something more generic, like 'the Cygwin
Setup program' to accommodate this.

2 years agofhandler_proc.cc(format_proc_cpuinfo): add Linux 5.16 Gobble Gobble flags
Brian Inglis [Wed, 12 Jan 2022 06:04:31 +0000 (23:04 -0700)]
fhandler_proc.cc(format_proc_cpuinfo): add Linux 5.16 Gobble Gobble flags

0x00000007:1 Intel Advanced Matrix eXtensions:
 EAX:22 amx_bf16 Brain Float 16 dot product
 EAX:24 amx_tile Tile matrix multiply
 EAX:25 amx_int8 Int 8 byte dot product
0x80000008:0 AMD EBX:27 cppc      Collaborative Processor Performance Control

2 years agolibtool.m4: fix nm BSD flag detection
Nick Alcock [Mon, 27 Sep 2021 19:31:21 +0000 (20:31 +0100)]
libtool.m4: fix nm BSD flag detection

Libtool needs to get BSD-format (or MS-format) output out of the system
nm, so that it can scan generated object files for symbol names for
-export-symbols-regex support.  Some nms need specific flags to turn on
BSD-formatted output, so libtool checks for this in its AC_PATH_NM.
Unfortunately the code to do this has a pair of interlocking flaws:

 - it runs the test by doing an nm of /dev/null.  Some platforms
   reasonably refuse to do an nm on a device file, but before now this
   has only been worked around by assuming that the error message has a
   specific textual form emitted by Tru64 nm, and that getting this
   error means this is Tru64 nm and that nm -B would work to produce
   BSD-format output, even though the test never actually got anything
   but an error message out of nm -B.  This is fixable by nm'ing *nm
   itself* (since we necessarily have a path to it).

 - the test is entirely skipped if NM is set in the environment, on the
   grounds that the user has overridden the test: but the user cannot
   reasonably be expected to know that libtool wants not only nm but
   also flags forcing BSD-format output.  Worse yet, one such "user" is
   the top-level Cygnus configure script, which neither tests for
   nor specifies any BSD-format flags.  So platforms needing BSD-format
   flags always fail to set them when run in a Cygnus tree, breaking
   -export-symbols-regex on such platforms.  Libtool also needs to
   augment $LD on some platforms, but this is done unconditionally,
   augmenting whatever the user specified: the nm check should do the
   same.

   One wrinkle: if the user has overridden $NM, a path might have been
   provided: so we use the user-specified path if there was one, and
   otherwise do the path search as usual.  (If the nm specified doesn't
   work, this might lead to a few extra pointless path searches -- but
   the test is going to fail anyway, so that's not a problem.)

(Tested with NM unset, and set to nm, /usr/bin/nm, my-nm where my-nm is a
symlink to /usr/bin/nm on the PATH, and /not-on-the-path/my-nm where
*that* is a symlink to /usr/bin/nm.)

ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

PR libctf/27967
* libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided
NM, if there is one.  Run nm on itself, not on /dev/null, to avoid
errors from nms that refuse to work on non-regular files.  Remove
other workarounds for this problem.  Strip out blank lines from the
nm output.

2 years agolibtool.m4: augment symcode for Solaris 11
Nick Alcock [Mon, 27 Sep 2021 19:31:21 +0000 (20:31 +0100)]
libtool.m4: augment symcode for Solaris 11

This reports common symbols like GNU nm, via a type code of 'C'.

ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

PR libctf/27967
* libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for
Solaris 11.

2 years agoAdd support for the haiku operating system. These are the os support patches we have...
Alexander von Gluck IV [Thu, 2 Sep 2021 11:19:14 +0000 (12:19 +0100)]
Add support for the haiku operating system. These are the os support patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time.

2 years agoGCC: Check if AR works with --plugin and rc
H.J. Lu [Tue, 12 Jan 2021 00:26:39 +0000 (16:26 -0800)]
GCC: Check if AR works with --plugin and rc

AR from older binutils doesn't work with --plugin and rc:

[hjl@gnu-cfl-2 bin]$ touch foo.c
[hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c
[hjl@gnu-cfl-2 bin]$ ./ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c
./ar: no operation specified
[hjl@gnu-cfl-2 bin]$ ./ar --version
GNU ar (Linux/GNU Binutils) 2.29.51.0.1.20180112
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
[hjl@gnu-cfl-2 bin]$

Check if AR works with --plugin and rc before passing --plugin to AR and
RANLIB.

PR ld/27173
* configure: Regenerated.
* libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with
--plugin and rc before enabling --plugin.

config/

PR ld/27173
* gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with
--plugin and rc before enabling --plugin.

libiberty/

PR ld/27173
* configure: Regenerated.

zlib/

PR ld/27173
* configure: Regenerated.

2 years agoGCC: Pass --plugin to AR and RANLIB
H.J. Lu [Sat, 9 Jan 2021 14:43:11 +0000 (06:43 -0800)]
GCC: Pass --plugin to AR and RANLIB

Detect GCC LTO plugin.  Pass --plugin to AR and RANLIB to support LTO
build.

* Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@
(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
* configure.ac: Include config/gcc-plugin.m4.
AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION.
* libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and
RANLIB if possible.
* Makefile.in: Regenerated.
* configure: Likewise.

config/

* gcc-plugin.m4 (GCC_PLUGIN_OPTION): New.

libiberty/

* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
(configure_deps): Depend on ../config/gcc-plugin.m4.
* aclocal.m4: Include ../config/gcc-plugin.m4.
* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
RANLIB_PLUGIN_OPTION.
* configure: Regenerated.

zlib/

* configure: Regenerated.

2 years agolibtool.m4: update GNU/Hurd test from upstream. In upstream libtool, 47a889a4ca20...
Samuel Thibault [Thu, 7 Jan 2021 16:47:36 +0000 (16:47 +0000)]
libtool.m4: update GNU/Hurd test from upstream. In upstream libtool, 47a889a4ca20 ("Improve GNU/Hurd support.") fixed detection of shlibpath_overrides_runpath, thus avoiding unnecessary relink. This backports it.

. * libtool.m4: Match gnu* along other GNU systems.

*/ChangeLog:

* configure: Re-generate.

2 years agoBump to autoconf 2.69 and automake 1.15.1
Simon Marchi [Tue, 19 Jun 2018 20:54:48 +0000 (16:54 -0400)]
Bump to autoconf 2.69 and automake 1.15.1

When trying to run the update-gnulib.sh script in gdb, I get this:

Error: Wrong automake version (Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^      =:+{}]+)}/ at /opt/automake/1.11.1/bin/automake line 4113.), we need 1.11.1.
Aborting.

Apparently, it's an issue with a regex in automake that triggers a
warning starting with Perl 5.22.  It has been fixed in automake 1.15.1.
So I think it's a good excuse to bump the versions of autoconf and
automake used in the gnulib import.  And to avoid requiring multiple
builds of autoconf/automake, it was suggested that we bump the required
version of those tools for all binutils-gdb.

For autoconf, the 2.69 version is universally available, so it's an easy
choice.  For automake, different distros and distro versions have
different automake versions.  But 1.15.1 seems to be the most readily
available as a package.  In any case, it's easy to build it from source.

I removed the version checks from AUTOMAKE_OPTIONS and AC_PREREQ,
because I don't think they are useful in our case.  They only specify a
lower bound for the acceptable version of automake/autoconf.  That's
useful if you let the user choose the version of the tool they want to
use, but want to set a minimum version (because you use a feature that
was introduced in that version).  In our case, we force people to use a
specific version anyway.  For the autoconf version, we have the check in
config/override.m4 that enforces the version we want.  It will be one
less thing to update next time we change autotools version.

I hit a few categories of problems that required some changes.  They are
described below along with the chosen solutions.

Problem 1:

  configure.ac:17: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
  configure.ac:17: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

Solution 1:

  Adjust the code based on the example at that URL.

Problem 2 (in zlib/):

  Makefile.am: error: required file './INSTALL' not found
  Makefile.am:   'automake --add-missing' can install 'INSTALL'
  Makefile.am: error: required file './NEWS' not found
  Makefile.am: error: required file './AUTHORS' not found
  Makefile.am: error: required file './COPYING' not found
  Makefile.am:   'automake --add-missing' can install 'COPYING'

Solution 2:

  Add the foreign option to AUTOMAKE_OPTIONS.

Problem 3:

  doc/Makefile.am:20: error: support for Cygnus-style trees has been removed

Solution 3:

  Remove the cygnus options.

Problem 4:

  Makefile.am:656: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

Solution 4:

  Rename "INCLUDES = " to "AM_CPPFLAGS += " (because AM_CPPFLAGS is
  already defined earlier).

Problem 5:

  doc/Makefile.am:71: warning: suffix '.texinfo' for Texinfo files is discouraged; use '.texi' instead
  doc/Makefile.am: warning: Oops!
  doc/Makefile.am:     It appears this file (or files included by it) are triggering
  doc/Makefile.am:     an undocumented, soon-to-be-removed automake hack.
  doc/Makefile.am:     Future automake versions will no longer place in the builddir
  doc/Makefile.am:     (rather than in the srcdir) the generated '.info' files that
  doc/Makefile.am:     appear to be cleaned, by e.g. being listed in CLEANFILES or
  doc/Makefile.am:     DISTCLEANFILES.
  doc/Makefile.am:     If you want your '.info' files to be placed in the builddir
  doc/Makefile.am:     rather than in the srcdir, you have to use the shiny new
  doc/Makefile.am:     'info-in-builddir' automake option.

Solution 5:

  Rename .texinfo files to .texi.

Problem 6:

  doc/Makefile.am: warning: Oops!
  doc/Makefile.am:     It appears this file (or files included by it) are triggering
  doc/Makefile.am:     an undocumented, soon-to-be-removed automake hack.
  doc/Makefile.am:     Future automake versions will no longer place in the builddir
  doc/Makefile.am:     (rather than in the srcdir) the generated '.info' files that
  doc/Makefile.am:     appear to be cleaned, by e.g. being listed in CLEANFILES or
  doc/Makefile.am:     DISTCLEANFILES.
  doc/Makefile.am:     If you want your '.info' files to be placed in the builddir
  doc/Makefile.am:     rather than in the srcdir, you have to use the shiny new
  doc/Makefile.am:     'info-in-builddir' automake option.

Solution 6:

  Remove the hack at the bottom of doc/Makefile.am and use
  the info-in-builddir automake option.

Problem 7:

  doc/Makefile.am:35: error: required file '../texinfo.tex' not found
  doc/Makefile.am:35:   'automake --add-missing' can install 'texinfo.tex'

Solution 7:

  Use the no-texinfo.tex automake option.  We also have one in
  texinfo/texinfo.tex, not sure if we should point to that, or move it
  (or a newer version of it added with automake --add-missing) to
  top-level.

Problem 8:

  Makefile.am:131: warning: source file 'config/tc-aarch64.c' is in a subdirectory,
  Makefile.am:131: but option 'subdir-objects' is disabled
  automake: warning: possible forward-incompatibility.
  automake: At least a source file is in a subdirectory, but the 'subdir-objects'
  automake: automake option hasn't been enabled.  For now, the corresponding output
  automake: object file(s) will be placed in the top-level directory.  However,
  automake: this behaviour will change in future Automake versions: they will
  automake: unconditionally cause object files to be placed in the same subdirectory
  automake: of the corresponding sources.
  automake: You are advised to start using 'subdir-objects' option throughout your
  automake: project, to avoid future incompatibilities.

Solution 8:

  Use subdir-objects, that means adjusting references to some .o that will now
  be in config/.

Problem 9:

  configure.ac:375: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
  ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
  ../../lib/autoconf/general.m4:2601: _AC_COMPILE_IFELSE is expanded from...
  ../../lib/autoconf/general.m4:2617: AC_COMPILE_IFELSE is expanded from...
  ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
  ../../lib/autoconf/general.m4:2042: AC_CACHE_VAL is expanded from...
  ../../lib/autoconf/general.m4:2063: AC_CACHE_CHECK is expanded from...
  configure.ac:375: the top level

Solution 9:

  Use AC_LANG_SOURCE, or use proper quoting.

Problem 10 (in intl/):

  configure.ac:7: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
  /usr/share/aclocal/threadlib.m4:36: gl_THREADLIB_EARLY_BODY is expanded from...
  /usr/share/aclocal/threadlib.m4:29: gl_THREADLIB_EARLY is expanded from...
  /usr/share/aclocal/threadlib.m4:318: gl_THREADLIB is expanded from...
  /usr/share/aclocal/lock.m4:9: gl_LOCK is expanded from...
  /usr/share/aclocal/intl.m4:211: gt_INTL_SUBDIR_CORE is expanded from...
  /usr/share/aclocal/intl.m4:25: AM_INTL_SUBDIR is expanded from...
  /usr/share/aclocal/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
  configure.ac:7: the top level

Solution 10:

  Add AC_USE_SYSTEM_EXTENSIONS in configure.ac.

ChangeLog:

* libtool.m4: Use AC_LANG_SOURCE.
* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
* README-maintainer-mode: Update version requirements.
* ar-lib: New file.
* test-driver: New file.
* configure: Re-generate.

bfd/ChangeLog:

* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
(INCLUDES): Rename to ...
(AM_CPPFLAGS): ... this.
* configure.ac: Remove AC_PREREQ.
* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
info-in-builddir no-texinfo.tex.
(info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
* doc/bfd.texinfo: Rename to ...
* doc/bfd.texi: ... this.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* config.in: Re-generate.
* configure: Re-generate.
* doc/Makefile.in: Re-generate.

binutils/ChangeLog:

* configure.ac: Remove AC_PREREQ.
* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, add
info-in-builddir no-texinfo.tex.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* config.in: Re-generate.
* configure: Re-generate.
* doc/Makefile.in: Re-generate.

config/ChangeLog:

* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.

etc/ChangeLog:

* configure.in: Remove AC_PREREQ.
* configure: Re-generate.

gas/ChangeLog:

* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11, add subdir-objects.
(TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O): Add config/ prefix.
* configure.ac (TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O, emfiles,
extra_objects): Add config/ prefix.
* doc/as.texinfo: Rename to...
* doc/as.texi: ... this.
* doc/Makefile.am: Rename as.texinfo to as.texi throughout.
Remove DISTCLEANFILES hack.
(AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add no-texinfo.tex and
info-in-builddir.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* config.in: Re-generate.
* configure: Re-generate.
* doc/Makefile.in: Re-generate.

gdb/ChangeLog:

* common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
* configure.ac: Remove AC_PREREQ, add missing quoting.
* gnulib/configure.ac: Modernize usage of
AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
* gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
(AUTOMAKE_VERSION): Bump to 1.15.1.
* configure: Re-generate.
* config.in: Re-generate.
* aclocal.m4: Re-generate.
* gnulib/aclocal.m4: Re-generate.
* gnulib/config.in: Re-generate.
* gnulib/configure: Re-generate.
* gnulib/import/Makefile.in: Re-generate.

gdb/gdbserver/ChangeLog:

* configure.ac: Remove AC_PREREQ, add missing quoting.
* configure: Re-generate.
* config.in: Re-generate.
* aclocal.m4: Re-generate.

gdb/testsuite/ChangeLog:

* configure.ac: Remove AC_PREREQ.
* configure: Re-generate.

gold/ChangeLog:

* configure.ac: Remove AC_PREREQ, add missing quoting and usage
of AC_LANG_SOURCE.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.
* testsuite/Makefile.in: Re-generate.

gprof/ChangeLog:

* configure.ac: Remove AC_PREREQ.
* Makefile.am: Remove DISTCLEANFILES hack.
(AUTOMAKE_OPTIONS): Remove 1.11, add info-in-builddir.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.
* gconfig.in: Re-generate.

intl/ChangeLog:

* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
* configure: Re-generate.
* config.h.in: Re-generate.
* aclocal.m4: Re-generate.

ld/ChangeLog:

* configure.ac: Remove AC_PREREQ.
* Makefile.am: Remove DISTCLEANFILES hack, rename ld.texinfo to
ld.texi, ldint.texinfo to ldint.texi throughout.
(AUTOMAKE_OPTIONS): Add info-in-builddir.
* README: Rename ld.texinfo to ld.texi, ldint.texinfo to
ldint.texi throughout.
* gen-doc.texi: Likewise.
* h8-doc.texi: Likewise.
* ld.texinfo: Rename to ...
* ld.texi: ... this.
* ldint.texinfo: Rename to ...
* ldint.texi: ... this.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* config.in: Re-generate.
* configure: Re-generate.

libdecnumber/ChangeLog:

* configure.ac: Remove AC_PREREQ.
* configure: Re-generate.
* aclocal.m4.

libiberty/ChangeLog:

* configure.ac: Remove AC_PREREQ.
* configure: Re-generate.
* config.in: Re-generate.

opcodes/ChangeLog:

* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
* configure.ac: Remove AC_PREREQ.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.

readline/ChangeLog.gdb:

* configure: Re-generate.
* examples/rlfe/configure: Re-generate.

sim/ChangeLog:

* All configure.ac: Remove AC_PREREQ.
* All configure: Re-generate.

zlib/ChangeLog.bin-gdb:

* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add
foreign.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.

2 years agonewlib: regen aclocal.m4 after autoconf update
Mike Frysinger [Wed, 12 Jan 2022 11:53:06 +0000 (06:53 -0500)]
newlib: regen aclocal.m4 after autoconf update

The configure scripts were regenerated with 2.69 for the newlib-4.2.0
release in 484d2ebf8d825b28af47b8ee88cd845f1d2c7c6e, but the aclocal
files were not.  Do that now to avoid confusion between the two as to
which version of autoconf was used.

2 years agoposix_spawn: fix get/set uid/gid calls for 32 bit Cygwin
Corinna Vinschen [Wed, 12 Jan 2022 10:57:35 +0000 (11:57 +0100)]
posix_spawn: fix get/set uid/gid calls for 32 bit Cygwin

32 bit Cygwin still exports function calls to support old applications.
E. g., when switching from 16 to 32 bit uid/gid values, new function
like getuid32 have been added and the old getuid function still only
provides 16 bit values.  Newly built applications using getuid are
actually calling getuid32.

However, this link magic isn't performed inside Cygwin itself, so if
newlib functions call getuid, they actually call the old getuid, not
the new getuid32.  This leads to truncated uid/gid values.

https://cygwin.com/pipermail/cygwin/2022-January/250453.html reports
how this leads to problems in posix_spawn.

Fix this temporarily. i686 support will go away soon in Cygwin and the
fix can be dropped.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: Makefile: add dependency to newlib's libs
Corinna Vinschen [Wed, 12 Jan 2022 10:45:54 +0000 (11:45 +0100)]
Cygwin: Makefile: add dependency to newlib's libs

We need deps to newlib's libc.a and libm.a, otherwise changes
in newlib code don't trigger a rebuild of the Cygwin DLL.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: ACLs: ignore *_INHERIT flags in file ACLs
Corinna Vinschen [Tue, 11 Jan 2022 21:20:47 +0000 (22:20 +0100)]
Cygwin: ACLs: ignore *_INHERIT flags in file ACLs

get_posix_access() creates DEF_*_OBJ aclent_t entries from Windows ACEs
with INHERIT flags set, independent of the file type.  These flags only
make sense on directory objects, but certain Windows functions don't
check the file type and allow INHERIT ACE flags even on non-directories.

As a fix, make sure to ignore the INHERIT flags on non-directory ACLs
and don't propagate the matching DEF_*_OBJ aclent_t entries to callers.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agopowerpc/setjmp: Improve RTEMS support
Sebastian Huber [Mon, 10 Jan 2022 08:00:59 +0000 (09:00 +0100)]
powerpc/setjmp: Improve RTEMS support

For some RTEMS multilibs, the FPU and Altivec units are disabled during
interrupt handling.  Do not save and restore the corresponding registers in
this case.

2 years agolibgloss: hardcode AC_CONFIG_AUX_DIR path
Mike Frysinger [Fri, 7 Jan 2022 05:53:26 +0000 (00:53 -0500)]
libgloss: hardcode AC_CONFIG_AUX_DIR path

In order to transition to automake, we have to use hardcoded paths in
the AC_CONFIG_AUX_DIR macro call (since automake evaluates the path
itself, and doesn't expand vars), so simplify all the calls here.

This page took 0.083386 seconds and 5 git commands to generate.