Takashi Yano [Thu, 3 Feb 2022 03:00:14 +0000 (12:00 +0900)]
Cygwin: path: Fix UNC path handling for SMB3 mounted to a drive.
- If an UNC path is mounted to a drive using SMB3.11, accessing to
the drive fails with error "Too many levels of symbolic links."
This patch fixes the issue.
A single Makefile rule creates three files in three steps, the second
and third one never showing up in dependencies. The next step creating
the link lib only depends on the first of these files. Even if the
second or third step in the DLL build rule fails, the next make
invocation never picks up on this and just goes ahead creating the
link lib.
Fix this by splitting the DLL build rule into three rules, with
every step on the way depending on the previous rule. Also fix up
the names, TEST_DLL_NAME just doesn't cut it.
Mike Frysinger [Mon, 24 Jan 2022 04:24:52 +0000 (23:24 -0500)]
libgloss: move to ../config/multi.m4 for multilib logic
The current libgloss 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.
The insertions here look larger and that's because none of the scripts
were declaring --enable-multilib explicitly even though they checked the
flag and changed behavior.
Mike Frysinger [Mon, 24 Jan 2022 05:12:58 +0000 (00:12 -0500)]
libgloss: merge epiphany & libnosys & or1k configure scripts up a level
These subdirs have unique configure scripts to do some compiler tests.
The checks should work for all targets, so hoist them up to the top
libgloss dir. This should allow us to delete these subdir configure
scripts.
It means the top-level gains autoheader support, but that's fine.
It wasn't exporting any defines previously (i.e. -D into CPPFLAGS),
and all of the defines it now exports are only used by code in the
libnosys subdir which was expecting to have a config.h.
Mike Frysinger [Wed, 2 Feb 2022 02:37:00 +0000 (21:37 -0500)]
newlib: rename libc_cv_ prefix to newlib_cv_
We've been using both libc_cv_ and newlib_cv_ for our cache vars.
Let's consolidate on newlib_cv_ to avoid conflicts with glibc which
is already using the libc_cv_ prefix.
Mike Frysinger [Fri, 28 Jan 2022 10:17:46 +0000 (05:17 -0500)]
newlib: add AC_CACHE_CHECK sugar around preprocessor checks
This isn't strictly necessary, but it makes for much clearer logs as
to what the target is doing, and provides cache vars for anyone who
wants to force the test a different way, and it lets the build cache
its own results when rerunning config.status.
Mike Frysinger [Tue, 1 Feb 2022 23:13:53 +0000 (18:13 -0500)]
newlib: delete unused iconvdata subdir config
Since commit dcbff9eea71d06454e7d55d6b7e72672c0987d6d ("newlib: merge
iconvdata into top-level Makefile"), there is no configure script in
the iconvdata/ subdir, so this call will just issue a warning and not
do anything useful. Punt it.
Mike Frysinger [Fri, 28 Jan 2022 10:12:54 +0000 (05:12 -0500)]
newlib: fix preprocessor checks
Restore the call to AC_NO_EXECUTABLES -- I naively assumed in commit 2e9aa5f56cc26a411014a7f788423c670cfb5646 ("newlib: update preprocessor
configure checks") that checking for a preprocessor would not involve
linking code. Unfortunately, autoconf will implicitly check that the
compiler "works" before allowing it to be used, and that involves a
link test, and that fails because newlib provides the C library which
is needed to pass a link test.
There is some code in NEWLIB_CONFIGURE specifically to help mitigate
these, but it's not kicking in here for some reason, so let's just add
the AC_NO_EXECUTABLES call back until we can unwind that custom logic.
Additionally, we have to call AC_PROG_CPP explicitly. This was being
invoked later on, but only in the use_libtool=yes codepath, and that
is almost never enabled.
Mike Frysinger [Fri, 28 Jan 2022 00:29:14 +0000 (19:29 -0500)]
newlib: fix cygwin -I path
This code snippet assumed it was only ever run in the top configure
script where srcdir would point to newlib/ which is parallel to the
winsup/ tree. This is incorrect for all of the subdir configure
scripts leading to bad -I flags in $(CC). Switch it over to the
new abs_newlib_basedir which should work in all subdirs.
Mike Frysinger [Fri, 28 Jan 2022 00:24:16 +0000 (19:24 -0500)]
newlib: use abs_newlib_basedir for -I paths
When we had configure scripts in subdirs, the newlib_basedir value
was computed relative to that, and it'd be the same when used in the
Makefile in the same dir. With many subdir configure scripts removed,
the top-level configure & Makefile can't use the same relative path.
So switch the subdir Makefiles over to abs_newlib_basedir when they
use -I to find source headers.
Do this for all subdirs, even ones with configure scripts and where
newlib_basedir works. This makes the code consistent, and avoids
surprises if the configure script is ever removed in the future as
part of merging to the higher level.
Some of the subdirs were using -I$(newlib_basedir)/../newlib/ for
some reason. Collapse those too since newlib_basedir points to the
newlib source tree already.
Mike Frysinger [Fri, 28 Jan 2022 00:17:04 +0000 (19:17 -0500)]
newlib: export abs_newlib_basedir for all subdirs
When using the top-level configure script but subdir Makefiles, the
newlib_basedir value gets a bit out of sync: it's relative to where
configure lives, not where the Makefile lives. Move the abs setting
from the top-level configure script into acinclude.m4 so we can rely
on it being available everywhere. Although this commit doesn't use
it anywhere, just lays the groundwork.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
- 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.
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.
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.
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.
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).
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
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>
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.
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.
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.
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.
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.
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.
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.