Andreas Klebinger pushed to branch wip/andreask/9.10.4-batch1 at Glasgow Haskell Compiler / GHC Commits: 7c378328 by Phil Hazelden at 2026-10-23T10:51:05+02:00 Fix build with werror on glibc 2.43. We've been defining `_XOPEN_SOURCE` and `_POSIX_C_SOURCE` to the same values as defined in glibc prior to 2.43. But in 2.43, glibc changes them to new values, which means we get a warning when redefining them. By `#undef`ing them first, we no longer get a warning. Closes #27076. (cherry picked from commit 47a41f27ddfbf8cc3fa8c80f4acdd3d7137f29f2) - - - - - 146fc9b7 by Sven Tennie at 2026-10-23T11:25:24+02:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. (cherry picked from commit 3b2dc826c9d4e65546ae3083303fdd491e74bd5a) - - - - - 3 changed files: - libraries/ghc-heap/tests/stack_misc_closures_c.c - rts/include/rts/PosixSource.h - testsuite/tests/rts/pause-resume/list_threads_and_misc_roots_c.c Changes: ===================================== libraries/ghc-heap/tests/stack_misc_closures_c.c ===================================== @@ -193,7 +193,7 @@ void create_any_bco_frame(Capability *cap, StgStack *stack, StgWord w) { StgWord bcoSizeWords = sizeofW(StgBCO) + sizeofW(StgLargeBitmap) + sizeofW(StgWord); StgBCO *bco = (StgBCO *)allocate(cap, bcoSizeWords); - SET_HDR(bco, &stg_BCO_info, CCS_MAIN); + SET_HDR(bco, (StgInfoTable*) &stg_BCO_info, CCS_MAIN); c->payload[0] = (StgClosure *)bco; bco->size = bcoSizeWords; ===================================== rts/include/rts/PosixSource.h ===================================== @@ -29,6 +29,8 @@ Oracle's Solaris 11 supports only up to XPG6, hence the ifdef. */ +#undef _POSIX_C_SOURCE +#undef _XOPEN_SOURCE #if defined(solaris2_HOST_OS) #define _POSIX_C_SOURCE 200112L #define _XOPEN_SOURCE 600 ===================================== testsuite/tests/rts/pause-resume/list_threads_and_misc_roots_c.c ===================================== @@ -27,10 +27,10 @@ void checkGcRoots(void) rts_listThreads(&collectTSOsCallback, NULL); for (int i = 0; i < tsoCount; i++) { - StgTSO *tso = UNTAG_CLOSURE(tsos[i]); + StgClosure *tso = UNTAG_CLOSURE((StgClosure*) tsos[i]); if (get_itbl(tso)->type != TSO) { - fprintf(stderr, "tso returned a non-TSO type %zu at index %i\n", + fprintf(stderr, "tso returned a non-TSO type %u at index %i\n", tso->header.info->type, i); exit(1); @@ -44,7 +44,7 @@ void checkGcRoots(void) StgClosure *root = UNTAG_CLOSURE(miscRoots[i]); if (get_itbl(root)->type == TSO) { - fprintf(stderr, "rts_listThreads unexpectedly returned an TSO type at index %i (TSO=%zu)\n", i, TSO); + fprintf(stderr, "rts_listThreads unexpectedly returned an TSO type at index %i (TSO=%d)\n", i, TSO); exit(1); } } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/44b8c8f03fc9645708d762e53760f69... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/44b8c8f03fc9645708d762e53760f69... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Andreas Klebinger (@AndreasK)