Skip to content
Snippets Groups Projects
Commit f4ccaa45 authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix #122: gcc 11 can't build cmucl

parent ca3deab2
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
include Config.x86_common include Config.x86_common
CFLAGS += $(COPT) CFLAGS += $(COPT)
CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE CPPFLAGS += -m32 -D__NO_CTYPE
CFLAGS += -rdynamic -march=pentium4 -mfpmath=sse -mtune=generic CFLAGS += -rdynamic -march=pentium4 -mfpmath=sse -mtune=generic
UNDEFSYMPATTERN = -Xlinker -u -Xlinker & UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
include Config.x86_common include Config.x86_common
CC = clang CC = clang
CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE CPPFLAGS += -m32 -D__NO_CTYPE
CFLAGS += $(COPT) CFLAGS += $(COPT)
# Allow sse2 instructions (-msse2); and tune for pentium4 # Allow sse2 instructions (-msse2); and tune for pentium4
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
* *
*/ */
#define _GNU_SOURCE /* for reg_* constants in uc_mcontext.gregs */
#include <signal.h>
#include <stdio.h> #include <stdio.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/file.h> #include <sys/file.h>
...@@ -198,6 +200,8 @@ os_sigcontext_reg(ucontext_t *scp, int offset) ...@@ -198,6 +200,8 @@ os_sigcontext_reg(ucontext_t *scp, int offset)
return (unsigned long *) &scp->uc_mcontext.gregs[REG_ESI]; return (unsigned long *) &scp->uc_mcontext.gregs[REG_ESI];
case 14: case 14:
return (unsigned long *) &scp->uc_mcontext.gregs[REG_EDI]; return (unsigned long *) &scp->uc_mcontext.gregs[REG_EDI];
case 16:
return (unsigned long*) &scp->uc_mcontext.gregs[REG_EFL];
} }
return NULL; return NULL;
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#define reg_EBP REG(10) #define reg_EBP REG(10)
#define reg_ESI REG(12) #define reg_ESI REG(12)
#define reg_EDI REG(14) #define reg_EDI REG(14)
#define reg_EFL REG(16)
#define reg_SP reg_ESP #define reg_SP reg_ESP
#define reg_FP reg_EBP #define reg_FP reg_EBP
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
#define SC_EFLAGS(sc) ((sc)->uc_mcontext->ss.eflags) #define SC_EFLAGS(sc) ((sc)->uc_mcontext->ss.eflags)
#endif #endif
#elif defined(__linux__) #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__) #elif defined(__NetBSD__)
#define SC_EFLAGS(sc) ((sc)->uc_mcontext.__gregs[_REG_EFL]) #define SC_EFLAGS(sc) ((sc)->uc_mcontext.__gregs[_REG_EFL])
#elif defined(SOLARIS) #elif defined(SOLARIS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment