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

Merge branch 'issue-122-gnu-source' into 'master'

Fix #122: gcc 11 can't build cmucl

Closes #122

See merge request !84
parents ca3deab2 f4ccaa45
No related branches found
No related tags found
No related merge requests found
......@@ -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 &
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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)
......
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