[Git][ghc/ghc][wip/rts-warnings] 5 commits: rts: Fix incorrect #include <sys/poll.h>
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Feb 8 17:58:54 UTC 2023
Ben Gamari pushed to branch wip/rts-warnings at Glasgow Haskell Compiler / GHC
Commits:
19d3431f by Ben Gamari at 2023-02-08T12:39:28-05:00
rts: Fix incorrect #include <sys/poll.h>
According to Alpine's warnings and poll(2), <poll.h> should be
preferred.
- - - - -
bc271a31 by Ben Gamari at 2023-02-08T12:39:28-05:00
nonmoving: Fix unused definition warrnings
- - - - -
58ad9b0b by Ben Gamari at 2023-02-08T12:39:28-05:00
hadrian: Ensure that -Werror is passed to C compilations
Previously the `+werror` transformer would only pass `-Werror` to GHC,
which does not ensure that the same is passed to the C compiler.
Arguably this is itself a bug but for now we will just work around this
by passing `-optc-Werror` to GHC.
- - - - -
062f5b2d by Ben Gamari at 2023-02-08T12:39:28-05:00
Disable futimens on Darwin.
See #22938
- - - - -
e63d0cb8 by Ben Gamari at 2023-02-08T12:40:58-05:00
rts: Fix incorrect CPP guard
- - - - -
7 changed files:
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- hadrian/src/Flavour.hs
- rts/posix/Ticker.c
- rts/posix/ticker/Pthread.c
- rts/posix/ticker/TimerFd.c
- rts/sm/NonMovingMark.c
Changes:
=====================================
.gitlab/gen_ci.hs
=====================================
@@ -391,6 +391,8 @@ opsysVariables Amd64 (Darwin {}) =
, "ac_cv_func_clock_gettime" =: "no"
-- # Only newer OS Xs support utimensat. See #17895
, "ac_cv_func_utimensat" =: "no"
+ -- # Only newer OS Xs support futimens. See #22938
+ , "ac_cv_func_futimens" =: "no"
, "LANG" =: "en_US.UTF-8"
, "CONFIGURE_ARGS" =: "--with-intree-gmp --with-system-libffi"
-- Fonts can't be installed on darwin
=====================================
.gitlab/jobs.yaml
=====================================
@@ -480,6 +480,7 @@
"TEST_ENV": "x86_64-darwin-validate",
"XZ_OPT": "-9",
"ac_cv_func_clock_gettime": "no",
+ "ac_cv_func_futimens": "no",
"ac_cv_func_utimensat": "no"
}
},
@@ -2356,6 +2357,7 @@
"TEST_ENV": "x86_64-darwin-release",
"XZ_OPT": "-9",
"ac_cv_func_clock_gettime": "no",
+ "ac_cv_func_futimens": "no",
"ac_cv_func_utimensat": "no"
}
},
@@ -3337,6 +3339,7 @@
"NIX_SYSTEM": "x86_64-darwin",
"TEST_ENV": "x86_64-darwin-validate",
"ac_cv_func_clock_gettime": "no",
+ "ac_cv_func_futimens": "no",
"ac_cv_func_utimensat": "no"
}
},
=====================================
hadrian/src/Flavour.hs
=====================================
@@ -122,16 +122,22 @@ addArgs args' fl = fl { args = args fl <> args' }
-- from warnings.
werror :: Flavour -> Flavour
werror =
- addArgs
- ( builder Ghc
+ addArgs $ mconcat
+ [ builder Ghc
? notStage0
? mconcat
- [ arg "-Werror",
- flag CrossCompiling
+ [ arg "-Werror"
+ , arg "-optc-Werror"
+ , arg "-optc-Wno-error=unknown-pragmas"
+ , flag CrossCompiling
? package unix
? mconcat [arg "-Wwarn=unused-imports", arg "-Wwarn=unused-top-binds"]
+ -- Darwin has marked sem_getvalue as deprecated.
+ , package unix ? arg "-optc-Wno-error=deprecated-declarations"
+ -- Darwin has marked vfork as deprecated.
+ , package process ? arg "-optc-Wno-error=deprecated-declarations"
]
- )
+ ]
-- | Build C and Haskell objects with debugging information.
enableDebugInfo :: Flavour -> Flavour
=====================================
rts/posix/Ticker.c
=====================================
@@ -71,7 +71,7 @@
* For older version of linux/netbsd without timerfd we fall back to the
* pthread based implementation.
*/
-#if HAVE_SYS_TIMERFD_H
+#if defined(HAVE_SYS_TIMERFD_H)
#define USE_TIMERFD_FOR_ITIMER
#endif
=====================================
rts/posix/ticker/Pthread.c
=====================================
@@ -43,7 +43,7 @@
#include "Proftimer.h"
#include "Schedule.h"
#include "posix/Clock.h"
-#include <sys/poll.h>
+#include <poll.h>
#include <time.h>
#if HAVE_SYS_TIME_H
=====================================
rts/posix/ticker/TimerFd.c
=====================================
@@ -43,7 +43,7 @@
#include "Proftimer.h"
#include "Schedule.h"
#include "posix/Clock.h"
-#include <sys/poll.h>
+#include <poll.h>
#include <time.h>
#if HAVE_SYS_TIME_H
=====================================
rts/sm/NonMovingMark.c
=====================================
@@ -27,8 +27,10 @@
#include "sm/Storage.h"
#include "CNF.h"
+#if defined(THREADED_RTS)
static void nonmovingResetUpdRemSetQueue (MarkQueue *rset);
static void nonmovingResetUpdRemSet (UpdRemSet *rset);
+#endif
static bool check_in_nonmoving_heap(StgClosure *p);
static void mark_closure (MarkQueue *queue, const StgClosure *p, StgClosure **origin);
static void trace_tso (MarkQueue *queue, StgTSO *tso);
@@ -940,6 +942,7 @@ void nonmovingInitUpdRemSet (UpdRemSet *rset)
rset->queue.is_upd_rem_set = true;
}
+#if defined(THREADED_RTS)
static void nonmovingResetUpdRemSetQueue (MarkQueue *rset)
{
// UpdRemSets always have one block for the mark queue. This assertion is to
@@ -949,10 +952,11 @@ static void nonmovingResetUpdRemSetQueue (MarkQueue *rset)
rset->top->head = 0;
}
-void nonmovingResetUpdRemSet (UpdRemSet *rset)
+static void nonmovingResetUpdRemSet (UpdRemSet *rset)
{
nonmovingResetUpdRemSetQueue(&rset->queue);
}
+#endif
void freeMarkQueue (MarkQueue *queue)
{
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ef6fb93654a424edc943076163f2e6d279f19dd9...e63d0cb85962f006989ab0902b9b5b38ee9a47f7
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ef6fb93654a424edc943076163f2e6d279f19dd9...e63d0cb85962f006989ab0902b9b5b38ee9a47f7
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230208/16f59ff8/attachment-0001.html>
More information about the ghc-commits
mailing list