Takashi Yano [Mon, 28 Feb 2022 11:02:01 +0000 (20:02 +0900)]
Cygwin: console: Improve the code to avoid typeahead key swapping.
- The commit "Cygwin: console: Prevent the order of typeahead input
from swapped." did not fully resolve the issue. If keys are typed
during input buffer fix, the order of key event may be swapped.
This patch fixes the issue again.
Takashi Yano [Sat, 26 Feb 2022 06:13:13 +0000 (15:13 +0900)]
Cygwin: pinfo: Fix exit code for non-cygwin apps which reads console.
- The recent commit "Cygwin: pinfo: Fix exit code when non-cygwin app
exits by Ctrl-C." did not fix enough the issue. If a non-cygwin app
is reading the console, it will not return STATUS_CONTROL_C_EXIT
even if it is terminated by Ctrl-C. As a result, the previous patch
does not take effect.
This patch solves this issue by setting sigExeced to SIGINT in
ctrl_c_handler(). In addition, sigExeced will be cleared if the app
does not terminated within predetermined time period. The reason is
that the app does not seem to be terminated by the signal sigExeced.
Takashi Yano [Sun, 27 Feb 2022 03:33:08 +0000 (12:33 +0900)]
Cygwin: console: Correct the past fix for apps which open pty.
- The commit "Cygwin: console: Fix issues of apps which open pty."
did not fix the second problem correctly. That commit looked to
fix the issue, but the actual problem was that ctrl_c_handler()
should be reregistered *AFTER* FreeConsole()/AttachConsole().
This patch correct that.
- The commit "Cygwin: console: Restore CTRL_BREAK_EVENT handling."
was accidentally mixed with experimental code in exceptions.cc.
Due to this, non-cygwin app receives CTRL_C_EVENT twice in the
following scenario.
1) Run 'sleep 10 | <non-cygwin app>'
2) Hit Ctrl-C.
3) The non-cygwin app receives CTRL_C_EVENT twice.
This patch reverts the code with the problem.
Takashi Yano [Fri, 25 Feb 2022 08:10:03 +0000 (17:10 +0900)]
Cygwin: console: Prevent the order of typeahead input from swapped.
- If a lot of keys are typed very quickly in the app which does
not read console, the order of input keys in console input buffer
occasionally swapped. Although this extremely rarely happens,
is obviously a bug of cons_master_thread. This patch fixes the
issue.
Takashi Yano [Fri, 25 Feb 2022 19:19:03 +0000 (04:19 +0900)]
Cygwin: pty: Stop to send CTRL_C_EVENT if pcon activated.
- The commit "Cygwin: console: Redesign handling of special keys."
removes special treatment for pty in with pseudo console activated,
however, it is necessary on second thought. This is because sending
CTRL_C_EVENT to non-cygwin apps will be done in pseudo console,
therefore, sending it in fhandler_pty_master::write() duplicates
that event for non-cygwin apps.
Takashi Yano [Fri, 25 Feb 2022 07:23:58 +0000 (16:23 +0900)]
Cygwin: console: Fix issues of apps which open pty.
- After some recent changes for special keys handling break the
apps which open pty (such as script command). If the app which
opens pty is executed in console, the following issues occur.
1) If the script command was started from non-cygwin shell
(such as cmd.exe), another cygwin app started in pty slave
cannot receive Ctrl-C.
2) If non-cygwin app is executed in pty slave, the app which
opened the pty (e.g. script command) crashes by Ctrl-C.
This patch fixes these issues.
Mike Frysinger [Sat, 12 Feb 2022 10:36:20 +0000 (05:36 -0500)]
libgloss: switch to AM_PROG_AR
Now that we require Automake 1.15, we can use this macro rather than
set the tool up ourselves. The current code doesn't properly search
for a prefixed ar tool as-is.
Mike Frysinger [Sun, 13 Feb 2022 00:49:23 +0000 (19:49 -0500)]
newlib: libc: move configure into top-level
This kills off the last configure script under libc/ and folds it
into the top newlib configure script. The a lot of the logic was
already in the top configure script, so move what's left into a
libc/acinclude.m4 file.
Takashi Yano [Thu, 24 Feb 2022 12:04:49 +0000 (21:04 +0900)]
Cygwin: pinfo: Fix exit code when non-cygwin app exits by Ctrl-C.
- Previously, if non-cygwin app exits by Ctrl-C, exit code was
0x00007f00. With this patch, the exit code will be 0x00000002,
which means process exited by SIGINT.
The multi-build.in file in libgloss duplicates common multilib logic
in the root source tree. Document it a bit, and rename the rule so
it doesn't clash with the common multi-do rule. This will let us use
them in the same makefile so we can merge aarch64/ & arm/ up (as the
only targets that use this local multi-build.in atm).
Mike Frysinger [Sat, 19 Feb 2022 04:46:44 +0000 (23:46 -0500)]
libgloss: finish migration to AM_PROG_AS
When merging iq2000 up a level, it included a partial conversion to
AM_PROG_AS in the common directory. Finish it for all directories
to kill off the custom LIB_AM_PROG_AS which we no longer need since
we require Automake 1.15 now.
Mike Frysinger [Sat, 12 Feb 2022 10:29:06 +0000 (05:29 -0500)]
libgloss: switch to standard AC_PROG_CC
Now that we use AC_NO_EXECUTABLES, and we require a recent version of
autoconf, we don't need to define our own copies of these macros. So
switch to the standard AC_PROG_CC.
Takashi Yano [Thu, 24 Feb 2022 08:28:32 +0000 (17:28 +0900)]
Cygwin: console: Restore CTRL_BREAK_EVENT handling.
- The recent change by the commit "Cygwin: console: Redesign handling
of special keys." breaks the handling of CTRL_BREAK_EVENT. The login
shell in console exits on Ctrl-Break key. This patch fixes the issue.
Mike Frysinger [Thu, 24 Feb 2022 03:01:05 +0000 (22:01 -0500)]
newlib: fix multilib libg.a parallel builds
I split libg.a out into a sep target from libc.a for the main dir in
commit f2b053f49ed2bd7b4da8cf4ed3a608dc2f425c2b ("newlib: separate out
libg from libc"), but missed the multilib dirs. That leads to an
uncommon parallel build failure:
- libc.a rule runs & finishes
- $(BUILD_MULTISUBDIR)/libc.a rule runs
-> failure due to libg.a not yet existing
- libg.a rule runs & finishes
Split the multilib libg rule out from libc too so it can depend on the
main libg directly and avoid this race.
Takashi Yano [Wed, 23 Feb 2022 15:57:37 +0000 (00:57 +0900)]
Cygwin: pty, console: Add a workaround for GDB SIGINT handling.
- The inferior of the GDB cannot be continued after SIGINT even
though nopass option is set. This seems because cygwin GDB does
not support hooking cygwin signal. Therefore, a workaround for
GDB is added. With this patch, only CTRL_C_EVENT is sent to the
GDB inferior by Ctrl-C and sending SIGINT is omitted. Note that
"handle SIGINT (no)pass" command does not take effect even with
or without this patch.
Takashi Yano [Wed, 23 Feb 2022 04:24:39 +0000 (13:24 +0900)]
Cygwin: console: Redesign handling of special keys.
- This patch rearranges the cooperation between cons_master_thread,
line_edit, and ctrl_c_handler so that only one of them operates
at the same time. Since these handle Ctrl-C individually, so the
signal may be sent multiple times to the process. This patch fixes
the issue.
Mike Frysinger [Tue, 22 Feb 2022 22:09:16 +0000 (17:09 -0500)]
libgloss: enable maintainer mode support
Use AM_MAINTAINER_MODE so devs have to opt-in to automatic rebuilds
of autotools. This matches what newlib (and most every other GNU
toolchain package) does with automake.
Cygwin: Implicitly support the /dev/fd symlink and friends
Bash has a very convenient feature that is called process substitution
(e.g. `diff -u <(seq 0 10) <(seq 1 11)`). To make this work, Bash
requires the `/dev/fd` symlink to exist, and Cygwin therefore creates
this symlink (together with the `stdin`, `stdout` and `stderr` ones)
upon start-up.
This strategy is incompatible with the idea of providing a subset of
Cygwin in a `.zip` file (because there is no standard way to represent
symlinks in `.zip` files, and besides, older Windows versions would
potentially lack support for them anyway).
That type of `.zip` file is what Git for Windows wants to use, though,
bundling a minimal subset for third-party applications in MinGit (see
https://github.com/git-for-windows/git/wiki/MinGit for details).
Let's side-step this problem completely by creating those symlinks
implicitly, similar to the way `/dev/` is populated with special
devices.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Matt Joyce [Tue, 22 Feb 2022 10:18:38 +0000 (11:18 +0100)]
Make __sdidinit unused
Remove dependency on __sdidinit member of struct _reent to check
object initialization. Like __sdidinit, the __cleanup member of
struct _reent is initialized in the __sinit() function. Checking
initialization against __cleanup serves the same purpose and will
reduce overhead in the __sfp() function in a follow up patch.
Takashi Yano [Mon, 21 Feb 2022 12:20:48 +0000 (21:20 +0900)]
Cygwin: pty, console: Fix handle leak which occurs on exec() error.
- This patch fixes the handle leak which occurs when exec() fails
with an error. The duplicated handles will be closed when the
exec'ed process is terminated. However, if exec() fails, the code
path does not reach to the code closing the duplicated handles.
To implement this fix more appropriately, the setup, cleanup and
closing pty codes which was previously located in spawn.cc are
encapsulated into the fhandler_pty_slave class functions.
Takashi Yano [Wed, 16 Feb 2022 15:34:40 +0000 (00:34 +0900)]
Cygwin: console: Call fix_tab_position() only if having broken tabs.
- Calling fix_tab_position() is necessary in Windows 10 with xterm
compatible mode enabled, because it has a problem that the tab
positions will be broken when the window size is changed. Fortunately,
this problem has been fixed in Windows 11. Therefore, with this patch,
necessity of fix_tab_position() call is determined by referring to
wincap.has_con_broken_tabs(), which is recently introduced.
- With this patch, all set_(in|out)put_mode() calls are rearranged
as follows.
1) Setup for cygwin apps, started from non-cygwin app, is done
in fhandler_console::post_open_setup(), which overrides
fhandler_base::post_open_setup() called from dtable.cc.
2) Cleanup for cygwin app is done in fhandler_console::close().
3) Setup for cygwin apps is also in fhandler_console::bg_check(),
which overrides fhandler_termios::bg_check(). This is called
on read(), write() and select() for console. It is necessary
if cygwin and non-cygwin apps are started simultaneously in
the same process group.
4) Setup for non-cygwin apps is done in spawn.cc via
fhandler_console::setup_console_for_non_cygwin_app().
5) Cleanup for non-cygwin app is done in spawn.cc vid
fhandler_console::cleanup_console_for_non_cygwin_app().
6) Setup for non-cygwin app started by GDB is done in
fhandler_console::set_console_mode_to_native().
7) No explicit cleanup for non-cygwin app started by GDB, because
console mode is automatically reset to tty::cygwin on read()/
write() in GDB thanks to 3).
Takashi Yano [Tue, 15 Feb 2022 14:23:50 +0000 (23:23 +0900)]
Cygwin: pty, console: Refactor the code processing special keys.
- This patch commonize the code which processes special keys in pty
and console to improve maintanancibility. As a result, some small
bugs have been fixed.
Mike Frysinger [Sun, 13 Feb 2022 01:28:26 +0000 (20:28 -0500)]
newlib: libc: delete crt0.o duplication
The crt0.o was handled in a subdir-by-subdir basis: it would be compiled
in one (e.g. libc/sys/$arch/), then copied up one level (libc/sys/), then
copied up another (libc/) before finally being copied & installed in the
top newlib dir. The libc/sys/ copy was cleaned up, and then the top dir
was changed to copy it directly out of the libc/sys/$arch/ dir. But the
libc/sys/ copy to libc/ was left behind. Clean that up now too.
Mike Frysinger [Sun, 13 Feb 2022 10:43:42 +0000 (05:43 -0500)]
newlib: posix: use local includes for local headers
These headers aren't installed, so use "" includes instead of <> so
we don't search system header paths. This matches the style used
elsewhere in the tree for these local headers, and makes it work
w/out explicit -I flags (as needed with non-recursive make).
Mike Frysinger [Thu, 10 Feb 2022 05:50:36 +0000 (00:50 -0500)]
newlib: libm: merge build up a directory
Convert all the libm/ subdir makes into the top-level Makefile. This
allows us to build all of libm from the top Makefile without using any
recursive make calls. This is faster and avoids the funky lib.a logic
where we unpack subdir archives to repack into a single libm.a. The
machine override logic is maintained though by way of Makefile include
ordering, and source file accumulation in libm_a_SOURCES.
One thing to note is that this will require GNU Make because of:
libm_a_CFLAGS = ... $(libm_a_CFLAGS_$(subst /,_,$(@D)))
This was the only way I could find to supporting per-dir compiler
settings, and I couldn't find a POSIX compatible way of transforming
the variable content. I don't think this is a big deal as other
Makefiles in the tree are using GNU Make-specific syntax, but I call
this out as it's the only one so far in the new automake code that
I've been writing.
Automake doesn't provide precise control over the output object names
(by design). This is fine by default as we get consistent names in all
the subdirs: libm_a-<source>.o. But this relies on using the same set
of compiler flags for all objects. We currently compile libm/common/
with different optimizations than the rest.
If we want to compile objects differently, we can create an intermediate
archive with the subset of objects with unique flags, and then add those
objects to the main archive. But Automake will use a different prefix
for the objects, and thus we can't rely on ordering to override.
But if we leverage $@, we can turn Automake's CFLAGS into a multiplex
on a per-dir (and even per-file if we wanted) basis. Unfortunately,
since $@ contains /, Automake complains it's an invalid name. While
GNU Make supports this, it's a POSIX extension, so Automake flags it.
Using $(subst) avoids the Automake warning to get a POSIX compliant
name, albeit with a GNU Make extension.
Mike Frysinger [Sun, 13 Feb 2022 08:03:12 +0000 (03:03 -0500)]
newlib: separate out libg from libc
Make this a separate target from libc so that we can migrate libc over
to automake more easily. Having it integrated into the libc target is
difficult to handle when using automake rules which expect a one-to-one
mapping between names & inputs.
Mike Frysinger [Sun, 13 Feb 2022 07:44:31 +0000 (02:44 -0500)]
newlib: libc: reshuffle include order for the manual
When migrating the manual to the top-level, the include order was
sorted by name of the subdir. But this changed the chapter order
of the manual in the process. Change the sorting back to match
existing chapters and update the comments to explain.
Mike Frysinger [Tue, 15 Feb 2022 02:37:38 +0000 (21:37 -0500)]
newlib: powerpc: switch to Automake conditionals
Using xxx_LIBADD, xxx_DEPENDENCIES, and EXTRA_xxx_SOURCES is one way of
conditionally including files into a target. But it's meant more for the
cases where the variables added to LIBADD & DEPENDENCIES are constructed
via substitution (e.g. AC_SUBST) or other dynamic methods. With Automake
conditionals, then the much simpler form is to conditionally append to
the xxx_SOURCES variable and let Automake sort everything out.
Mike Frysinger [Sat, 12 Feb 2022 09:58:24 +0000 (04:58 -0500)]
libgloss: merge wince configure script up a level
Move the minor wince-specific logic to a dedicated file & namespace
them so we can merge its configure logic up a level. The makefile
is a bit tricky, but maybe it still works.
Mike Frysinger [Mon, 7 Feb 2022 06:44:45 +0000 (01:44 -0500)]
newlib: fix mips fenv.o handling
Commit 8fa73a9f8414a4926365324c2fe32a237c2eb91d changed how fenv.c is
compiled wrt mips16 targets used the wrong variable to add fenv.o to
libm.a. Fix that thinko so it's included in the build again.
Mike Frysinger [Sat, 12 Feb 2022 06:59:13 +0000 (01:59 -0500)]
libgloss: build with -nostdinc
We don't want libgloss building against C library headers that happened
to be installed with the toolchain, so add -nostdinc to the build. We
still need access to the compiler internal headers, so probe those and
include them via -isystem. This uses a similar probing style as glibc,
which has used it for over a decade, so it should be safe & stable.
This should prevent any latent bugs due to testing with a toolchain that
is fully configured & installed already.
Mike Frysinger [Sat, 12 Feb 2022 10:04:49 +0000 (05:04 -0500)]
libgloss: aarch64: merge cpu-init/ up a level
The cpu-init/configure script isn't doing anything useful, so merge
the logic up to the parent dir. This is how the arm/ tree integrates
its cpu-init/ subdir too.
Mike Frysinger [Fri, 11 Feb 2022 12:11:15 +0000 (07:11 -0500)]
libgloss: merge mn10300 configure script up a level
Move the minor mn10300-specific logic to a dedicated file & namespace
them so we can merge its configure logic up a level. part_specific_obj
wasn't used anywhere (looks like copy & paste left over from mips), so
drop it entirely.
Mike Frysinger [Fri, 11 Feb 2022 12:04:06 +0000 (07:04 -0500)]
libgloss: merge mn10200 configure script up a level
The mn10200-specific logic (setting up part_specific_obj) isn't used
by the build anywhere -- looks like copy & paste left overs from mips.
So punt that & merge the target_makefile_frag_path up to the top-level.
Mike Frysinger [Fri, 11 Feb 2022 11:58:43 +0000 (06:58 -0500)]
libgloss: m68k: switch to AC_NO_EXECUTABLES
Use this macro rather than hacking up the LDFLAGS settings. This will
make it easier to merge the logic into the top-level which is already
using AC_NO_EXECUTABLES.
Mike Frysinger [Wed, 16 Feb 2022 02:05:25 +0000 (21:05 -0500)]
newlib: rtems: drop redundant header install
The top-level newlib dir already takes care of recursing into the
sys/xxx/include/ subdirs and installing any headers found, so the
rtems subdir doesn't need to do this itself.
Replace the custom build rules (which require copying & pasting from the
current Makefile) with small stub files. This allows us to drop the rules
entirely and let Automake provide everything.
Mike Frysinger [Mon, 14 Feb 2022 06:00:11 +0000 (01:00 -0500)]
newlib: i386/xstormy16: drop unused -I libm/common flag
These subdirs don't actually use anything from libm. The common dir
in particular only has 4 header files, and none are included here.
The xstormy16 code has a comment mentioning why this hack is here, but
it refers to code that was removed when its configure script was merged
up a level.
Takashi Yano [Wed, 16 Feb 2022 09:13:02 +0000 (18:13 +0900)]
Cygwin: wincap: Add capabilities for Windows 11.
- The capability changes since Windows 11 have been reflected in
wincap.cc. The capability has_con_broken_tabs is added, which is
false since Windows 11.
Mike Frysinger [Mon, 14 Feb 2022 05:52:55 +0000 (00:52 -0500)]
newlib/libgloss: drop unused $(CROSS_CFLAGS)
This is used in a bunch of places, but nowhere is it ever set, and
nowhere can I find any documentation, nor can I find any other project
using it. So delete the flags to simplify.
Mike Frysinger [Mon, 14 Feb 2022 00:15:57 +0000 (19:15 -0500)]
newlib: drop support for decstation & sunos systems
These targets don't actually cross-compile -- they try to pull some
objects out of the host's /lib/libc.a, /lib/libm.a, and /lib/crt0.o
directly and merge them into newlib's own libraries. This is hard
to keep working and impossible to test. Considering the vintage of
such targets, and gcc dropping them many many years ago, drop them
from newlib too. This will make cleaning up the build a lot easier.
Mike Frysinger [Thu, 10 Feb 2022 08:27:29 +0000 (03:27 -0500)]
newlib: phoenix: 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 phoenix/ dir itself, so by moving the recursive configure and
make calls into it, we can cut off this logic entirely and save the
overhead.
Mike Frysinger [Thu, 10 Feb 2022 08:32:51 +0000 (03:32 -0500)]
newlib: phoenix: drop missing machine subdirs
These were never added to the tree, and as we transition from autoconf
to automake, it really wants the latter subdirs to always exist. These
don't, so delete the logic.
Andoni Arregi [Fri, 11 Feb 2022 11:16:00 +0000 (12:16 +0100)]
Improve lgammaf range for very small cases
The original cut for small arguments at |x|<2**-70 (copied from the
double version) produces that when computing nadj we get a subnormal
number for t*x and thus, the division of pi/subnormal will be INF and
the logarithm of it too, which is wrong as a result for lgammaf in this
range.
The proposed new limit seems to be safe and has been tested to
produce accurate results.
(Courtesy of Andreas Jung, ESA)
Takashi Yano [Sun, 13 Feb 2022 08:11:02 +0000 (17:11 +0900)]
Cygwin: console: Set console mode even if stdin/stdout is redirected.
- When non-cygwin app is started in console, console mode is set to
tty::native. However, if stdin is redirected, current code does not
set the input mode of the console. In this case, if the app opens
"CONIN$", the console mode will not be appropriate for non-cygwin
app. This patch fixes the issue.
Takashi Yano [Sun, 13 Feb 2022 03:03:45 +0000 (12:03 +0900)]
Cygwin: console: Fix console mode for non-cygwin inferior of GDB.
- Currently, there is no chance to change console mode for non-cygwin
inferior of GDB. With this patch, the console mode is changed to
tty::native in CreateProcess() and ContinueDebugEvent() hooked in
fhandler_console.
Takashi Yano [Sat, 12 Feb 2022 20:12:18 +0000 (05:12 +0900)]
Cygwin: pty: Fix a bug in tty_min::segpgid().
- In tty_min::setpgid(), a pointer to fhandler instance is casted to
fhandler_pty_slave and accessed even if terminal is not a pty slave.
This patch fixes the issue.
Takashi Yano [Sat, 12 Feb 2022 17:16:32 +0000 (02:16 +0900)]
Cygwin: pty: Discard input in from_master_nat pipe on signal as well.
- Currently, pty discards input only in from_master pipe on signal.
Due to this, if pty is started without pseudo console support and
start a non-cygwin process from cmd.exe, type adhead input is not
discarded on signals such as Ctrl-C. This patch fixes the issue.
Takashi Yano [Thu, 10 Feb 2022 08:47:51 +0000 (17:47 +0900)]
Cygwin: pty: Revise the code to wait for completion of forwarding.
- With this patch, the code to wait for completion of forwarding of
output from non-cygwin app is revised so that it can more reliably
detect the completion.
Takashi Yano [Thu, 10 Feb 2022 08:22:11 +0000 (17:22 +0900)]
Cygwin: pty: Prevent deadlock on echo output.
- If the slave process writes a lot of text output, doecho() can
cause deadlock. This is because output_mutex is held in slave::
write() and if WriteFile() is blocked due to pipe full, doecho()
tries to acquire output_mutex and gets into deadlock. With this
patch, the deadlock is prevented on the sacrifice of atomicity
of doecho().
Takashi Yano [Sat, 12 Feb 2022 08:51:55 +0000 (17:51 +0900)]
Cygwin: pty: Pass Ctrl-Z (EOF) to non-cygwin apps with disable_pcon.
- Previously, non-cygwin app running in pty started without pseudo
console support was suspended by Ctrl-Z rather than sending EOF.
Even worse, suspended app could not be resumed by fg command. With
this patch, Ctrl-Z (EOF for non-cygwin apps) is passed to non-cygwin
app instead of suspending that app. This patch also handles Ctrl-\
(QUIT) and Ctrl-D (EOF) as well.
Takashi Yano [Thu, 10 Feb 2022 07:53:47 +0000 (16:53 +0900)]
Cygwin: pty, console: Fix Ctrl-C handling for non-cygwin apps.
- Currently, if cat is started from cmd.exe which is started in cygwin
console, Ctrl-C terminates not only cat but also cmd.exe. This also
happens in pty in which pseudo console is disabled. This patch fixes
the issue.
Mike Frysinger [Sat, 12 Feb 2022 06:34:21 +0000 (01:34 -0500)]
libgloss: bfin: fix various warnings
No functional changes here, just fix warnings the compiler noticed.
bfin/syscalls.c:156:13: warning: conflicting types for built-in function ‘memset’
bfin/syscalls.c: In function ‘_unlink’:
bfin/syscalls.c:193:3: warning: passing argument 2 of ‘do_syscall’ discards qualifiers from pointer target type
bfin/syscalls.c:33:1: note: expected ‘void *’ but argument is of type ‘const char *’
bfin/syscalls.c: In function ‘_exit’:
bfin/syscalls.c:104:1: warning: ‘noreturn’ function does return
Mike Frysinger [Thu, 10 Feb 2022 05:49:08 +0000 (00:49 -0500)]
newlib: remove unused fenv flags
These look like they were just copied & pasted from common/Makefile.am.
The funcs in this dir are all stubs that don't actually call any math
or builtin functions, and a simple compile shows they produce identical
object code. So delete to simplify the build rules.
Mike Frysinger [Wed, 9 Feb 2022 04:51:17 +0000 (23:51 -0500)]
libgloss: csky: clean up unused m68k logic
It looks like csky was created by copying & pasting the m68k port,
but m68k-specific stuff was left over related to target selection.
The makefile doesn't do anything with it, so punt it all to make
the file much simpler.
- Currently, ENABLE_INSERT_MODE and ENABLE_QUICK_EDIT_MODE are cleared
if cygwin is started in console. These flags will not be recovered
even when exiting from cygwin. Also note that if ENABLE_EXTENDED_FLAGS
is once unset, then the flag ENABLE_QUICK_EDIT_MODE it's associated
with will no longer be preserved. Unfortunately, we're accidentally
stepping on this in fhandler_console::set_input_mode().
This patch solves this by carrying forward these flags in the place
where it had been ignoring them. Since the previous behaviour of
leaving these flags unset would essentially maintain their existing
state, adding the carry-over of the flags now should not alter console
behaviour.
Andoni Arregi [Wed, 9 Feb 2022 13:52:07 +0000 (14:52 +0100)]
Fix expf overflow limit
Correct the overflow limit in the variable o_threshold to be consistent
with the FLT_UWORD_LOG_MAX variable used by the internal implementation
of the expf algorithm itself.
The u_threshold variable has also been modified to be written in the
same format.
Note that this fix improves the situation but does not completely
correct the inconsistencies regarding the overflow and underflow limits
between the expf wrapper (wf_exp.c) and the expf algorithm itself
(ef_exp.c).
Currently these limits are different for the
_FLT_LARGEST_EXPONENT_IS_NORMAL and _FLT_NO_DENORMALS cases as well as
for the case where __OBSOLETE_MATH is not defined (only for the
underflow limit in this case).
Mike Frysinger [Tue, 1 Feb 2022 07:32:17 +0000 (02:32 -0500)]
newlib: libm: move configure into top-level
This kills off the last configure script under libm/ and folds it
into the top newlib configure script. The vast majority of logic
was already in the top configure script, so move the little that
is left into a libm/acinclude.m4 file.
Mike Frysinger [Mon, 7 Feb 2022 10:12:05 +0000 (05:12 -0500)]
newlib: drop libtool support
This was only ever used for i?86-pc-linux-gnu targets, but that's been
broken for years, and has since been dropped. So clean this up too.
This also deletes the funky objectlist logic since it only existed for
the libtool libraries. Since it was the only thing left in the small
Makefile.shared file, we can punt that too.
Mike Frysinger [Mon, 7 Feb 2022 09:57:29 +0000 (04:57 -0500)]
newlib: punt sys/linux support
This was only used by the i?86-pc-linux-gnu target which we've removed,
and even though it's using a "sys/linux/" dir to make it sound like it
only depends on the Linux kernel, it's actually tied to glibc APIs built
on top of Linux. Since the code relies on internal glibc APIs and has
been broken for some time, punt it all. If someone wants to bring it
back, they can try and actually keep the Linux-vs-glibc APIs separate.
Mike Frysinger [Mon, 7 Feb 2022 09:57:29 +0000 (04:57 -0500)]
newlib: drop i?86-pc-linux-* target support
This was added 20+ years ago. It seems to have very few (or no users)
as it only works on 32-bit x86 GNU/Linux (i.e. glibc) systems, and even
then only with old versions of glibc. It hasn't compiled in at least 5
years, but most likely been broken for more like 15 years -- it relies
on internal glibc APIs (like linuxthreads), and that code has changed
and been deleted significantly since.
This single target ends up dragging in a lot of non-trivial code that is
hard to keep working, and currently impossible to verify -- the libtool
and iconvdata and sys/linux/ code isn't used by anything else, but ends
up touching just about every build file in the tree. Punt the target so
we can start stripping out all these unique code paths.
This commit by itself just disables the target. We'll start deleting the
individual unused pieces in followups.