acadia-newlib/winsup/cygwin
Corinna Vinschen 8f66bc28ae Cygwin: fix new sigfe.o generation in optimized case
Commit 0597c84b9b ("Cygwin: revamp TLS offsets computation")
introduced a really weird problem when building Cygwin with
optimization.

First of all, the tlsoffsets file is broken with -O2.  This
can easily be fixed by running the compiler with -O0 when called
from the gentls_offsets script.

But it gets worse:

When creating sigfe.o with optimization, the generated machine code
uses incorrect offsets: For some reason the assembler codes using
_cygtls.stackptr as offset value are assembled into machine code
using _cygtls.pstackptr as offsets.

And as if that isn't already absurd enough, renaming _cygtls.pstackptr
to, say, _cygtls.blurb, fixes the assembled machine code expressions;
they use the value of _cygtls.stackptr again.

So I changed gentls_offsets and gendef to use _cygtls.foo_p rather
than _cygtls.pfoo and that fixes the assembled code in the optimized
case.

No, I can't explain that.  There's no system in that behaviour.
It looks absolutely crazy.

Fixes: 0597c84b9b ("Cygwin: revamp TLS offsets computation")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13 21:22:44 +02:00
..
include
lib
libc
math
regex
release
tzcode
DevNotes
Makefile.am
ROADMAP
advapi32.cc
aio.cc
analyze_sigfe
assert.cc
autoload.cc
automode.c
binmode.c
child_info.h
clock.cc
clock.h
collate.h
common.din
config.h.in
cpuid.h
crt0.c
ctype.cc
cxx.cc
cygerrno.h
cygheap.cc
cygheap.h
cygheap_malloc.h
cyglsa.h
cygmagic
cygmalloc.h
cygserver.h
cygserver_ipc.h
cygserver_msg.h
cygserver_pwdgrp.h
cygserver_sem.h
cygserver_setpwd.h
cygserver_shm.h
cygthread.cc
cygthread.h
cygtls.cc
cygtls.h
cygwait.cc
cygwait.h
cygwin-cxx.h
cygwin-shilka
cygwin.ldif
cygwin.sc.in
cygwin_version.h
cygxdr.cc
cygxdr.h
dcrt0.cc
debug.cc
debug.h
devices.cc
devices.h
devices.in
dir.cc
dlfcn.cc
dll_init.cc
dll_init.h
dtable.cc
dtable.h
environ.cc
environ.h
errno.cc
exception.h
exceptions.cc
exec.cc
external.cc
fcntl.cc
fenv.c
fhandler.cc
fhandler.h
fhandler_clipboard.cc
fhandler_console.cc
fhandler_cygdrive.cc
fhandler_dev.cc
fhandler_dev_fd.cc
fhandler_disk_file.cc
fhandler_dsp.cc
fhandler_fifo.cc
fhandler_floppy.cc
fhandler_mqueue.cc
fhandler_netdrive.cc
fhandler_nodevice.cc
fhandler_pipe.cc
fhandler_proc.cc
fhandler_process.cc
fhandler_process_fd.cc
fhandler_procnet.cc
fhandler_procsys.cc
fhandler_procsysvipc.cc
fhandler_random.cc
fhandler_raw.cc
fhandler_registry.cc
fhandler_serial.cc
fhandler_signalfd.cc
fhandler_socket.cc
fhandler_socket_inet.cc
fhandler_socket_local.cc
fhandler_socket_unix.cc
fhandler_tape.cc
fhandler_termios.cc
fhandler_timerfd.cc
fhandler_tty.cc
fhandler_virtual.cc
fhandler_virtual.h
fhandler_windows.cc
fhandler_zero.cc
flock.cc
fork.cc
forkable.cc
gcc_seh.h
gcrt0.c
gendef
gendevices
gentls_offsets
glob.cc
glob_pattern_p.cc
globals.cc
gmon.c
gmon.h
grp.cc
heap.cc
heap.h
hookapi.cc
how-autoload-works.txt
how-cygheap-works.txt
how-cygtls-works.txt
how-fhandlers-work.txt
how-signals-work.txt
how-spawn-works.txt
how-startup-shutdown-works.txt
how-to-debug-cygwin.txt
init.cc
ioctl.cc
ipc.cc
kernel32.cc
lc_era.h
lc_msg.h
ldap.cc
ldap.h
libstdcxx_wrapper.cc
loadavg.cc
loadavg.h
lsearch.cc
malloc.cc
malloc_wrapper.cc
math.h
mcount.c
mcountFunc.S
miscfuncs.cc
miscfuncs.h
mkglobals_h
mkimport
mktemp.cc
mkvers.sh
mmap.cc
mmap_alloc.cc
mmap_alloc.h
mmap_helper.h
mount.cc
mount.h
mqueue_types.h
msg.cc
mtinfo.h
net.cc
netdb.cc
nfs.cc
nfs.h
nlsfuncs.cc
ntdll.h
ntea.cc
ntsecapi.h
passwd.cc
path.cc
path.h
pathfinder.h
perprocess.h
pinfo.cc
pinfo.h
poll.cc
posix_ipc.cc
posix_timer.cc
posix_timer.h
profil.c
profil.h
pseudo-reloc.cc
pthread.cc
pwdgrp.h
quotactl.cc
random.cc
registry.cc
registry.h
regparm.h
resource.cc
scandir.cc
sched.cc
sec_acl.cc
sec_auth.cc
sec_helper.cc
sec_posixacl.cc
sec_posixacl.h
security.cc
security.h
select.cc
select.h
sem.cc
setlsapwd.cc
shared.cc
shared_info.h
shm.cc
signal.cc
sigproc.cc
sigproc.h
smallprint.cc
sortdin
spawn.cc
speclib
spinlock.h
strace.cc
strfuncs.cc
string.h
strsep.cc
strsig.cc
sync.cc
sync.h
syscalls.cc
sysconf.cc
syslog.cc
termios.cc
textmode.c
textreadmode.c
thread.cc
thread.h
timerfd.cc
timerfd.h
times.cc
tls_pbuf.cc
tls_pbuf.h
tty.cc
tty.h
uinfo.cc
uname.cc
update-copyright
userinfo.h
vstrlist.h
wait.cc
wchar.h
wincap.cc
wincap.h
window.cc
winf.cc
winf.h
wininfo.h
winlean.h
winsup.h
winver.rc
x86_64.din