[Bug go/113143] Remove usage of ucontext.h

2024-10-16 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #18 from Eric Gallager --- (In reply to Sergey Fedorov from comment #17) > (In reply to Eric Gallager from comment #15) > > This is one of the things blocking bug 46986, isn't it? > > ucontext is supported on macOS, AFAIK. Only on

[Bug go/113143] Remove usage of ucontext.h

2024-10-16 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 Sergey Fedorov changed: What|Removed |Added CC||vital.had at gmail dot com --- Comment

[Bug go/113143] Remove usage of ucontext.h

2024-10-16 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #16 from Ian Lance Taylor --- This may be a blocker for macOS support, but I don't think it's a major one.

[Bug go/113143] Remove usage of ucontext.h

2024-10-16 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Commen

[Bug go/113143] Remove usage of ucontext.h

2024-10-16 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #14 from Ian Lance Taylor --- Note that on x86_64 Linux libgo no longer uses ucontext.h. (Well, the #include is still there, but it is not used.) So we have a clear path to removing ucontext.h on any given system, but it does unfor

[Bug go/113143] Remove usage of ucontext.h

2024-10-16 Thread joel at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 Joel Sherrill changed: What|Removed |Added CC||joel at gcc dot gnu.org --- Comment #13

[Bug go/113143] Remove usage of ucontext.h

2023-12-29 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #12 from Ian Lance Taylor --- libgo/runtime/runtime.h: #if defined(__x86_64__) && defined(__linux__) && !defined(__CET__) ... #else #define __go_context_t ucontext_t #define __go_getcontext(c) getcontext(c) #define __go_setcon

[Bug go/113143] Remove usage of ucontext.h

2023-12-28 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #11 from Alexander von Gluck --- Hm.. Could you point me to where Linux is using the (get/set/swap)context calls? I still haven't found them in the codebase. I don't want to miss any edge cases if I work up a patch.

[Bug go/113143] Remove usage of ucontext.h

2023-12-27 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #10 from Ian Lance Taylor --- The makecontext/getcontext/setcontext functions are called by libgo on GNU/Linux for all targets other than x86_64. It is not the case that they are used only on *BSD systems. The default gc implementa

[Bug go/113143] Remove usage of ucontext.h

2023-12-26 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #9 from Alexander von Gluck --- Doing a little research, it looks like complaints of ucontext.h have come up before multiple times: Similar issue on OpenBSD a long time ago: https://gcc-help.gcc.gnu.narkive.com/Xx1bResV/can-t-build-

[Bug go/113143] Remove usage of ucontext.h

2023-12-26 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #8 from Alexander von Gluck --- Not at all a dumb question :-) I'm working through compiling libgo / gccgo on Haiku.We have our own lovely libc which tests posix compliant. Some historic consideration behind us not having ucont

[Bug go/113143] Remove usage of ucontext.h

2023-12-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #7 from Andrew Pinski --- Let me ask a dumb question, are you porting GCC/gccgo to a libc which does not have ucontext.h ? If so what is the libc my I ask?

[Bug go/113143] Remove usage of ucontext.h

2023-12-26 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #6 from Alexander von Gluck --- For added clairity. Searching the upstream go sources: ``` grep -R getcontext src/cmd/vendor/golang.org/x/sys/unix/syscall_netbsd.go:// getcontext src/cmd/vendor/golang.org/x/sys/unix/zsysnum_freebsd

[Bug go/113143] Remove usage of ucontext.h

2023-12-26 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #5 from Alexander von Gluck --- > I understand that makecontext/getcontext/setcontext were removed from POSIX. > However, there is no adequate replacement. Their functionality is absolutely > required for what libgo does. No Linu

[Bug go/113143] Remove usage of ucontext.h

2023-12-26 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #4 from Ian Lance Taylor --- I understand that makecontext/getcontext/setcontext were removed from POSIX. However, there is no adequate replacement. Their functionality is absolutely required for what libgo does. Fortunately GNU/Li

[Bug go/113143] Remove usage of ucontext.h

2023-12-26 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #3 from Alexander von Gluck --- Good call out. It looks like in 2004 these functions were flagged as obsolescent though: https://pubs.opengroup.org/onlinepubs/009695399/functions/makecontext.html Here's the note on it in the linux

[Bug go/113143] Remove usage of ucontext.h

2023-12-25 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #2 from Ian Lance Taylor --- Note that except on x86_64 GNU/Linux, libgo requires the makecontext, getcontext, and setcontext functions that are declared in ucontext.h. There is no adequate replacement for those functions on strict

[Bug go/113143] Remove usage of ucontext.h

2023-12-25 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143 --- Comment #1 from Alexander von Gluck --- $ grep -R ucontext.h gcc/libgo gcc/libgo/configure:#include gcc/libgo/configure.ac:#include gcc/libgo/go/runtime/runtime2.go:// _sizeof_ucontext_t is defined by mkrsysinfo.sh from . gcc/libgo/misc/c