[Git][cmucl/cmucl][master] 2 commits: Fix #122: gcc 11 can't build cmucl
Raymond Toy (@rtoy)
gitlab at common-lisp.net
Sun Jun 26 22:08:03 UTC 2022
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
f4ccaa45 by Raymond Toy at 2022-06-26T22:07:54+00:00
Fix #122: gcc 11 can't build cmucl
- - - - -
00907500 by Raymond Toy at 2022-06-26T22:07:54+00:00
Merge branch 'issue-122-gnu-source' into 'master'
Fix #122: gcc 11 can't build cmucl
Closes #122
See merge request cmucl/cmucl!84
- - - - -
4 changed files:
- src/lisp/Config.x86_linux
- src/lisp/Config.x86_linux_clang
- src/lisp/Linux-os.c
- src/lisp/x86-lispregs.h
Changes:
=====================================
src/lisp/Config.x86_linux
=====================================
@@ -2,7 +2,7 @@
include Config.x86_common
CFLAGS += $(COPT)
-CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE
+CPPFLAGS += -m32 -D__NO_CTYPE
CFLAGS += -rdynamic -march=pentium4 -mfpmath=sse -mtune=generic
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
=====================================
src/lisp/Config.x86_linux_clang
=====================================
@@ -2,7 +2,7 @@
include Config.x86_common
CC = clang
-CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE
+CPPFLAGS += -m32 -D__NO_CTYPE
CFLAGS += $(COPT)
# Allow sse2 instructions (-msse2); and tune for pentium4
=====================================
src/lisp/Linux-os.c
=====================================
@@ -17,6 +17,8 @@
*
*/
+#define _GNU_SOURCE /* for reg_* constants in uc_mcontext.gregs */
+#include <signal.h>
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
@@ -198,6 +200,8 @@ os_sigcontext_reg(ucontext_t *scp, int offset)
return (unsigned long *) &scp->uc_mcontext.gregs[REG_ESI];
case 14:
return (unsigned long *) &scp->uc_mcontext.gregs[REG_EDI];
+ case 16:
+ return (unsigned long*) &scp->uc_mcontext.gregs[REG_EFL];
}
return NULL;
}
=====================================
src/lisp/x86-lispregs.h
=====================================
@@ -30,6 +30,7 @@
#define reg_EBP REG(10)
#define reg_ESI REG(12)
#define reg_EDI REG(14)
+#define reg_EFL REG(16)
#define reg_SP reg_ESP
#define reg_FP reg_EBP
@@ -60,7 +61,7 @@
#define SC_EFLAGS(sc) ((sc)->uc_mcontext->ss.eflags)
#endif
#elif defined(__linux__)
-#define SC_EFLAGS(sc) ((sc)->uc_mcontext.gregs[REG_EFL])
+#define SC_EFLAGS(sc) SC_REG(sc, reg_EFL)
#elif defined(__NetBSD__)
#define SC_EFLAGS(sc) ((sc)->uc_mcontext.__gregs[_REG_EFL])
#elif defined(SOLARIS)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/ca3deab27d85d3fbfbc6d9650b456e8c006e5ef6...00907500388dcbabd1130618f67028656fa1f396
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/ca3deab27d85d3fbfbc6d9650b456e8c006e5ef6...00907500388dcbabd1130618f67028656fa1f396
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20220626/13f5dcdc/attachment-0001.html>
More information about the cmucl-cvs
mailing list