Ported to Linux/m68k. The patches were kindly provided by
Jes Sorensen <Jes.Sorensen@cern.ch>.
This commit is contained in:
Родитель
22ead6a0b1
Коммит
3f358d0703
|
@ -72,6 +72,17 @@ endif
|
|||
ifeq ($(CPU_ARCH),x86)
|
||||
PLATFORM_FLAGS += -mno-486 -DLINUX1_2 -Di386
|
||||
endif
|
||||
ifeq ($(CPU_ARCH),m68k)
|
||||
#
|
||||
# gcc on Linux/m68k either has a bug or triggers a code-sequence
|
||||
# bug in the 68060 which causes gcc to crash. The simplest way to
|
||||
# avoid this is to enable a minimum level of optimization.
|
||||
#
|
||||
ifndef BUILD_OPT
|
||||
OPTIMIZER += -O
|
||||
endif
|
||||
PLATFORM_FLAGS += -m68020-40 -DLINUX1_2
|
||||
endif
|
||||
|
||||
ifeq ($(OS_RELEASE),2.0)
|
||||
PLATFORM_FLAGS += -DLINUX2_0
|
||||
|
|
|
@ -116,7 +116,51 @@
|
|||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#else
|
||||
#elif defined(__mc68000__)
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 2
|
||||
#define PR_ALIGN_OF_LONG 2
|
||||
#define PR_ALIGN_OF_INT64 2
|
||||
#define PR_ALIGN_OF_FLOAT 2
|
||||
#define PR_ALIGN_OF_DOUBLE 2
|
||||
#define PR_ALIGN_OF_POINTER 2
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#else /* x86 */
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#define _PR_SI_ARCHITECTURE "ppc"
|
||||
#elif defined(__alpha)
|
||||
#define _PR_SI_ARCHITECTURE "alpha"
|
||||
#elif defined(__mc68000__)
|
||||
#define _PR_SI_ARCHITECTURE "m68k"
|
||||
#else
|
||||
#define _PR_SI_ARCHITECTURE "x86"
|
||||
#endif
|
||||
|
@ -97,6 +99,22 @@ extern void _MD_CleanupBeforeExit(void);
|
|||
/* XXX not sure if this is correct, or maybe it should be 17? */
|
||||
#define PR_NUM_GCREGS 9
|
||||
|
||||
#elif defined(__mc68000__)
|
||||
/* m68k based Linux */
|
||||
|
||||
/*
|
||||
* On the m68k, glibc still uses the old style sigjmp_buf, even
|
||||
* in glibc 2.0.7.
|
||||
*/
|
||||
#if defined(__GLIBC__) && __GLIBC__ >= 2
|
||||
#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__sp
|
||||
#else
|
||||
#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__sp
|
||||
#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
|
||||
|
||||
/* XXX not sure if this is correct, or maybe it should be 17? */
|
||||
#define PR_NUM_GCREGS 9
|
||||
|
||||
#else
|
||||
/* Intel based Linux */
|
||||
#if defined(__GLIBC__) && __GLIBC__ >= 2
|
||||
|
|
Загрузка…
Ссылка в новой задаче