Re: [PATCH v4] libgo: Don't use pt_regs member in mcontext_t
Hi Ian, Thanks for committing a first fix! Unfortunately, your changes don't work on ppc64le musl since you are now still using .regs on ppc64le the include of asm/ptrace.h (as added in the v1 of my patch) is missing. Hence, your patch fails to compile on ppc64le musl with the following error message: go-signal.c:230:63: error: invalid use of undefined type 'struct pt_regs' 230 | ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip; If you want to continue using .regs on ppc64le an include of asm/ptrace.h is needed since both glibc and musl declare `struct pt_regs` as an incomplete type (with glibc asm/ptrace.h is included indirectly by other headers used by go-signal.c it seems). See https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587520.html Would be nice if this could be fixed :) Sincerely, Sören Ian Lance Taylor wrote: > On Thu, Mar 31, 2022 at 9:41 AM Sören Tempel wrote: > > > > Ping. > > > > Would be nice to get this integrated since this one of the changes needed to > > make gccgo work with musl libc. Let me know if the patch needs to be revised > > further. > > I went with a simpler solution, more verbose but easier to read. Now > committed to mainline. Please let me know if you have any problems > with this. Thanks. > > Ian > fad0ecb68c08512ac24852b6d5264cdb9809dc6d > diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE > index afaccb0e9e6..f93eaf48e28 100644 > --- a/gcc/go/gofrontend/MERGE > +++ b/gcc/go/gofrontend/MERGE > @@ -1,4 +1,4 @@ > -7f33baa09a8172bb2c5f1ca0435d9efe3e194c9b > +45108f37070afb696b069768700e39a269f1fecb > > The first line of this file holds the git revision number of the last > merge done from the gofrontend repository. > diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c > index 0cb90304730..9c919e1568a 100644 > --- a/libgo/runtime/go-signal.c > +++ b/libgo/runtime/go-signal.c > @@ -231,7 +231,14 @@ getSiginfo(siginfo_t *info, void *context > __attribute__((unused))) > #elif defined(__alpha__) && defined(__linux__) > ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.sc_pc; > #elif defined(__PPC__) && defined(__linux__) > + // For some reason different libc implementations use > + // different names. > +#if defined(__PPC64__) || defined(__GLIBC__) > ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip; > +#else > + // Assumed to be ppc32 musl. > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32]; > +#endif > #elif defined(__PPC__) && defined(_AIX) > ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar; > #elif defined(__aarch64__) && defined(__linux__) > @@ -347,6 +354,7 @@ dumpregs(siginfo_t *info __attribute__((unused)), void > *context __attribute__((u > mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext; > int i; > > +#if defined(__PPC64__) || defined(__GLIBC__) > for (i = 0; i < 32; i++) > runtime_printf("r%d %X\n", i, m->regs->gpr[i]); > runtime_printf("pc %X\n", m->regs->nip); > @@ -355,6 +363,16 @@ dumpregs(siginfo_t *info __attribute__((unused)), void > *context __attribute__((u > runtime_printf("lr %X\n", m->regs->link); > runtime_printf("ctr %X\n", m->regs->ctr); > runtime_printf("xer %X\n", m->regs->xer); > +#else > + for (i = 0; i < 32; i++) > + runtime_printf("r%d %X\n", i, m->gregs[i]); > + runtime_printf("pc %X\n", m->gregs[32]); > + runtime_printf("msr %X\n", m->gregs[33]); > + runtime_printf("cr %X\n", m->gregs[38]); > + runtime_printf("lr %X\n", m->gregs[36]); > + runtime_printf("ctr %X\n", m->gregs[35]); > + runtime_printf("xer %X\n", m->gregs[37]); > +#endif > } > #elif defined(__PPC__) && defined(_AIX) > {
[PATCH] i386: Fix up ix86_expand_vector_init_general [PR105123]
Hi! The following testcase is miscompiled on ia32. The problem is that at -O0 we end up with: vector(4) short unsigned int _1; short unsigned int u.0_3; ... _1 = {u.0_3, u.0_3, u.0_3, u.0_3}; statement (dead) which is wrongly expanded. elt is (subreg:HI (reg:SI 83 [ u.0_3 ]) 0), tmp_mode SImode, so after convert_mode we start with word (reg:SI 83 [ u.0_3 ]). The intent is to manually broadcast that value to 2 SImode parts, but because we pass word as target to expand_simple_binop, it will overwrite (reg:SI 83 [ u.0_3 ]) and we end up with 0: 10: {r83:SI=r83:SI<<0x10;clobber flags:CC;} 11: {r83:SI=r83:SI|r83:SI;clobber flags:CC;} 12: {r83:SI=r83:SI<<0x10;clobber flags:CC;} 13: {r83:SI=r83:SI|r83:SI;clobber flags:CC;} 14: clobber r110:V4HI 15: r110:V4HI#0=r83:SI 16: r110:V4HI#4=r83:SI as the two ors do nothing and two shifts each by 16 left shift it all away. The following patch fixes that by using NULL_RTX target, so we expand it as 10: {r110:SI=r83:SI<<0x10;clobber flags:CC;} 11: {r111:SI=r110:SI|r83:SI;clobber flags:CC;} 12: {r112:SI=r83:SI<<0x10;clobber flags:CC;} 13: {r113:SI=r112:SI|r83:SI;clobber flags:CC;} 14: clobber r114:V4HI 15: r114:V4HI#0=r111:SI 16: r114:V4HI#4=r113:SI instead. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Another possibility would be to pass NULL_RTX only when word == elt and word otherwise, where word would necessarily be a pseudo from the first shift after passing NULL_RTX there once or pass NULL_RTX for the shift and word for ior. 2022-04-02 Jakub Jelinek PR target/105123 * config/i386/i386-expand.cc (ix86_expand_vector_init_general): Avoid using word as target for expand_simple_binop when doing ASHIFT and IOR. * gcc.target/i386/pr105123.c: New test. --- gcc/config/i386/i386-expand.cc.jj 2022-03-19 13:52:53.0 +0100 +++ gcc/config/i386/i386-expand.cc 2022-04-01 16:51:27.253154191 +0200 @@ -15830,9 +15830,9 @@ quarter: else { word = expand_simple_binop (tmp_mode, ASHIFT, word, shift, - word, 1, OPTAB_LIB_WIDEN); + NULL_RTX, 1, OPTAB_LIB_WIDEN); word = expand_simple_binop (tmp_mode, IOR, word, elt, - word, 1, OPTAB_LIB_WIDEN); + NULL_RTX, 1, OPTAB_LIB_WIDEN); } } --- gcc/testsuite/gcc.target/i386/pr105123.c.jj 2022-04-01 16:56:44.549625810 +0200 +++ gcc/testsuite/gcc.target/i386/pr105123.c2022-04-01 16:56:33.569782511 +0200 @@ -0,0 +1,22 @@ +/* PR target/105123 */ +/* { dg-do run { target sse2_runtime } } */ +/* { dg-options "-msse2" } */ +/* { dg-additional-options "-mtune=i686" { target ia32 } } */ + +typedef unsigned short __attribute__((__vector_size__ (4 * sizeof (unsigned short V; + +V +foo (unsigned short u, V v) +{ + return __builtin_shuffle (u * v, v); +} + +int +main () +{ + V x = foo (1, (V) { 0, 1, 2, 3 }); + for (unsigned i = 0; i < 4; i++) +if (x[i] != i) + __builtin_abort (); + return 0; +} Jakub
[PATCH] libstdc++: Tweak source_location for clang trunk [PR105128]
Hi! Apparently clang trunk implemented __builtin_source_location(), but the using __builtin_ret_type = decltype(__builtin_source_location()); which has been added for it isn't enough, they also need the std::source_location::__impl class to be defined (but incomplete seems to be good enough) before the builtin is used. The following has been tested on godbolt with clang trunk (old version fails with error: 'std::source_location::__impl' was not found; it must be defined before '__builtin_source_location' is called and some follow-up errors), getting back to just void * instead of __builtin_ret_type and commenting out using doesn't work either and just struct __impl; before using __builtin_ret_type doesn't work too. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2022-04-02 Jakub Jelinek PR libstdc++/105128 * include/std/source_location (std::source_location::__impl): Move definition before using __builtin_ret_type. --- libstdc++-v3/include/std/source_location2022-02-25 10:46:53.275178858 +0100 +++ libstdc++-v3/include/std/source_location2022-04-01 19:36:02.056236397 +0200 @@ -43,6 +43,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { private: using uint_least32_t = __UINT_LEAST32_TYPE__; +struct __impl +{ + const char* _M_file_name; + const char* _M_function_name; + unsigned _M_line; + unsigned _M_column; +}; using __builtin_ret_type = decltype(__builtin_source_location()); public: @@ -76,14 +83,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return _M_impl ? _M_impl->_M_function_name : ""; } private: -struct __impl -{ - const char* _M_file_name; - const char* _M_function_name; - unsigned _M_line; - unsigned _M_column; -}; - const __impl* _M_impl = nullptr; }; Jakub
Re: [PATCH] libstdc++: Tweak source_location for clang trunk [PR105128]
On Sat, 2 Apr 2022, 10:32 Jakub Jelinek via Libstdc++, < libstd...@gcc.gnu.org> wrote: > Hi! > > Apparently clang trunk implemented __builtin_source_location(), but the > using __builtin_ret_type = decltype(__builtin_source_location()); > which has been added for it isn't enough, they also need the > std::source_location::__impl class to be defined (but incomplete seems > to be good enough) before the builtin is used. > > The following has been tested on godbolt with clang trunk (old version > fails with > error: 'std::source_location::__impl' was not found; it must be defined > before '__builtin_source_location' is called > and some follow-up errors), getting back to just void * instead of > __builtin_ret_type and commenting out using doesn't work either and > just struct __impl; before using __builtin_ret_type doesn't work too. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > OK, thanks. > 2022-04-02 Jakub Jelinek > > PR libstdc++/105128 > * include/std/source_location (std::source_location::__impl): Move > definition before using __builtin_ret_type. > > --- libstdc++-v3/include/std/source_location2022-02-25 > 10:46:53.275178858 +0100 > +++ libstdc++-v3/include/std/source_location2022-04-01 > 19:36:02.056236397 +0200 > @@ -43,6 +43,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >{ >private: > using uint_least32_t = __UINT_LEAST32_TYPE__; > +struct __impl > +{ > + const char* _M_file_name; > + const char* _M_function_name; > + unsigned _M_line; > + unsigned _M_column; > +}; > using __builtin_ret_type = decltype(__builtin_source_location()); > >public: > @@ -76,14 +83,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return _M_impl ? _M_impl->_M_function_name : ""; } > >private: > -struct __impl > -{ > - const char* _M_file_name; > - const char* _M_function_name; > - unsigned _M_line; > - unsigned _M_column; > -}; > - > const __impl* _M_impl = nullptr; >}; > > > Jakub > >
[PATCH] mips: Fix an ICE caused by r12-7962
I made a mistake in r12-7962 and it causes an ICE running g++.dg-struct- layout-1 tests. The fix and a reduced test are included in this patch. Ok for trunk? DECL_SIZE(x) is NULL if x is a flexible array member, but I forgot to check it in r12-7962. Then if we increase the size of a struct with flexible array member (by using aligned attribute), the code will dereference NULL trying to use the "size" of the flexible array member. gcc/ * config/mips/mips.cc (mips_function_arg): Check if DECL_SIZE is NULL before dereferencing it. gcc/testsuite/ * gcc.target/mips/pr102024-4.c: New test. --- gcc/config/mips/mips.cc| 3 ++- gcc/testsuite/gcc.target/mips/pr102024-4.c | 10 ++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/mips/pr102024-4.c diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index a6dd1e9e7b6..079bb03968a 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -6082,7 +6082,8 @@ mips_function_arg (cumulative_args_t cum_v, const function_arg_info &arg) an ABI change. */ if (DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD (field)) continue; - if (integer_zerop (DECL_SIZE (field))) + if (DECL_SIZE (field) + && integer_zerop (DECL_SIZE (field))) { zero_width_field_abi_change = true; continue; diff --git a/gcc/testsuite/gcc.target/mips/pr102024-4.c b/gcc/testsuite/gcc.target/mips/pr102024-4.c new file mode 100644 index 000..2147cc769d0 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/pr102024-4.c @@ -0,0 +1,10 @@ +// { dg-do compile } +// { dg-options "-mabi=64 -mhard-float" } + +struct __attribute__((aligned(16))) test { + int x[0]; + double b; + int f[]; +}; + +void check(struct test) {} // { dg-message "the ABI for passing a value containing zero-width fields before an adjacent 64-bit floating-point field was changed in GCC 12.1" } -- 2.35.1
Re: [PATCH] mips: Fix an ICE caused by r12-7962
On Sat, Apr 02, 2022 at 06:53:55PM +0800, Xi Ruoyao wrote: > I made a mistake in r12-7962 and it causes an ICE running g++.dg-struct- > layout-1 tests. The fix and a reduced test are included in this patch. > Ok for trunk? > > > > DECL_SIZE(x) is NULL if x is a flexible array member, but I forgot to > check it in r12-7962. Then if we increase the size of a struct with > flexible array member (by using aligned attribute), the code will > dereference NULL trying to use the "size" of the flexible array member. > > gcc/ > > * config/mips/mips.cc (mips_function_arg): Check if DECL_SIZE is > NULL before dereferencing it. > > gcc/testsuite/ > > * gcc.target/mips/pr102024-4.c: New test. Ok, sorry for not catching that. All other targets guard such integer_zerop (DECL_SIZE (...)) uses with either DECL_SIZE (...) != NULL_TREE or DECL_BIT_FIELD, so this is the only such spot. > diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc > index a6dd1e9e7b6..079bb03968a 100644 > --- a/gcc/config/mips/mips.cc > +++ b/gcc/config/mips/mips.cc > @@ -6082,7 +6082,8 @@ mips_function_arg (cumulative_args_t cum_v, const > function_arg_info &arg) >an ABI change. */ > if (DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD (field)) > continue; > - if (integer_zerop (DECL_SIZE (field))) > + if (DECL_SIZE (field) > + && integer_zerop (DECL_SIZE (field))) > { > zero_width_field_abi_change = true; > continue; > diff --git a/gcc/testsuite/gcc.target/mips/pr102024-4.c > b/gcc/testsuite/gcc.target/mips/pr102024-4.c > new file mode 100644 > index 000..2147cc769d0 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/mips/pr102024-4.c > @@ -0,0 +1,10 @@ > +// { dg-do compile } > +// { dg-options "-mabi=64 -mhard-float" } > + > +struct __attribute__((aligned(16))) test { > + int x[0]; > + double b; > + int f[]; > +}; > + > +void check(struct test) {} // { dg-message "the ABI for passing a value > containing zero-width fields before an adjacent 64-bit floating-point field > was changed in GCC 12.1" } > -- > 2.35.1 > Jakub
Re: [PATCH 4/5] openmp: Use libgomp memory allocation functions with unified shared memory.
On 08/03/2022 11:30, Hafiz Abid Qadeer wrote: This patches changes calls to malloc/free/calloc/realloc and operator new to memory allocation functions in libgomp with allocator=ompx_unified_shared_mem_alloc. This additional patch adds transformation for omp_target_alloc. The OpenMP 5.0 document says that addresses allocated this way needs to work without is_device_ptr. The easiest way to make that work is to make them USM addresses. I will commit this to OG11 shortly. Andrewopenmp: Do USM transform for omp_target_alloc OpenMP 5.0 says that omp_target_alloc should return USM addresses. gcc/ChangeLog: * omp-low.c (usm_transform): Transform omp_target_alloc and omp_target_free. libgomp/ChangeLog: * testsuite/libgomp.c/usm-6.c: Add omp_target_alloc. gcc/testsuite/ChangeLog: * c-c++-common/gomp/usm-2.c: Add omp_target_alloc. * c-c++-common/gomp/usm-3.c: Add omp_target_alloc. diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 4e8ab9e4ca0..9235eafd1d7 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -15880,7 +15880,8 @@ usm_transform (gimple_stmt_iterator *gsi_p, bool *, if ((strcmp (name, "malloc") == 0) || (fndecl_built_in_p (fndecl, BUILT_IN_NORMAL) && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MALLOC) -|| DECL_IS_REPLACEABLE_OPERATOR_NEW_P (fndecl)) +|| DECL_IS_REPLACEABLE_OPERATOR_NEW_P (fndecl) +|| strcmp (name, "omp_target_alloc") == 0) { tree omp_alloc_type = build_function_type_list (ptr_type_node, size_type_node, @@ -15952,7 +15953,8 @@ usm_transform (gimple_stmt_iterator *gsi_p, bool *, || (fndecl_built_in_p (fndecl, BUILT_IN_NORMAL) && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FREE) || (DECL_IS_OPERATOR_DELETE_P (fndecl) - && DECL_IS_REPLACEABLE_OPERATOR (fndecl))) + && DECL_IS_REPLACEABLE_OPERATOR (fndecl)) + || strcmp (name, "omp_target_free") == 0) { tree omp_free_type = build_function_type_list (void_type_node, ptr_type_node, diff --git a/gcc/testsuite/c-c++-common/gomp/usm-2.c b/gcc/testsuite/c-c++-common/gomp/usm-2.c index 64dbb6be131..8c20ef94e69 100644 --- a/gcc/testsuite/c-c++-common/gomp/usm-2.c +++ b/gcc/testsuite/c-c++-common/gomp/usm-2.c @@ -12,6 +12,8 @@ void *aligned_alloc (__SIZE_TYPE__, __SIZE_TYPE__); void *calloc(__SIZE_TYPE__, __SIZE_TYPE__); void *realloc(void *, __SIZE_TYPE__); void free (void *); +void *omp_target_alloc (__SIZE_TYPE__, int); +void omp_target_free (void *, int); #ifdef __cplusplus } @@ -24,16 +26,21 @@ foo () void *p2 = realloc(p1, 30); void *p3 = calloc(4, 15); void *p4 = aligned_alloc(16, 40); + void *p5 = omp_target_alloc(50, 1); free (p2); free (p3); free (p4); + omp_target_free (p5, 1); } /* { dg-final { scan-tree-dump-times "omp_alloc \\(20, 10\\)" 1 "usm_transform" } } */ /* { dg-final { scan-tree-dump-times "omp_realloc \\(.*, 30, 10, 10\\)" 1 "usm_transform" } } */ /* { dg-final { scan-tree-dump-times "omp_calloc \\(4, 15, 10\\)" 1 "usm_transform" } } */ /* { dg-final { scan-tree-dump-times "omp_aligned_alloc \\(16, 40, 10\\)" 1 "usm_transform" } } */ -/* { dg-final { scan-tree-dump-times "omp_free" 3 "usm_transform" } } */ +/* { dg-final { scan-tree-dump-times "omp_alloc \\(50, 10\\)" 1 "usm_transform" } } */ +/* { dg-final { scan-tree-dump-times "omp_free" 4 "usm_transform" } } */ /* { dg-final { scan-tree-dump-not " free" "usm_transform" } } */ /* { dg-final { scan-tree-dump-not " aligned_alloc" "usm_transform" } } */ /* { dg-final { scan-tree-dump-not " malloc" "usm_transform" } } */ +/* { dg-final { scan-tree-dump-not " omp_target_alloc" "usm_transform" } } */ +/* { dg-final { scan-tree-dump-not " omp_target_free" "usm_transform" } } */ diff --git a/gcc/testsuite/c-c++-common/gomp/usm-3.c b/gcc/testsuite/c-c++-common/gomp/usm-3.c index 934582ea5fd..2b0cbb45e27 100644 --- a/gcc/testsuite/c-c++-common/gomp/usm-3.c +++ b/gcc/testsuite/c-c++-common/gomp/usm-3.c @@ -10,6 +10,8 @@ void *aligned_alloc (__SIZE_TYPE__, __SIZE_TYPE__); void *calloc(__SIZE_TYPE__, __SIZE_TYPE__); void *realloc(void *, __SIZE_TYPE__); void free (void *); +void *omp_target_alloc (__SIZE_TYPE__, int); +void omp_target_free (void *, int); #ifdef __cplusplus } @@ -22,16 +24,21 @@ foo () void *p2 = realloc(p1, 30); void *p3 = calloc(4, 15); void *p4 = aligned_alloc(16, 40); + void *p5 = omp_target_alloc(50, 1); free (p2); free (p3); free (p4); + omp_target_free (p5, 1); } /* { dg-final { scan-tree-dump-times "omp_alloc \\(20, 10\\)" 1 "usm_transform" } } */ /* { dg-final { scan-tree-dump-times "omp_realloc \\(.*, 30, 10, 10\\)" 1 "usm_transform" } } */ /* { dg-final { scan-tree-dump-times "omp_calloc
Re: [PATCH 4/5] openmp: Use libgomp memory allocation functions with unified shared memory.
On 02/04/2022 13:04, Andrew Stubbs wrote: This additional patch adds transformation for omp_target_alloc. The OpenMP 5.0 document says that addresses allocated this way needs to work without is_device_ptr. The easiest way to make that work is to make them USM addresses. Actually, reading on, it says "Every device address allocated through OpenMP device memory routines is a valid host pointer", so USM is the correct answer. Andrew
[committed] wwwdocs: gcc-11: Switch from to using ids.
I - or rather the w3 validator :) - realized that the use of is deprecated, so use id attributes instead. Gerald --- htdocs/gcc-11/changes.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index 8e6d4ec8..c9eb2295 100644 --- a/htdocs/gcc-11/changes.html +++ b/htdocs/gcc-11/changes.html @@ -1097,7 +1097,7 @@ is built as FAT libraries containing both 32 bit and 64 bit objects. -GCC 11.1 +GCC 11.1 This is the https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=11.0";>list of problem reports (PRs) from GCC's bug tracking system that are @@ -1106,7 +1106,7 @@ complete (that is, it is possible that some PRs that have been fixed are not listed here). -GCC 11.2 +GCC 11.2 This is the https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=11.2";>list of problem reports (PRs) from GCC's bug tracking system that are @@ -1116,7 +1116,7 @@ are not listed here). -GCC 11.3 +GCC 11.3 Target Specific Changes -- 2.35.1
Re: [PATCH] wwwdocs: fedora-devel-list archives changes
On Tue, 15 Mar 2022, Jonathan Wakely wrote: >> It appears redhat.com has lost Fedora mailing list archives, which are >> now at lists.fedoraproject.org using completely different tooling. >> >>Jakub, is there a better way than the patch below? > This looks right to me, I don't think there's a better way to link to > those archives. Thank you, Jonathan. I now pushed my patch. Gerald
Re: [PATCH v4] libgo: Don't use pt_regs member in mcontext_t
On Sat, Apr 2, 2022 at 1:21 AM Sören Tempel wrote: > > Thanks for committing a first fix! Unfortunately, your changes don't > work on ppc64le musl since you are now still using .regs on ppc64le the > include of asm/ptrace.h (as added in the v1 of my patch) is missing. > Hence, your patch fails to compile on ppc64le musl with the following > error message: > > go-signal.c:230:63: error: invalid use of undefined type 'struct > pt_regs' > 230 | ret.sigpc = > ((ucontext_t*)(context))->uc_mcontext.regs->nip; > > If you want to continue using .regs on ppc64le an include of > asm/ptrace.h is needed since both glibc and musl declare `struct > pt_regs` as an incomplete type (with glibc asm/ptrace.h is included > indirectly by other headers used by go-signal.c it seems). > > See https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587520.html > > Would be nice if this could be fixed :) Sorry, I guess I misread your patch. What is the right standalone code for the PPC64 musl case? Thanks. Ian