changes to compile for Mac OS AArch64
These changes allow cross-compilation of Racket for AArch64. Whether the build actually runs is another question.
This commit is contained in:
parent
1e8bf3cfaa
commit
3b262edfa0
45
racket/src/ChezScheme/c/Mf-arm64osx
Normal file
45
racket/src/ChezScheme/c/Mf-arm64osx
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Mf-a6osx
|
||||||
|
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
m ?= arm64osx
|
||||||
|
Cpu ?= AARCH64
|
||||||
|
|
||||||
|
mdinclude = -I/opt/X11/include/
|
||||||
|
o = o
|
||||||
|
mdsrc ?= arm32le.c
|
||||||
|
mdobj ?= arm32le.o
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c
|
||||||
|
|
||||||
|
include Mf-base
|
||||||
|
|
||||||
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
|
${LD} -r -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
|
${KernelLib}: ${kernelobj}
|
||||||
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${KernelLinkLibs} ${LDFLAGS} ${LIBS}
|
||||||
|
|
||||||
|
../zlib/configure.log:
|
||||||
|
(cd ../zlib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ./configure)
|
||||||
|
|
||||||
|
../lz4/lib/liblz4.a: ${LZ4Sources}
|
||||||
|
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ${MAKE} liblz4.a)
|
5
racket/src/ChezScheme/c/Mf-tarm64osx
Normal file
5
racket/src/ChezScheme/c/Mf-tarm64osx
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Mf-tarm64osx
|
||||||
|
|
||||||
|
m ?= tarm64osx
|
||||||
|
|
||||||
|
include Mf-arm64osx
|
|
@ -41,11 +41,17 @@ void S_doflush(uptr start, uptr end) {
|
||||||
void S_machine_init() {
|
void S_machine_init() {
|
||||||
int l1_dcache_line_size, l1_icache_line_size;
|
int l1_dcache_line_size, l1_icache_line_size;
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
if ((l1_dcache_line_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE)) <= 0) {
|
if ((l1_dcache_line_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE)) <= 0) {
|
||||||
l1_dcache_line_size = DEFAULT_L1_MAX_CACHE_LINE_SIZE;
|
l1_dcache_line_size = DEFAULT_L1_MAX_CACHE_LINE_SIZE;
|
||||||
}
|
}
|
||||||
if ((l1_icache_line_size = sysconf(_SC_LEVEL1_ICACHE_LINESIZE)) <= 0) {
|
if ((l1_icache_line_size = sysconf(_SC_LEVEL1_ICACHE_LINESIZE)) <= 0) {
|
||||||
l1_icache_line_size = DEFAULT_L1_MAX_CACHE_LINE_SIZE;
|
l1_icache_line_size = DEFAULT_L1_MAX_CACHE_LINE_SIZE;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
l1_dcache_line_size = DEFAULT_L1_MAX_CACHE_LINE_SIZE;
|
||||||
|
l1_icache_line_size = DEFAULT_L1_MAX_CACHE_LINE_SIZE;
|
||||||
|
#endif
|
||||||
|
|
||||||
l1_max_cache_line_size = l1_dcache_line_size > l1_icache_line_size ? l1_dcache_line_size : l1_icache_line_size;
|
l1_max_cache_line_size = l1_dcache_line_size > l1_icache_line_size ? l1_dcache_line_size : l1_icache_line_size;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,38 +37,38 @@
|
||||||
# define CAS_ANY_FENCE(a, old, new) ((*(a) == (old)) ? (*(a) = (new), 1) : 0)
|
# define CAS_ANY_FENCE(a, old, new) ((*(a) == (old)) ? (*(a) = (new), 1) : 0)
|
||||||
#elif defined(__arm64__)
|
#elif defined(__arm64__)
|
||||||
FORCEINLINE int CAS_LOAD_ACQUIRE(volatile void *addr, void *old_val, void *new_val) {
|
FORCEINLINE int CAS_LOAD_ACQUIRE(volatile void *addr, void *old_val, void *new_val) {
|
||||||
int ret;
|
long ret;
|
||||||
__asm__ __volatile__ ("mov %0, #0\n\t"
|
__asm__ __volatile__ ("mov %0, #0\n\t"
|
||||||
"0:\n\t"
|
"0:\n\t"
|
||||||
"ldaxr r12, [%1, #0]\n\t"
|
"ldaxr x12, [%1, #0]\n\t"
|
||||||
"cmp r12, %2\n\t"
|
"cmp x12, %2\n\t"
|
||||||
"bne 1f\n\t"
|
"bne 1f\n\t"
|
||||||
"stxr r7, %3, [%1, #0]\n\t"
|
"stxr x7, %3, [%1, #0]\n\t"
|
||||||
"cmp r7, #0\n\t"
|
"cmp x7, #0\n\t"
|
||||||
"bne 1f\n\t"
|
"bne 1f\n\t"
|
||||||
"moveq %0, #1\n\t"
|
"moveq %0, #1\n\t"
|
||||||
"1:\n\t"
|
"1:\n\t"
|
||||||
: "=&r" (ret)
|
: "=&r" (ret)
|
||||||
: "r" (addr), "r" (old_val), "r" (new_val)
|
: "r" (addr), "r" (old_val), "r" (new_val)
|
||||||
: "cc", "memory", "r12", "r7");
|
: "cc", "memory", "x12", "x7");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/* same as above, but ldaxr -> ldxr and stxr -> stlxr */
|
/* same as above, but ldaxr -> ldxr and stxr -> stlxr */
|
||||||
FORCEINLINE int CAS_STORE_RELEASE(volatile void *addr, void *old_val, void *new_val) {
|
FORCEINLINE int CAS_STORE_RELEASE(volatile void *addr, void *old_val, void *new_val) {
|
||||||
int ret;
|
long ret;
|
||||||
__asm__ __volatile__ ("mov %0, #0\n\t"
|
__asm__ __volatile__ ("mov %0, #0\n\t"
|
||||||
"0:\n\t"
|
"0:\n\t"
|
||||||
"ldxr r12, [%1, #0]\n\t"
|
"ldxr x12, [%1, #0]\n\t"
|
||||||
"cmp r12, %2\n\t"
|
"cmp x12, %2\n\t"
|
||||||
"bne 1f\n\t"
|
"bne 1f\n\t"
|
||||||
"stlxr r7, %3, [%1, #0]\n\t"
|
"stlxr x7, %3, [%1, #0]\n\t"
|
||||||
"cmp r7, #0\n\t"
|
"cmp x7, #0\n\t"
|
||||||
"bne 1f\n\t"
|
"bne 1f\n\t"
|
||||||
"moveq %0, #1\n\t"
|
"moveq %0, #1\n\t"
|
||||||
"1:\n\t"
|
"1:\n\t"
|
||||||
: "=&r" (ret)
|
: "=&r" (ret)
|
||||||
: "r" (addr), "r" (old_val), "r" (new_val)
|
: "r" (addr), "r" (old_val), "r" (new_val)
|
||||||
: "cc", "memory", "r12", "r7");
|
: "cc", "memory", "x12", "x7");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
|
|
|
@ -78,6 +78,13 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (machine_type == machine_type_arm64osx || machine_type == machine_type_tarm64osx)
|
||||||
|
# define OS_ANY_MACOSX
|
||||||
|
# if (machine_type == machine_type_tarm64osx)
|
||||||
|
# define PTHREADS
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (machine_type == machine_type_pb)
|
#if (machine_type == machine_type_pb)
|
||||||
# if defined(__powerpc__) && !defined(__powerpc64__)
|
# if defined(__powerpc__) && !defined(__powerpc64__)
|
||||||
# define PORTABLE_BYTECODE_BIGENDIAN
|
# define PORTABLE_BYTECODE_BIGENDIAN
|
||||||
|
|
6
racket/src/ChezScheme/configure
vendored
6
racket/src/ChezScheme/configure
vendored
|
@ -156,6 +156,9 @@ case "${CONFIG_UNAME}" in
|
||||||
m64=a6osx
|
m64=a6osx
|
||||||
tm32=ti3osx
|
tm32=ti3osx
|
||||||
tm64=ta6osx
|
tm64=ta6osx
|
||||||
|
elif uname -a | egrep 'arm|aarch' > /dev/null 2>&1 ; then
|
||||||
|
m64=arm64osx
|
||||||
|
tm64=tarm6osx
|
||||||
fi
|
fi
|
||||||
installprefix=/usr/local
|
installprefix=/usr/local
|
||||||
installmansuffix=share/man
|
installmansuffix=share/man
|
||||||
|
@ -511,6 +514,9 @@ if [ "$cflagsset" = "no" ] ; then
|
||||||
a6osx|ta6osx)
|
a6osx|ta6osx)
|
||||||
CFLAGS="-m64 ${optFlags}"
|
CFLAGS="-m64 ${optFlags}"
|
||||||
;;
|
;;
|
||||||
|
arm64osx|tarm64osx)
|
||||||
|
CFLAGS="-arch arm ${optFlags}"
|
||||||
|
;;
|
||||||
a6nt|ta6nt)
|
a6nt|ta6nt)
|
||||||
CFLAGS="${optFlags}"
|
CFLAGS="${optFlags}"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Mf-tarm64le
|
# Mf-arm64le
|
||||||
# Copyright 1984-2017 Cisco Systems, Inc.
|
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|
21
racket/src/ChezScheme/s/Mf-arm64osx
Normal file
21
racket/src/ChezScheme/s/Mf-arm64osx
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Mf-arm64osx
|
||||||
|
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
m ?= arm64osx
|
||||||
|
archincludes = arm64.ss
|
||||||
|
|
||||||
|
include Mf-base
|
||||||
|
|
||||||
|
machine.def: arm64.def
|
18
racket/src/ChezScheme/s/Mf-tarm64osx
Normal file
18
racket/src/ChezScheme/s/Mf-tarm64osx
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Mf-tarm64osx
|
||||||
|
# Copyright 1984-2017 Cisco Systems, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
m = tarm64osx
|
||||||
|
|
||||||
|
include Mf-arm64osx
|
|
@ -298,8 +298,10 @@
|
||||||
|
|
||||||
(define-instruction value popcount
|
(define-instruction value popcount
|
||||||
[(op (z ur) (x ur))
|
[(op (z ur) (x ur))
|
||||||
(let ([u (make-tmp 'u 'fp)])
|
(let ([u (make-tmp 'u)])
|
||||||
`(set! ,(make-live-info) ,z (asm ,info ,asm-popcount ,x ,u)))])
|
(seq
|
||||||
|
`(set! ,(make-live-info) ,u (asm ,null-info ,asm-kill))
|
||||||
|
`(set! ,(make-live-info) ,z (asm ,info ,asm-popcount ,x ,u))))])
|
||||||
|
|
||||||
(define-instruction value (move)
|
(define-instruction value (move)
|
||||||
[(op (z mem) (x ur))
|
[(op (z mem) (x ur))
|
||||||
|
@ -1254,7 +1256,7 @@
|
||||||
(lambda (op dest code*)
|
(lambda (op dest code*)
|
||||||
(record-case dest
|
(record-case dest
|
||||||
[(label) (offset l)
|
[(label) (offset l)
|
||||||
(safe-assert (uncond-branch-disp? (+ offset 4)))
|
(safe-assert (uncond-branch-disp? offset))
|
||||||
(emit-code (op dest code*)
|
(emit-code (op dest code*)
|
||||||
[26 #b000101]
|
[26 #b000101]
|
||||||
[0 (fxand (fxsra (fx+ offset 4) 2) (fx- (fxsll 1 26) 1))])]
|
[0 (fxand (fxsra (fx+ offset 4) 2) (fx- (fxsll 1 26) 1))])]
|
||||||
|
@ -1550,9 +1552,10 @@
|
||||||
|
|
||||||
(define uncond-branch-disp?
|
(define uncond-branch-disp?
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
(and (fixnum? x)
|
(let ([x (+ x 4)]) ; because `branch-always-label-op` adds 4
|
||||||
(fx<= (- (expt 2 26)) x (- (expt 2 20) 1))
|
(and (fixnum? x)
|
||||||
(not (fxlogtest x #b11)))))
|
(fx<= (- (expt 2 27)) x (- (expt 2 27) 1))
|
||||||
|
(not (fxlogtest x #b11))))))
|
||||||
|
|
||||||
(define asm-size
|
(define asm-size
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
|
|
@ -394,6 +394,7 @@
|
||||||
ppc32le tppc32le
|
ppc32le tppc32le
|
||||||
arm64le tarm64le
|
arm64le tarm64le
|
||||||
pb
|
pb
|
||||||
|
arm64osx tarm64osx
|
||||||
)
|
)
|
||||||
|
|
||||||
(include "machine.def")
|
(include "machine.def")
|
||||||
|
|
|
@ -823,6 +823,8 @@
|
||||||
|
|
||||||
(nl)
|
(nl)
|
||||||
(pr "#define LOCKED_INCR(addr, ret) \\~%")
|
(pr "#define LOCKED_INCR(addr, ret) \\~%")
|
||||||
|
(pr " do {\\~%")
|
||||||
|
(pr " long _return_;\\~%")
|
||||||
(pr " __asm__ __volatile__ (\"mov %0, #0\\n\\t\"\\~%")
|
(pr " __asm__ __volatile__ (\"mov %0, #0\\n\\t\"\\~%")
|
||||||
(pr " \"0:\\n\\t\"\\~%")
|
(pr " \"0:\\n\\t\"\\~%")
|
||||||
(pr " \"ldxr x12, [%1, #0]\\n\\t\"\\~%")
|
(pr " \"ldxr x12, [%1, #0]\\n\\t\"\\~%")
|
||||||
|
@ -834,12 +836,16 @@
|
||||||
(pr " \"bne 1f\\n\\t\"\\~%")
|
(pr " \"bne 1f\\n\\t\"\\~%")
|
||||||
(pr " \"mov %0, #1\\n\\t\"\\~%")
|
(pr " \"mov %0, #1\\n\\t\"\\~%")
|
||||||
(pr " \"1:\\n\\t\"\\~%")
|
(pr " \"1:\\n\\t\"\\~%")
|
||||||
(pr " : \"=&r\" (ret)\\~%")
|
(pr " : \"=&r\" (_return_)\\~%")
|
||||||
(pr " : \"r\" (addr)\\~%")
|
(pr " : \"r\" (addr)\\~%")
|
||||||
(pr " : \"cc\", \"memory\", \"x12\", \"x7\")~%")
|
(pr " : \"cc\", \"memory\", \"x12\", \"x7\");\\~%")
|
||||||
|
(pr " ret = _return_;\\~%")
|
||||||
|
(pr " } while (0)~%")
|
||||||
|
|
||||||
(nl)
|
(nl)
|
||||||
(pr "#define LOCKED_DECR(addr, ret) \\~%")
|
(pr "#define LOCKED_DECR(addr, ret) \\~%")
|
||||||
|
(pr " do {\\~%")
|
||||||
|
(pr " long _return_;\\~%")
|
||||||
(pr " __asm__ __volatile__ (\"mov %0, #0\\n\\t\"\\~%")
|
(pr " __asm__ __volatile__ (\"mov %0, #0\\n\\t\"\\~%")
|
||||||
(pr " \"0:\\n\\t\"\\~%")
|
(pr " \"0:\\n\\t\"\\~%")
|
||||||
(pr " \"ldxr x12, [%1, #0]\\n\\t\"\\~%")
|
(pr " \"ldxr x12, [%1, #0]\\n\\t\"\\~%")
|
||||||
|
@ -851,9 +857,11 @@
|
||||||
(pr " \"bne 1f\\n\\t\"\\~%")
|
(pr " \"bne 1f\\n\\t\"\\~%")
|
||||||
(pr " \"mov %0, #1\\n\\t\"\\~%")
|
(pr " \"mov %0, #1\\n\\t\"\\~%")
|
||||||
(pr " \"1:\\n\\t\"\\~%")
|
(pr " \"1:\\n\\t\"\\~%")
|
||||||
(pr " : \"=&r\" (ret)\\~%")
|
(pr " : \"=&r\" (_return_)\\~%")
|
||||||
(pr " : \"r\" (addr)\\~%")
|
(pr " : \"r\" (addr)\\~%")
|
||||||
(pr " : \"cc\", \"memory\", \"x12\", \"x7\")~%")]
|
(pr " : \"cc\", \"memory\", \"x12\", \"x7\");\\~%")
|
||||||
|
(pr " ret = _return_;\\~%")
|
||||||
|
(pr " } while (0)~%")]
|
||||||
[(pb)
|
[(pb)
|
||||||
(pr "#define INITLOCK(addr) (*((long *) addr) = 0)~%")
|
(pr "#define INITLOCK(addr) (*((long *) addr) = 0)~%")
|
||||||
(pr "#define SPINLOCK(addr) (*((long *) addr) = 1)~%")
|
(pr "#define SPINLOCK(addr) (*((long *) addr) = 1)~%")
|
||||||
|
|
6
racket/src/ChezScheme/s/tarm64osx.def
Normal file
6
racket/src/ChezScheme/s/tarm64osx.def
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
;;; tarm64osx.def
|
||||||
|
|
||||||
|
(define-constant machine-type (constant machine-type-tarm64osx))
|
||||||
|
(features iconv expeditor pthreads)
|
||||||
|
(include "arm64.def")
|
||||||
|
(include "default.def")
|
|
@ -55,6 +55,7 @@ case "$Mhost" in
|
||||||
a6s2) ;;
|
a6s2) ;;
|
||||||
arm32le) ;;
|
arm32le) ;;
|
||||||
arm64le) ;;
|
arm64le) ;;
|
||||||
|
arm64osx) ;;
|
||||||
i3fb) ;;
|
i3fb) ;;
|
||||||
i3le) ;;
|
i3le) ;;
|
||||||
i3nb) ;;
|
i3nb) ;;
|
||||||
|
@ -73,6 +74,7 @@ case "$Mhost" in
|
||||||
ta6s2) Muni=a6s2 ;;
|
ta6s2) Muni=a6s2 ;;
|
||||||
tarm32le) Muni=arm32le ;;
|
tarm32le) Muni=arm32le ;;
|
||||||
tarm64le) Muni=arm64le ;;
|
tarm64le) Muni=arm64le ;;
|
||||||
|
tarm64osx) Muni=arm64osx ;;
|
||||||
ti3fb) Muni=i3fb ;;
|
ti3fb) Muni=i3fb ;;
|
||||||
ti3le) Muni=i3le ;;
|
ti3le) Muni=i3le ;;
|
||||||
ti3nb) Muni=i3nb ;;
|
ti3nb) Muni=i3nb ;;
|
||||||
|
@ -101,6 +103,7 @@ case "$Muniarch" in
|
||||||
a6s2) March=a6 ;;
|
a6s2) March=a6 ;;
|
||||||
arm32le) March=arm32 ;;
|
arm32le) March=arm32 ;;
|
||||||
arm64le) March=arm64 ;;
|
arm64le) March=arm64 ;;
|
||||||
|
arm64osx) March=arm64 ;;
|
||||||
i3fb) March=i3 ;;
|
i3fb) March=i3 ;;
|
||||||
i3le) March=i3 ;;
|
i3le) March=i3 ;;
|
||||||
i3nb) March=i3 ;;
|
i3nb) March=i3 ;;
|
||||||
|
|
|
@ -74,6 +74,7 @@ bc-explain-configure:
|
||||||
|
|
||||||
racketcs:
|
racketcs:
|
||||||
if [ ! -f cs/c/Makefile ]; then $(MAKE) cs-explain-configure; fi
|
if [ ! -f cs/c/Makefile ]; then $(MAKE) cs-explain-configure; fi
|
||||||
|
$(MAKE) @MAKE_LOCAL_RACKET@
|
||||||
$(MAKE) @CS_BOOTSTRAP_HELP@
|
$(MAKE) @CS_BOOTSTRAP_HELP@
|
||||||
cd cs/c && $(MAKE) @CS_USE_BOOTSTRAP_HELP@
|
cd cs/c && $(MAKE) @CS_USE_BOOTSTRAP_HELP@
|
||||||
|
|
||||||
|
@ -90,13 +91,13 @@ cs-explain-configure:
|
||||||
no-local-racket:
|
no-local-racket:
|
||||||
$(NOOP)
|
$(NOOP)
|
||||||
|
|
||||||
local/bc/racket3m:
|
@RUN_LOCAL_RACKET@:
|
||||||
mkdir -p local
|
mkdir -p local
|
||||||
$(MAKE) local/Makefile
|
$(MAKE) local/Makefile
|
||||||
cd local && $(MAKE)
|
cd local && $(MAKE)
|
||||||
|
|
||||||
local/Makefile:
|
local/Makefile:
|
||||||
cd local && `cd ..; cd $(srcdir); pwd`/configure --disable-gracket
|
cd local && `cd ..; cd $(srcdir); pwd`/configure --disable-gracket @CONFIGURE_LOCAL_RACKET@
|
||||||
|
|
||||||
# Install (common) ----------------------------------------
|
# Install (common) ----------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -353,7 +353,13 @@ Cross-compilation requires at least two flags to `configure`:
|
||||||
run `configure` again (with no arguments) in a "local" subdirectory
|
run `configure` again (with no arguments) in a "local" subdirectory
|
||||||
to create a build for the current platform.
|
to create a build for the current platform.
|
||||||
|
|
||||||
Some less commonly needed `configure` flags for Racket BC:
|
An additional flag is needed for building Racket CS, unless the flag
|
||||||
|
`--enable-racket=auto` is used:
|
||||||
|
|
||||||
|
* `--enable-scheme=DIR`, where DIR is a path that has a "ChezScheme"
|
||||||
|
directory where Chez Scheme is built for the host system.
|
||||||
|
|
||||||
|
Some less commonly needed `configure` flags are for Racket BC:
|
||||||
|
|
||||||
* `--enable-stackup`, if the target platform`s stack grows up.
|
* `--enable-stackup`, if the target platform`s stack grows up.
|
||||||
|
|
||||||
|
|
1
racket/src/bc/configure
vendored
1
racket/src/bc/configure
vendored
|
@ -6948,6 +6948,7 @@ fi
|
||||||
############## Racket for Racket ################
|
############## Racket for Racket ################
|
||||||
|
|
||||||
if test "${enable_racket}" = "auto" ; then
|
if test "${enable_racket}" = "auto" ; then
|
||||||
|
# See also "configure-parent.ac"
|
||||||
enable_racket="`pwd`/../local/bc/racket3m"
|
enable_racket="`pwd`/../local/bc/racket3m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,8 @@ MAKE_LOCAL_RACKET=no-local-racket
|
||||||
if test "${enable_racket}" = "auto" ; then
|
if test "${enable_racket}" = "auto" ; then
|
||||||
MAKE_LOCAL_RACKET="local/bc/racket3m"
|
MAKE_LOCAL_RACKET="local/bc/racket3m"
|
||||||
fi
|
fi
|
||||||
|
RUN_LOCAL_RACKET="local/bc/racket3m"
|
||||||
|
CONFIGURE_LOCAL_RACKET=--enable-bc
|
||||||
|
|
||||||
if test "${enable_cgcdefault}" = "yes" ; then
|
if test "${enable_cgcdefault}" = "yes" ; then
|
||||||
MAIN_VARIANT=cgc
|
MAIN_VARIANT=cgc
|
||||||
|
@ -48,6 +50,8 @@ RUN_RACKET="bc/racket${MAIN_VARIANT}"
|
||||||
|
|
||||||
AC_SUBST(RUN_RACKET)
|
AC_SUBST(RUN_RACKET)
|
||||||
AC_SUBST(MAKE_LOCAL_RACKET)
|
AC_SUBST(MAKE_LOCAL_RACKET)
|
||||||
|
AC_SUBST(RUN_LOCAL_RACKET)
|
||||||
|
AC_SUBST(CONFIGURE_LOCAL_RACKET)
|
||||||
|
|
||||||
makefiles="Makefile"
|
makefiles="Makefile"
|
||||||
|
|
||||||
|
|
|
@ -1277,6 +1277,7 @@ fi
|
||||||
############## Racket for Racket ################
|
############## Racket for Racket ################
|
||||||
|
|
||||||
if test "${enable_racket}" = "auto" ; then
|
if test "${enable_racket}" = "auto" ; then
|
||||||
|
# See also "configure-parent.ac"
|
||||||
enable_racket="`pwd`/../local/bc/racket3m"
|
enable_racket="`pwd`/../local/bc/racket3m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ case "${host}" in
|
||||||
MSVC=1
|
MSVC=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
aarch64*-*-*)
|
aarch64*-*-* | arm64*-*-*)
|
||||||
TARGET=AARCH64; TARGETDIR=aarch64
|
TARGET=AARCH64; TARGETDIR=aarch64
|
||||||
SOURCES="ffi.c sysv.S"
|
SOURCES="ffi.c sysv.S"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -124,23 +124,41 @@ static void unregister_mach_thread() {
|
||||||
# define ARCH_thread_state_t ppc_thread_state_t
|
# define ARCH_thread_state_t ppc_thread_state_t
|
||||||
# define ARCH_THREAD_STATE PPC_THREAD_STATE
|
# define ARCH_THREAD_STATE PPC_THREAD_STATE
|
||||||
# define ARCH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
|
# define ARCH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
|
||||||
#elif defined(__arm__) || defined(__arm64__)
|
#elif defined(__arm__)
|
||||||
# define ARCH_thread_state_t arm_thread_state_t
|
# define ARCH_thread_state_t arm_thread_state_t
|
||||||
# define ARCH_THREAD_STATE ARM_THREAD_STATE
|
# define ARCH_THREAD_STATE ARM_THREAD_STATE
|
||||||
# define ARCH_THREAD_STATE_COUNT ARM_THREAD_STATE_COUNT
|
# define ARCH_THREAD_STATE_COUNT ARM_THREAD_STATE_COUNT
|
||||||
#elif defined(__x86_64__)
|
#elif defined(__x86_64__)
|
||||||
|
# define ARCH_exception_state_t x86_exception_state64_t
|
||||||
|
# define ARCH_EXCEPTION_STATE x86_EXCEPTION_STATE64
|
||||||
|
# define ARCH_EXCEPTION_STATE_COUNT x86_EXCEPTION_STATE64_COUNT
|
||||||
# define ARCH_thread_state_t x86_thread_state64_t
|
# define ARCH_thread_state_t x86_thread_state64_t
|
||||||
# define ARCH_THREAD_STATE x86_THREAD_STATE64
|
# define ARCH_THREAD_STATE x86_THREAD_STATE64
|
||||||
# define ARCH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
|
# define ARCH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
|
||||||
# define USE_THREAD_STATE
|
# define USE_THREAD_STATE
|
||||||
# include <mach/thread_status.h>
|
# include <mach/thread_status.h>
|
||||||
# include <mach/exception.h>
|
# include <mach/exception.h>
|
||||||
|
#elif defined(__arm64__)
|
||||||
|
# define ARCH_exception_state_t arm_exception_state64_t
|
||||||
|
# define ARCH_EXCEPTION_STATE ARM_EXCEPTION_STATE64
|
||||||
|
# define ARCH_EXCEPTION_STATE_COUNT ARM_EXCEPTION_STATE64_COUNT
|
||||||
|
# define ARCH_thread_state_t arm_thread_state64_t
|
||||||
|
# define ARCH_THREAD_STATE ARM_THREAD_STATE64
|
||||||
|
# define ARCH_THREAD_STATE_COUNT ARM_THREAD_STATE64_COUNT
|
||||||
|
# define ARCH_FAULTVADDR_FIELD THREAD_FLD(far)
|
||||||
|
# define USE_THREAD_STATE
|
||||||
|
# include <mach/thread_status.h>
|
||||||
|
# include <mach/exception.h>
|
||||||
#else
|
#else
|
||||||
# define ARCH_thread_state_t i386_thread_state_t
|
# define ARCH_thread_state_t i386_thread_state_t
|
||||||
# define ARCH_THREAD_STATE i386_THREAD_STATE
|
# define ARCH_THREAD_STATE i386_THREAD_STATE
|
||||||
# define ARCH_THREAD_STATE_COUNT i386_THREAD_STATE_COUNT
|
# define ARCH_THREAD_STATE_COUNT i386_THREAD_STATE_COUNT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef ARCH_FAULTVADDR_FIELD
|
||||||
|
# define ARCH_FAULTVADDR_FIELD THREAD_FLD(faultvaddr)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* the structure of an exception msg and its reply */
|
/* the structure of an exception msg and its reply */
|
||||||
typedef struct rep_msg {
|
typedef struct rep_msg {
|
||||||
mach_msg_header_t head;
|
mach_msg_header_t head;
|
||||||
|
@ -311,11 +329,11 @@ kern_return_t GC_catch_exception_raise(mach_port_t port,
|
||||||
p = (void*)exception_data[1];
|
p = (void*)exception_data[1];
|
||||||
#else
|
#else
|
||||||
/* We have to do it this way for 64-bit mode: */
|
/* We have to do it this way for 64-bit mode: */
|
||||||
x86_exception_state64_t exc_state;
|
ARCH_exception_state_t exc_state;
|
||||||
mach_msg_type_number_t exc_state_count = x86_EXCEPTION_STATE64_COUNT;
|
mach_msg_type_number_t exc_state_count = ARCH_EXCEPTION_STATE_COUNT;
|
||||||
(void)thread_get_state(thread_port, x86_EXCEPTION_STATE64, (natural_t*)&exc_state,
|
(void)thread_get_state(thread_port, ARCH_EXCEPTION_STATE, (natural_t*)&exc_state,
|
||||||
&exc_state_count);
|
&exc_state_count);
|
||||||
p = (void *)exc_state. THREAD_FLD(faultvaddr);
|
p = (void *)exc_state.ARCH_FAULTVADDR_FIELD;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MZ_USE_PLACES)
|
#if defined(MZ_USE_PLACES)
|
||||||
|
|
|
@ -585,6 +585,8 @@ ac_unique_file="setup-go.rkt"
|
||||||
enable_option_checking=no
|
enable_option_checking=no
|
||||||
ac_subst_vars='LTLIBOBJS
|
ac_subst_vars='LTLIBOBJS
|
||||||
LIBOBJS
|
LIBOBJS
|
||||||
|
CONFIGURE_LOCAL_RACKET
|
||||||
|
RUN_LOCAL_RACKET
|
||||||
RUN_RACKET
|
RUN_RACKET
|
||||||
CS_USE_BOOTSTRAP_HELP
|
CS_USE_BOOTSTRAP_HELP
|
||||||
CS_BOOTSTRAP_HELP
|
CS_BOOTSTRAP_HELP
|
||||||
|
@ -2325,6 +2327,8 @@ MAKE_LOCAL_RACKET=no-local-racket
|
||||||
if test "${enable_racket}" = "auto" ; then
|
if test "${enable_racket}" = "auto" ; then
|
||||||
MAKE_LOCAL_RACKET="local/bc/racket3m"
|
MAKE_LOCAL_RACKET="local/bc/racket3m"
|
||||||
fi
|
fi
|
||||||
|
RUN_LOCAL_RACKET="local/bc/racket3m"
|
||||||
|
CONFIGURE_LOCAL_RACKET=--enable-bc
|
||||||
|
|
||||||
if test "${enable_cgcdefault}" = "yes" ; then
|
if test "${enable_cgcdefault}" = "yes" ; then
|
||||||
MAIN_VARIANT=cgc
|
MAIN_VARIANT=cgc
|
||||||
|
@ -2337,6 +2341,8 @@ RUN_RACKET="bc/racket${MAIN_VARIANT}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
makefiles="Makefile"
|
makefiles="Makefile"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files $makefiles"
|
ac_config_files="$ac_config_files $makefiles"
|
||||||
|
|
|
@ -585,6 +585,8 @@ ac_unique_file="setup-go.rkt"
|
||||||
enable_option_checking=no
|
enable_option_checking=no
|
||||||
ac_subst_vars='LTLIBOBJS
|
ac_subst_vars='LTLIBOBJS
|
||||||
LIBOBJS
|
LIBOBJS
|
||||||
|
CONFIGURE_LOCAL_RACKET
|
||||||
|
RUN_LOCAL_RACKET
|
||||||
RUN_RACKET
|
RUN_RACKET
|
||||||
CS_USE_BOOTSTRAP_HELP
|
CS_USE_BOOTSTRAP_HELP
|
||||||
CS_BOOTSTRAP_HELP
|
CS_BOOTSTRAP_HELP
|
||||||
|
@ -2231,6 +2233,12 @@ fi
|
||||||
|
|
||||||
MAKE_LOCAL_RACKET=no-local-racket
|
MAKE_LOCAL_RACKET=no-local-racket
|
||||||
|
|
||||||
|
if test "${enable_racket}" = "auto" ; then
|
||||||
|
MAKE_LOCAL_RACKET="local/cs/c/racketcs"
|
||||||
|
fi
|
||||||
|
RUN_LOCAL_RACKET="local/cs/c/racketcs"
|
||||||
|
CONFIGURE_LOCAL_RACKET=--enable-cs
|
||||||
|
|
||||||
MAIN_MAKE_TARGET=racketcs
|
MAIN_MAKE_TARGET=racketcs
|
||||||
MAIN_VARIANT=3m
|
MAIN_VARIANT=3m
|
||||||
|
|
||||||
|
@ -2239,6 +2247,8 @@ RUN_RACKET="cs/c/racketcs"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
makefiles="Makefile"
|
makefiles="Makefile"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files $makefiles"
|
ac_config_files="$ac_config_files $makefiles"
|
||||||
|
|
|
@ -8,7 +8,7 @@ SCHEME_DIR = $(srcdir)/../../ChezScheme
|
||||||
UP_SCHEME_DIR = $(upsrcdir)/../../ChezScheme
|
UP_SCHEME_DIR = $(upsrcdir)/../../ChezScheme
|
||||||
SCHEME_WORKAREA = ChezScheme
|
SCHEME_WORKAREA = ChezScheme
|
||||||
MACH = @MACH@
|
MACH = @MACH@
|
||||||
CS_HOST_WORKAREA_PREFIX =
|
CS_HOST_WORKAREA_PREFIX = @CS_HOST_WORKAREA_PREFIX@
|
||||||
SCHEME_HOST_WORKAREA = $(CS_HOST_WORKAREA_PREFIX)$(SCHEME_WORKAREA)
|
SCHEME_HOST_WORKAREA = $(CS_HOST_WORKAREA_PREFIX)$(SCHEME_WORKAREA)
|
||||||
SCHEME_BIN = $(SCHEME_HOST_WORKAREA)/$(MACH)/bin/$(MACH)/scheme
|
SCHEME_BIN = $(SCHEME_HOST_WORKAREA)/$(MACH)/bin/$(MACH)/scheme
|
||||||
SCHEME_INC = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)
|
SCHEME_INC = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)
|
||||||
|
|
27
racket/src/cs/c/configure
vendored
27
racket/src/cs/c/configure
vendored
|
@ -627,6 +627,7 @@ INSTALL_LIBS_ENABLE
|
||||||
INSTALL_SETUP_RACKET_FLAGS
|
INSTALL_SETUP_RACKET_FLAGS
|
||||||
INSTALL_SETUP_FLAGS
|
INSTALL_SETUP_FLAGS
|
||||||
RUN_RACKET
|
RUN_RACKET
|
||||||
|
CS_HOST_WORKAREA_PREFIX
|
||||||
CROSS_COMPILE_TARGET_KIND
|
CROSS_COMPILE_TARGET_KIND
|
||||||
COMP_SUBDIR_CONFIGURE_ARGS
|
COMP_SUBDIR_CONFIGURE_ARGS
|
||||||
ENABLE_OR_DISABLE_WPO
|
ENABLE_OR_DISABLE_WPO
|
||||||
|
@ -1431,8 +1432,8 @@ Optional Features:
|
||||||
--enable-pkgscope=<s> set `raco pkg' default: installation, user, or shared
|
--enable-pkgscope=<s> set `raco pkg' default: installation, user, or shared
|
||||||
--enable-docs build docs on install (enabled by default)
|
--enable-docs build docs on install (enabled by default)
|
||||||
--enable-usersetup setup user-specific files on install
|
--enable-usersetup setup user-specific files on install
|
||||||
--enable-racket=<path> use <path> as Racket to build; or "auto" to create
|
--enable-racket=<path> use <path> as Racket for build; or "auto" to create
|
||||||
--enable-scheme=<path> obsolete
|
--enable-scheme=<path> use <path> as host's build directory for cross
|
||||||
--enable-mach=<mach> use Chez Scheme machine type <mach>
|
--enable-mach=<mach> use Chez Scheme machine type <mach>
|
||||||
--enable-target=<mach> cross-build for Chez Scheme machine type <mach>
|
--enable-target=<mach> cross-build for Chez Scheme machine type <mach>
|
||||||
--enable-natipkg add "-natipkg" to library subpath
|
--enable-natipkg add "-natipkg" to library subpath
|
||||||
|
@ -3199,6 +3200,8 @@ LZ4_LIB_DEP='$(OWN_LZ4_LIB)'
|
||||||
LZ4_LIB='$(OWN_LZ4_LIB)'
|
LZ4_LIB='$(OWN_LZ4_LIB)'
|
||||||
LZ4_LIB_UNPACK='$(AR) x $(OWN_LZ4_LIB)'
|
LZ4_LIB_UNPACK='$(AR) x $(OWN_LZ4_LIB)'
|
||||||
|
|
||||||
|
CS_HOST_WORKAREA_PREFIX=
|
||||||
|
|
||||||
PLT_CS_SLSP_SUFFIX=
|
PLT_CS_SLSP_SUFFIX=
|
||||||
|
|
||||||
enable_pthread_by_default=yes
|
enable_pthread_by_default=yes
|
||||||
|
@ -4479,12 +4482,12 @@ case "$MACH_HOST_CPU" in
|
||||||
x86|i*86)
|
x86|i*86)
|
||||||
MACH="${thread_prefix}i3${MACH_OS}"
|
MACH="${thread_prefix}i3${MACH_OS}"
|
||||||
;;
|
;;
|
||||||
|
aarch64*|arm64*)
|
||||||
|
MACH="${thread_prefix}arm64${MACH_OS}"
|
||||||
|
;;
|
||||||
arm*)
|
arm*)
|
||||||
MACH="${thread_prefix}arm32${MACH_OS}"
|
MACH="${thread_prefix}arm32${MACH_OS}"
|
||||||
;;
|
;;
|
||||||
aarch64*)
|
|
||||||
MACH="${thread_prefix}arm64${MACH_OS}"
|
|
||||||
;;
|
|
||||||
power*)
|
power*)
|
||||||
MACH="${thread_prefix}ppc32${MACH_OS}"
|
MACH="${thread_prefix}ppc32${MACH_OS}"
|
||||||
;;
|
;;
|
||||||
|
@ -4536,12 +4539,12 @@ elif test "${build_os}_${build_cpu}" != "${host_os}_${host_cpu}" ; then
|
||||||
x86|i*86)
|
x86|i*86)
|
||||||
BUILD_MACH="${BUILD_THREAD_PREFIX}i3${BUILD_OS}"
|
BUILD_MACH="${BUILD_THREAD_PREFIX}i3${BUILD_OS}"
|
||||||
;;
|
;;
|
||||||
|
aarch64*|arm64*)
|
||||||
|
BUILD_MACH="${BUILD_THREAD_PREFIX}arm64${BUILD_OS}"
|
||||||
|
;;
|
||||||
arm*)
|
arm*)
|
||||||
BUILD_MACH="${BUILD_THREAD_PREFIX}arm32${BUILD_OS}"
|
BUILD_MACH="${BUILD_THREAD_PREFIX}arm32${BUILD_OS}"
|
||||||
;;
|
;;
|
||||||
aarch64*)
|
|
||||||
BUILD_MACH="${BUILD_THREAD_PREFIX}arm64${BUILD_OS}"
|
|
||||||
;;
|
|
||||||
power*)
|
power*)
|
||||||
BUILD_MACH="${BUILD_THREAD_PREFIX}ppc32${BUILD_OS}"
|
BUILD_MACH="${BUILD_THREAD_PREFIX}ppc32${BUILD_OS}"
|
||||||
;;
|
;;
|
||||||
|
@ -4583,10 +4586,15 @@ SCHEME_DIR=${srcdir}/../../ChezScheme
|
||||||
MAKE_BUILD_SCHEME=checkout
|
MAKE_BUILD_SCHEME=checkout
|
||||||
|
|
||||||
if test "${enable_scheme}" != "" ; then
|
if test "${enable_scheme}" != "" ; then
|
||||||
echo Warning: --enable-scheme=... is obsolete and unsupported
|
CS_HOST_WORKAREA_PREFIX="${enable_scheme}/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "${enable_racket}" != "" ; then
|
if test "${enable_racket}" != "" ; then
|
||||||
|
if test "${enable_racket}" = "auto" ; then
|
||||||
|
# See also "configure-parent.ac"
|
||||||
|
enable_racket="`pwd`/../../local/cs/c/racketcs"
|
||||||
|
CS_HOST_WORKAREA_PREFIX=../../local/cs/c/
|
||||||
|
fi
|
||||||
# In non-cross mode, we interpret `--enable-racket` to supply a
|
# In non-cross mode, we interpret `--enable-racket` to supply a
|
||||||
# Racket used only for generating Chez Scheme boot files
|
# Racket used only for generating Chez Scheme boot files
|
||||||
if test "${CROSS_MODE}" = "cross" ; then
|
if test "${CROSS_MODE}" = "cross" ; then
|
||||||
|
@ -5644,6 +5652,7 @@ SCHEME_CROSS_CONFIG_ARGS="--machine=${TARGET_MACH} --disable-x11 ${cs_auto_flags
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
makefiles="Makefile"
|
makefiles="Makefile"
|
||||||
|
|
|
@ -24,6 +24,12 @@ m4_include(../ac/boothelp.m4)
|
||||||
|
|
||||||
MAKE_LOCAL_RACKET=no-local-racket
|
MAKE_LOCAL_RACKET=no-local-racket
|
||||||
|
|
||||||
|
if test "${enable_racket}" = "auto" ; then
|
||||||
|
MAKE_LOCAL_RACKET="local/cs/c/racketcs"
|
||||||
|
fi
|
||||||
|
RUN_LOCAL_RACKET="local/cs/c/racketcs"
|
||||||
|
CONFIGURE_LOCAL_RACKET=--enable-cs
|
||||||
|
|
||||||
MAIN_MAKE_TARGET=racketcs
|
MAIN_MAKE_TARGET=racketcs
|
||||||
MAIN_VARIANT=3m
|
MAIN_VARIANT=3m
|
||||||
|
|
||||||
|
@ -31,6 +37,8 @@ RUN_RACKET="cs/c/racketcs"
|
||||||
|
|
||||||
AC_SUBST(RUN_RACKET)
|
AC_SUBST(RUN_RACKET)
|
||||||
AC_SUBST(MAKE_LOCAL_RACKET)
|
AC_SUBST(MAKE_LOCAL_RACKET)
|
||||||
|
AC_SUBST(RUN_LOCAL_RACKET)
|
||||||
|
AC_SUBST(CONFIGURE_LOCAL_RACKET)
|
||||||
|
|
||||||
makefiles="Makefile"
|
makefiles="Makefile"
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ AC_ARG_ENABLE(wpo, [ --enable-wpo agressively optimize Racket
|
||||||
AC_ARG_ENABLE(compress, [ --enable-compress compress compiled code (enabled by default)])
|
AC_ARG_ENABLE(compress, [ --enable-compress compress compiled code (enabled by default)])
|
||||||
AC_ARG_ENABLE(compressboot, [ --enable-compressboot compress boot files])
|
AC_ARG_ENABLE(compressboot, [ --enable-compressboot compress boot files])
|
||||||
m4_include(../ac/path_arg.m4)
|
m4_include(../ac/path_arg.m4)
|
||||||
AC_ARG_ENABLE(racket, [ --enable-racket=<path> use <path> as Racket to build; or "auto" to create])
|
AC_ARG_ENABLE(racket, [ --enable-racket=<path> use <path> as Racket for build; or "auto" to create])
|
||||||
AC_ARG_ENABLE(scheme, [ --enable-scheme=<path> obsolete])
|
AC_ARG_ENABLE(scheme, [ --enable-scheme=<path> use <path> as host's build directory for cross])
|
||||||
AC_ARG_ENABLE(mach, [ --enable-mach=<mach> use Chez Scheme machine type <mach>])
|
AC_ARG_ENABLE(mach, [ --enable-mach=<mach> use Chez Scheme machine type <mach>])
|
||||||
AC_ARG_ENABLE(target, [ --enable-target=<mach> cross-build for Chez Scheme machine type <mach>])
|
AC_ARG_ENABLE(target, [ --enable-target=<mach> cross-build for Chez Scheme machine type <mach>])
|
||||||
m4_include(../ac/natipkg_arg.m4)
|
m4_include(../ac/natipkg_arg.m4)
|
||||||
|
@ -157,6 +157,8 @@ LZ4_LIB_DEP='$(OWN_LZ4_LIB)'
|
||||||
LZ4_LIB='$(OWN_LZ4_LIB)'
|
LZ4_LIB='$(OWN_LZ4_LIB)'
|
||||||
LZ4_LIB_UNPACK='$(AR) x $(OWN_LZ4_LIB)'
|
LZ4_LIB_UNPACK='$(AR) x $(OWN_LZ4_LIB)'
|
||||||
|
|
||||||
|
CS_HOST_WORKAREA_PREFIX=
|
||||||
|
|
||||||
PLT_CS_SLSP_SUFFIX=
|
PLT_CS_SLSP_SUFFIX=
|
||||||
|
|
||||||
enable_pthread_by_default=yes
|
enable_pthread_by_default=yes
|
||||||
|
@ -346,12 +348,12 @@ case "$MACH_HOST_CPU" in
|
||||||
x86|i*86)
|
x86|i*86)
|
||||||
MACH="${thread_prefix}i3${MACH_OS}"
|
MACH="${thread_prefix}i3${MACH_OS}"
|
||||||
;;
|
;;
|
||||||
|
aarch64*|arm64*)
|
||||||
|
MACH="${thread_prefix}arm64${MACH_OS}"
|
||||||
|
;;
|
||||||
arm*)
|
arm*)
|
||||||
MACH="${thread_prefix}arm32${MACH_OS}"
|
MACH="${thread_prefix}arm32${MACH_OS}"
|
||||||
;;
|
;;
|
||||||
aarch64*)
|
|
||||||
MACH="${thread_prefix}arm64${MACH_OS}"
|
|
||||||
;;
|
|
||||||
power*)
|
power*)
|
||||||
MACH="${thread_prefix}ppc32${MACH_OS}"
|
MACH="${thread_prefix}ppc32${MACH_OS}"
|
||||||
;;
|
;;
|
||||||
|
@ -403,12 +405,12 @@ elif test "${build_os}_${build_cpu}" != "${host_os}_${host_cpu}" ; then
|
||||||
x86|i*86)
|
x86|i*86)
|
||||||
BUILD_MACH="${BUILD_THREAD_PREFIX}i3${BUILD_OS}"
|
BUILD_MACH="${BUILD_THREAD_PREFIX}i3${BUILD_OS}"
|
||||||
;;
|
;;
|
||||||
|
aarch64*|arm64*)
|
||||||
|
BUILD_MACH="${BUILD_THREAD_PREFIX}arm64${BUILD_OS}"
|
||||||
|
;;
|
||||||
arm*)
|
arm*)
|
||||||
BUILD_MACH="${BUILD_THREAD_PREFIX}arm32${BUILD_OS}"
|
BUILD_MACH="${BUILD_THREAD_PREFIX}arm32${BUILD_OS}"
|
||||||
;;
|
;;
|
||||||
aarch64*)
|
|
||||||
BUILD_MACH="${BUILD_THREAD_PREFIX}arm64${BUILD_OS}"
|
|
||||||
;;
|
|
||||||
power*)
|
power*)
|
||||||
BUILD_MACH="${BUILD_THREAD_PREFIX}ppc32${BUILD_OS}"
|
BUILD_MACH="${BUILD_THREAD_PREFIX}ppc32${BUILD_OS}"
|
||||||
;;
|
;;
|
||||||
|
@ -450,10 +452,15 @@ SCHEME_DIR=${srcdir}/../../ChezScheme
|
||||||
MAKE_BUILD_SCHEME=checkout
|
MAKE_BUILD_SCHEME=checkout
|
||||||
|
|
||||||
if test "${enable_scheme}" != "" ; then
|
if test "${enable_scheme}" != "" ; then
|
||||||
echo Warning: --enable-scheme=... is obsolete and unsupported
|
CS_HOST_WORKAREA_PREFIX="${enable_scheme}/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "${enable_racket}" != "" ; then
|
if test "${enable_racket}" != "" ; then
|
||||||
|
if test "${enable_racket}" = "auto" ; then
|
||||||
|
# See also "configure-parent.ac"
|
||||||
|
enable_racket="`pwd`/../../local/cs/c/racketcs"
|
||||||
|
CS_HOST_WORKAREA_PREFIX=../../local/cs/c/
|
||||||
|
fi
|
||||||
# In non-cross mode, we interpret `--enable-racket` to supply a
|
# In non-cross mode, we interpret `--enable-racket` to supply a
|
||||||
# Racket used only for generating Chez Scheme boot files
|
# Racket used only for generating Chez Scheme boot files
|
||||||
if test "${CROSS_MODE}" = "cross" ; then
|
if test "${CROSS_MODE}" = "cross" ; then
|
||||||
|
@ -764,6 +771,7 @@ AC_SUBST(CS_COMPILED_SUBDIR)
|
||||||
AC_SUBST(ENABLE_OR_DISABLE_WPO)
|
AC_SUBST(ENABLE_OR_DISABLE_WPO)
|
||||||
AC_SUBST(COMP_SUBDIR_CONFIGURE_ARGS)
|
AC_SUBST(COMP_SUBDIR_CONFIGURE_ARGS)
|
||||||
AC_SUBST(CROSS_COMPILE_TARGET_KIND)
|
AC_SUBST(CROSS_COMPILE_TARGET_KIND)
|
||||||
|
AC_SUBST(CS_HOST_WORKAREA_PREFIX)
|
||||||
AC_SUBST(RUN_RACKET)
|
AC_SUBST(RUN_RACKET)
|
||||||
AC_SUBST(INSTALL_SETUP_FLAGS)
|
AC_SUBST(INSTALL_SETUP_FLAGS)
|
||||||
AC_SUBST(INSTALL_SETUP_RACKET_FLAGS)
|
AC_SUBST(INSTALL_SETUP_RACKET_FLAGS)
|
||||||
|
|
|
@ -53,7 +53,8 @@
|
||||||
bstr3 terminator))
|
bstr3 terminator))
|
||||||
(define pos
|
(define pos
|
||||||
(case (or target (path->string (system-library-subpath #f)))
|
(case (or target (path->string (system-library-subpath #f)))
|
||||||
[("x86_64-darwin" "i386-darwin" "x86_64-macosx" "i386-macosx")
|
[("x86_64-darwin" "i386-darwin" "aarch64-darwin"
|
||||||
|
"x86_64-macosx" "i386-macosx" "aarch64-macosx")
|
||||||
;; Mach-O
|
;; Mach-O
|
||||||
(copy-file use-src-file dest-file #t)
|
(copy-file use-src-file dest-file #t)
|
||||||
(add-plt-segment dest-file data #:name #"__RKTBOOT")
|
(add-plt-segment dest-file data #:name #"__RKTBOOT")
|
||||||
|
|
|
@ -26,9 +26,12 @@
|
||||||
|
|
||||||
(define os*-symbol
|
(define os*-symbol
|
||||||
(case (machine-type)
|
(case (machine-type)
|
||||||
[(a6osx ta6osx i3osx ti3osx) (if unix-style-macos?
|
[(a6osx ta6osx
|
||||||
'darwin
|
i3osx ti3osx
|
||||||
'macosx)]
|
arm64osx tarm64osx)
|
||||||
|
(if unix-style-macos?
|
||||||
|
'darwin
|
||||||
|
'macosx)]
|
||||||
[(a6nt ta6nt i3nt ti3nt) 'windows]
|
[(a6nt ta6nt i3nt ti3nt) 'windows]
|
||||||
[(a6le ta6le i3le ti3le
|
[(a6le ta6le i3le ti3le
|
||||||
arm32le tarm32le arm64le tarm64le
|
arm32le tarm32le arm64le tarm64le
|
||||||
|
|
Loading…
Reference in New Issue
Block a user