Chez Scheme: clean up "Mf-<unix>" and "<unix>.def"

Replace lots of mostly-duplicated "Mf-<platform>" and "<platform>.def"
files with just a few "Mf-unix" and and "unix.def" files plus
configuration within "configure" and "workarea". Also change
"version.h" to infer more OS details (as was used for pb, anyway).
This change simplifies setting up configurations for different
platforms, and it makes it easier to share among similar
configurations.
This commit is contained in:
Matthew Flatt 2021-04-29 19:18:23 -06:00
parent 744d8d6d25
commit b058be9bfc
169 changed files with 410 additions and 2915 deletions

View File

@ -344,7 +344,7 @@ RACKET_FOR_BOOTFILES = $(RACKET)
RACKET_FOR_BUILD = $(RACKET)
# This branch name changes each time the pb boot files are updated:
PB_BRANCH == circa-8.0.0.10-1
PB_BRANCH == circa-8.1.0.4-1
PB_REPO = https://github.com/racket/pb
# Set to empty for Git before v1.7.10:

View File

@ -47,7 +47,7 @@ RACKETCS_SUFFIX =
RACKET =
RACKET_FOR_BOOTFILES = $(RACKET)
RACKET_FOR_BUILD = $(RACKET)
PB_BRANCH = circa-8.0.0.10-1
PB_BRANCH = circa-8.1.0.4-1
PB_REPO = https://github.com/racket/pb
SINGLE_BRANCH_FLAG = --single-branch
EXTRA_REPOS_BASE =
@ -310,18 +310,18 @@ maybe-fetch-pb-as-is:
echo done
fetch-pb-from:
mkdir -p racket/src/ChezScheme/boot
if [ ! -d racket/src/ChezScheme/boot/pb ] ; then git clone -q $(SINGLE_BRANCH_FLAG) -b circa-8.0.0.10-1 $(PB_REPO) racket/src/ChezScheme/boot/pb ; else cd racket/src/ChezScheme/boot/pb && git fetch -q origin circa-8.0.0.10-1:remotes/origin/circa-8.0.0.10-1 ; fi
cd racket/src/ChezScheme/boot/pb && git checkout -q circa-8.0.0.10-1
if [ ! -d racket/src/ChezScheme/boot/pb ] ; then git clone -q $(SINGLE_BRANCH_FLAG) -b circa-8.1.0.4-1 $(PB_REPO) racket/src/ChezScheme/boot/pb ; else cd racket/src/ChezScheme/boot/pb && git fetch -q origin circa-8.1.0.4-1:remotes/origin/circa-8.1.0.4-1 ; fi
cd racket/src/ChezScheme/boot/pb && git checkout -q circa-8.1.0.4-1
pb-fetch:
$(MAKE) fetch-pb EXTRA_REPOS_BASE="$(EXTRA_REPOS_BASE)" PB_REPO="$(PB_REPO)" SINGLE_BRANCH_FLAG="$(SINGLE_BRANCH_FLAG)"
pb-build:
cd racket/src/ChezScheme && racket rktboot/main.rkt --machine pb
pb-stage:
cd racket/src/ChezScheme/boot/pb && git branch circa-8.0.0.10-1
cd racket/src/ChezScheme/boot/pb && git checkout circa-8.0.0.10-1
cd racket/src/ChezScheme/boot/pb && git branch circa-8.1.0.4-1
cd racket/src/ChezScheme/boot/pb && git checkout circa-8.1.0.4-1
cd racket/src/ChezScheme/boot/pb && git add . && git commit --amend -m "new build"
pb-push:
cd racket/src/ChezScheme/boot/pb && git push -u origin circa-8.0.0.10-1
cd racket/src/ChezScheme/boot/pb && git push -u origin circa-8.1.0.4-1
win-cs-base:
IF "$(RACKET_FOR_BUILD)" == "" $(MAKE) win-bc-then-cs-base SETUP_BOOT_MODE=--boot WIN32_BUILD_LEVEL=bc PLAIN_RACKET=racket\racketbc DISABLE_STATIC_LIBS="$(DISABLE_STATIC_LIBS)" EXTRA_REPOS_BASE="$(EXTRA_REPOS_BASE)" JOB_OPTIONS="$(JOB_OPTIONS)" PLT_SETUP_OPTIONS="$(PLT_SETUP_OPTIONS)" RACKETBC_SUFFIX="$(RACKETBC_SUFFIX)" RACKETCS_SUFFIX="$(RACKETCS_SUFFIX)"
IF not "$(RACKET_FOR_BUILD)" == "" $(MAKE) win-just-cs-base SETUP_BOOT_MODE=--chain DISABLE_STATIC_LIBS="$(DISABLE_STATIC_LIBS)" EXTRA_REPOS_BASE="$(EXTRA_REPOS_BASE)" JOB_OPTIONS="$(JOB_OPTIONS)" PLT_SETUP_OPTIONS="$(PLT_SETUP_OPTIONS)" RACKETCS_SUFFIX="$(RACKETCS_SUFFIX)" RACKET_FOR_BUILD="$(RACKET_FOR_BUILD)"

View File

@ -23,9 +23,10 @@ Some key files in "s":
* "x86_64.ss", "arm64.ss", etc.: backends that are used by
"cpnanopass.ss" and "cpprim.ss"
* "ta6os.def", "tarm64le", etc.: one per OS-architecture combination,
provides platform-specific constants that feed into "cmacro.ss" and
selects the backend used by "cpnanopass.ss" and "cpprim.ss"
* "ppc32osx.def", "tppc32osx.def", etc., with common combinations
produced from the "unix.def" and "tunix.def" templates: provides
platform-specific constants that feed into "cmacro.ss" and selects
the backend used by "cpnanopass.ss" and "cpprim.ss"
Chez Scheme is a bootstrapped compiler, meaning you need a Chez Scheme
compiler to build a Chez Scheme compiler. The compiler and makefiles
@ -54,11 +55,13 @@ directory "boot/*machine-type*". (If it doesn't find them, then
configuration cannot continue.)
The supported machine types are listed in "cmacros.ss" and reflected
by a "boot/*machine-type*" directory for boot and headers files, a
"s/*machine-type*.def" file to describe the platform, a
"s/Mf-*machine-type*" makefile to select relevant files in "s", a
"c/Mf-*machine-type*" makefile for configration in "c", and a
"mats/Mf-*machine-type*" makefile to configure testing.
by a "boot/*machine-type*" directory for boot and headers files and a
combination of "s/*kind*.def" files to describe the platform. There
may also be a "s/Mf-*machine-type*" makefile to select relevant files
in "s", a "c/Mf-*machine-type*" makefile for configration in "c", and
a "mats/Mf-*machine-type*" makefile to configure testing, but Unix
machine types are handled by Mf-unix and variables configured in the
"configure" and "workarea" scripts.
The "workarea" script in the root of the Chez Scheme project is used
to generate a subdirectory with the appropriate contents to build for
@ -89,21 +92,23 @@ handled by having the Scheme compiler generate a couple of C headers:
"scheme.h" and "equates.h", that the contain the information about the
Scheme compiler the C kernel needs to do its job.
Most of the work of porting to a new platform is producing a new
"*machine-type*.def" file, which (except in simple ports to a new
operating system) will require a new "*ISA*.ss" compiler backend.
You'll also have to set up all the "Mf-*machine-type*" makefiles and
update "configure", "cmacro.ss", and "version.h"---plus maybe other
files, such as "workarea" if you create new dependencies among "Mf-"
or ".def" files (e.g., "workarea" needs to know that "a6nt.def" uses
"a6.def" and "nt.def"). Once you have all of the pieces working
together, you cross-compile boot files, then copy them over to the the
new machine to start compiling there.
You can port to a new operating system by imitating the files and
configuration of a similar supported operating system, but building a
new backend for a new processor requires much more understanding of
the compiler and runtime system.
You can port to a new operating system by imitating the files of a
similar supported oerating system, but building a new backend for a
new processor requires much more understanding of the compiler and
runtime system.
Most of the work of porting to a new architecture is producing a new
"*ISA*.ss" compiler backend, and there will be a "*arch*.def" file to
go with it. For all ports, including a new operating system on an
already-supported architecture, you'll need to update "configure",
"workarea", "cmacro.ss", and possibly "version.h". If the generic
"unix.def" and/or "tunix.def" templates do not work for the
OS--architecture combination, you'll need to create a new
"*machine-type*.def" file.
Once you have all of the pieces working together, you cross-compile
boot files, then copy them over to the the new machine to start
compiling there.
# Adding Functionality

View File

@ -1,45 +0,0 @@
# Mf-a6fb
# 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 ?= a6fb
Cpu ?= X86_64
mdinclude = -I/usr/local/include -I/usr/X11R6/include
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.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 -X -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 --64)
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ${MAKE} liblz4.a)

View File

@ -1,44 +0,0 @@
# Mf-a6le
# 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 ?= a6le
Cpu ?= X86_64
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.o
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
include Mf-base
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -melf_x86_64 -r -X -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 --64)
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ${MAKE} liblz4.a)

View File

@ -1,46 +0,0 @@
# Mf-a6nb
# 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 ?= a6nb
Cpu ?= X86_64
mdinclude = -I/usr/X11R7/include -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/local/include -I/usr/X11R6/include
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.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 -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
${KernelLib}: ${kernelobj}
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
$C -o ${Scheme} ${Main} ${Kernel} ${KernelLinkLibs} ${LDFLAGS} ${LIBS}
paxctl +m ${Scheme}
../zlib/configure.log:
(cd ../zlib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ./configure --64)
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ${MAKE} liblz4.a)

View File

@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
m ?= a6nt
Cpu ?= X86_64
clib=

View File

@ -1,45 +0,0 @@
# Mf-a6ob
# 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 ?= a6ob
Cpu ?= X86_64
mdinclude = -I/usr/local/include -I/usr/X11R6/include
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.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 -X -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 --64)
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ${MAKE} liblz4.a)

View File

@ -1,44 +0,0 @@
# 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 ?= a6osx
Cpu ?= X86_64
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.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 --64)
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ${MAKE} liblz4.a)

View File

@ -1,44 +0,0 @@
# Mf-a6s2
# 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 ?= a6s2
Cpu ?= X86_64
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.o
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c -DSOLARIS -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
include Mf-base
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -melf_x86_64 -r -X -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 --64)
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ${MAKE} liblz4.a)

View File

@ -1,44 +0,0 @@
# Mf-arm32le
# 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 ?= arm32le
Cpu ?= ARMV6
o = o
mdsrc ?= arm32le.c
mdobj ?= arm32le.o
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
include Mf-base
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -r -X -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)

View File

@ -1,44 +0,0 @@
# Mf-arm64le
# 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 ?= tarm64le
Cpu ?= AARCH64
o = o
mdsrc ?= arm32le.c
mdobj ?= arm32le.o
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
include Mf-base
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -r -X -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)

View File

@ -1,44 +0,0 @@
# 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
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}" LDFLAGS="${LDFLAGS}" ./configure)
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ${MAKE} liblz4.a)

View File

@ -15,6 +15,9 @@
include Mf-config
mdsrc ?= ${mdarchsrc}.c
mdobj ?= ${mdarchsrc}.o
Include=../boot/$m
PetiteBoot=../boot/$m/petite.boot
SchemeBoot=../boot/$m/scheme.boot

View File

@ -1,45 +0,0 @@
# Mf-i3fb
# 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 ?= i3fb
Cpu ?= I386
mdinclude = -I/usr/local/include -I/usr/X11R6/include
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.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 -X -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)

View File

@ -1,44 +0,0 @@
# Mf-i3le
# 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 ?= i3le
Cpu ?= I386
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.o
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
include Mf-base
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -melf_i386 -r -X -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)

View File

@ -1,46 +0,0 @@
# Mf-i3nb
# 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 ?= i3nb
Cpu ?= I386
mdinclude = -I/usr/X11R7/include -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/X11R6/include
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.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} -m elf_i386 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
${KernelLib}: ${kernelobj}
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
$C -o ${Scheme} ${Main} ${Kernel} ${KernelLinkLibs} ${LDFLAGS} ${LIBS}
paxctl +m ${Scheme}
../zlib/configure.log:
(cd ../zlib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ./configure)
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" ${MAKE} liblz4.a)

View File

@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
m ?= i3nt
Cpu ?= I386
clib=

View File

@ -1,45 +0,0 @@
# Mf-i3ob
# 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 ?= i3ob
Cpu ?= I386
mdinclude = -I/usr/local/include -I/usr/X11R6/include
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.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 -X -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)

View File

@ -1,44 +0,0 @@
# Mf-i3osx
# 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 ?= i3osx
Cpu ?= I386
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.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)

View File

@ -1,45 +0,0 @@
# Mf-i3qnx
# 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 ?= i3qnx
Cpu ?= I386
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.o
LocalInclude = /usr/local/include
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} -I${LocalInclude} $*.c
include Mf-base
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -mi386nto -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
${KernelLib}: ${kernelobj}
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
$C -Wl,--export-dynamic -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)

View File

@ -1,44 +0,0 @@
# Mf-i3s2
# 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 ?= i3s2
Cpu ?= I386
o = o
mdsrc ?= i3le.c
mdobj ?= i3le.o
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c -DSOLARIS -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
include Mf-base
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -melf_i386 -r -X -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)

View File

@ -1,9 +0,0 @@
# Mf-pb
# Override definitions in `Mf-pbhost`
m = pb
Cpu = PORTABLE_BYTECODE
mdsrc = pb.c
mdobj = pb.o
include Mf-pbhost

View File

@ -1,44 +0,0 @@
# Mf-ppc32le
# 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 ?= ppc32le
Cpu ?= PPC32
o = o
mdsrc ?= ppc32.c
mdobj ?= ppc32.o
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
include Mf-base
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -r -X -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)

View File

@ -1,32 +0,0 @@
# Mf-ppc32osx
m ?= ppc32osx
Cpu ?= PPC32
mdinclude = -I/opt/X11/include/
o = o
mdsrc ?= ppc32.c
mdobj ?= ppc32.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)

View File

@ -1,5 +0,0 @@
# Mf-ta6fb
m ?= ta6fb
include Mf-a6fb

View File

@ -1,5 +0,0 @@
# Mf-ta6le
m ?= ta6le
include Mf-a6le

View File

@ -1,6 +0,0 @@
# Mf-ta6nb
m ?= ta6nb
include Mf-a6nb

View File

@ -1,5 +1,4 @@
# Mf-ta6nt
m ?= ta6nt
include Mf-a6nt

View File

@ -1,5 +0,0 @@
# Mf-ta6ob
m ?= ta6ob
include Mf-a6ob

View File

@ -1,5 +0,0 @@
# Mf-ta6osx
m ?= ta6osx
include Mf-a6osx

View File

@ -1,5 +0,0 @@
# Mf-ta6s2
m ?= ta6s2
include Mf-a6s2

View File

@ -1,5 +0,0 @@
# Mf-tarm32le
m ?= tarm32le
include Mf-arm32le

View File

@ -1,5 +0,0 @@
# Mf-tarm64le
m ?= tarm64le
include Mf-arm64le

View File

@ -1,5 +0,0 @@
# Mf-tarm64osx
m ?= tarm64osx
include Mf-arm64osx

View File

@ -1,5 +0,0 @@
# Mf-ti3fb
m ?= ti3fb
include Mf-i3fb

View File

@ -1,5 +0,0 @@
# Mf-ti3le
m ?= ti3le
include Mf-i3le

View File

@ -1,5 +0,0 @@
# Mf-ti3nb
m ?= ti3nb
include Mf-i3nb

View File

@ -1,5 +1,4 @@
# Mf-ti3nt
m ?= ti3nt
include Mf-i3nt

View File

@ -1,5 +0,0 @@
# Mf-ti3ob
m ?= ti3ob
include Mf-i3ob

View File

@ -1,5 +0,0 @@
# Mf-ti3osx
m ?= ti3osx
include Mf-i3osx

View File

@ -1,5 +0,0 @@
# Mf-ti3s2
m ?= ti3s2
include Mf-i3s2

View File

@ -1,5 +0,0 @@
# Mf-tppc32le
m ?= tppc32le
include Mf-ppc32le

View File

@ -1,5 +0,0 @@
# Mf-tppc32osx
m ?= tppc32osx
include Mf-ppc32osx

View File

@ -0,0 +1,25 @@
o = o
include Mf-base
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$C -c ${mdcppflags} -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
${LD} -r -X ${mdldflags} -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
${KernelLib}: ${kernelobj}
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
$C ${mdlinkflags} -o ${Scheme} ${Main} ${Kernel} ${KernelLinkLibs} ${LDFLAGS} ${LIBS}
${exePostStep}
../zlib/configure.log:
(cd ../zlib; ${SetConfigEnv} CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ./configure ${zlibConfigureFlags})
../lz4/lib/liblz4.a: ${LZ4Sources}
(cd ../lz4/lib; ${SetConfigEnv} CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ${MAKE} liblz4.a)

View File

@ -16,112 +16,31 @@
#include "config.h"
#if (machine_type == machine_type_arm32le || machine_type == machine_type_tarm32le || machine_type == machine_type_arm64le || machine_type == machine_type_tarm64le)
# define OS_ANY_LINUX
# if (machine_type == machine_type_tarm32le || machine_type == machine_type_tarm64le)
#if defined(scheme_feature_pthreads)
# define PTHREADS
#endif
# define OS_ANY_LINUX
# define LITTLE_ENDIAN_IEEE_DOUBLE
/*****************************************/
/* Architectures */
#if (defined(__powerpc__) || defined(__POWERPC__)) && !defined(__powerpc64__)
# define PORTABLE_BYTECODE_BIGENDIAN
# define BIG_ENDIAN_IEEE_DOUBLE
# define FLUSHCACHE
#endif
#if (machine_type == machine_type_ppc32le || machine_type == machine_type_tppc32le || machine_type == machine_type_ppc64le || machine_type == machine_type_tppc64le)
# define OS_ANY_LINUX
# if (machine_type == machine_type_tppc32le || machine_type == machine_type_tppc64le)
# define PTHREADS
# endif
# define FLUSHCACHE
#endif
#if (machine_type == machine_type_i3le || machine_type == machine_type_ti3le || machine_type == machine_type_a6le || machine_type == machine_type_ta6le)
# define OS_ANY_LINUX
# if (machine_type == machine_type_ti3le || machine_type == machine_type_ta6le)
# define PTHREADS
# endif
# define LITTLE_ENDIAN_IEEE_DOUBLE
#endif
#if (machine_type == machine_type_i3fb || machine_type == machine_type_ti3fb || machine_type == machine_type_a6fb || machine_type == machine_type_ta6fb)
# define OS_ANY_FREEBSD
# if (machine_type == machine_type_ti3fb || machine_type == machine_type_ta6fb)
# define PTHREADS
# endif
# define LITTLE_ENDIAN_IEEE_DOUBLE
#endif
#if (machine_type == machine_type_i3nb || machine_type == machine_type_ti3nb || machine_type == machine_type_a6nb || machine_type == machine_type_ta6nb)
# define OS_ANY_NETBSD
# if (machine_type == machine_type_ti3nb || machine_type == machine_type_ta6nb)
# define PTHREADS
# endif
#endif
#if (machine_type == machine_type_i3nt || machine_type == machine_type_ti3nt || machine_type == machine_type_a6nt || machine_type == machine_type_ta6nt)
# define OS_ANY_WINDOWS
# if (machine_type == machine_type_ti3nt || machine_type == machine_type_ta6nt)
# define PTHREADS
# endif
#endif
#if (machine_type == machine_type_i3ob || machine_type == machine_type_ti3ob || machine_type == machine_type_a6ob || machine_type == machine_type_ta6ob)
# define OS_ANY_OPENBSD
# if (machine_type == machine_type_ti3ob || machine_type == machine_type_ta6ob)
# define PTHREADS
# endif
#endif
#if (machine_type == machine_type_i3osx || machine_type == machine_type_ti3osx || machine_type == machine_type_a6osx || machine_type == machine_type_ta6osx)
# define OS_ANY_MACOSX
# if (machine_type == machine_type_ti3osx || machine_type == machine_type_ta6osx)
# define PTHREADS
# 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
# define FLUSHCACHE
#endif
#if (machine_type == machine_type_ppc32osx || machine_type == machine_type_tppc32osx)
# define OS_ANY_MACOSX
# if (machine_type == machine_type_tppc32osx)
# define PTHREADS
# endif
#if (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
# define FLUSHCACHE
#endif
#if (machine_type == machine_type_pb)
# if (defined(__powerpc__) || defined(__POWERPC__)) && !defined(__powerpc64__)
# define PORTABLE_BYTECODE_BIGENDIAN
# endif
# if defined(__linux__)
# define OS_ANY_LINUX
# ifndef PORTABLE_BYTECODE_BIGENDIAN
# define LITTLE_ENDIAN_IEEE_DOUBLE
# endif
# elif defined(__NetBSD__)
# define OS_ANY_NETBSD
# elif defined(__OpenBSD__) && !defined(__Bitrig__)
# define OS_ANY_OPENBSD
# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# define OS_ANY_FREEBSD
# ifndef PORTABLE_BYTECODE_BIGENDIAN
# define LITTLE_ENDIAN_IEEE_DOUBLE
# endif
# elif defined(_MSC_VER) || defined(__MINGW32__)
# define OS_ANY_WINDOWS
# elif __APPLE__
# define OS_ANY_MACOSX
# elif defined(sun)
# define OS_ANY_SOLARIS2
# endif
# undef FLUSHCACHE
#endif
#ifdef OS_ANY_LINUX
/*****************************************/
/* Operating systems */
#if defined(__linux__)
#define NOBLOCK O_NONBLOCK
#define LOAD_SHARED_OBJECT
#define USE_MMAP
@ -158,7 +77,7 @@ typedef int tputsputcchar;
#define UNUSED __attribute__((__unused__))
#endif
#ifdef OS_ANY_FREEBSD
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define NOBLOCK O_NONBLOCK
#define LOAD_SHARED_OBJECT
#define USE_MMAP
@ -187,7 +106,7 @@ typedef int tputsputcchar;
#define USE_OSSP_UUID
#endif
#ifdef OS_ANY_NETBSD
#if defined(__NetBSD__)
#ifdef PTHREADS
# define NETBSD
#endif
@ -196,7 +115,6 @@ typedef int tputsputcchar;
#define USE_MMAP
#define MMAP_HEAP
#define IEEE_DOUBLE
#define LITTLE_ENDIAN_IEEE_DOUBLE
#define LDEXP
#define ARCHYPERBOLIC
#define GETPAGESIZE() getpagesize()
@ -222,11 +140,10 @@ typedef int tputsputcchar;
#define USE_MBRTOWC_L
#endif
#ifdef OS_ANY_WINDOWS
#if defined(_MSC_VER) || defined(__MINGW32__)
#define GETPAGESIZE() S_getpagesize()
#define GETWD(x) GETCWD(x, _MAX_PATH)
#define IEEE_DOUBLE
#define LITTLE_ENDIAN_IEEE_DOUBLE
#define LOAD_SHARED_OBJECT
#define USE_VIRTUAL_ALLOC
#define NAN_INCLUDE <math.h>
@ -289,13 +206,12 @@ struct timespec;
#endif
#endif
#ifdef OS_ANY_OPENBSD
#if defined(__OpenBSD__) && !defined(__Bitrig__)
#define NOBLOCK O_NONBLOCK
#define LOAD_SHARED_OBJECT
#define USE_MMAP
#define MMAP_HEAP
#define IEEE_DOUBLE
#define LITTLE_ENDIAN_IEEE_DOUBLE
#define LDEXP
#define ARCHYPERBOLIC
#define GETPAGESIZE() getpagesize()
@ -320,16 +236,13 @@ typedef int tputsputcchar;
#define USE_OSSP_UUID
#endif
#ifdef OS_ANY_MACOSX
#if defined(__APPLE__)
#define MACOSX
#define NOBLOCK O_NONBLOCK
#define LOAD_SHARED_OBJECT
#define USE_MMAP
#define MMAP_HEAP
#define IEEE_DOUBLE
#if !defined(__POWERPC__)
# define LITTLE_ENDIAN_IEEE_DOUBLE
#endif
/* for both iPhone and iPhoneSimulator */
#if defined(TARGET_OS_IPHONE)
# define SYSTEM(s) ((void)s, -1)
@ -374,20 +287,12 @@ typedef int tputsputcchar;
#define UNUSED __attribute__((__unused__))
#endif
#if (machine_type == machine_type_i3qnx || machine_type == machine_type_ti3qnx)
# define OS_ANY_QNX
# if (machine_type == machine_type_ti3qnx)
# define PTHREADS
# endif
#endif
#ifdef OS_ANY_QNX
#if defined(__QNX__)
#define NOBLOCK O_NONBLOCK
#define LOAD_SHARED_OBJECT
#define USE_MMAP
#define MMAP_HEAP
#define IEEE_DOUBLE
#define LITTLE_ENDIAN_IEEE_DOUBLE
#define LDEXP
#define ARCHYPERBOLIC
#define GETPAGESIZE() getpagesize()
@ -411,20 +316,12 @@ typedef int tputsputcchar;
#define UNUSED
#endif
#if (machine_type == machine_type_i3s2 || machine_type == machine_type_ti3s2 || machine_type == machine_type_a6s2 || machine_type == machine_type_ta6s2)
# define OS_ANY_SOLARIS2
# if (machine_type == machine_type_ti3s2 || machine_type == machine_type_ta6s2)
# define PTHREADS
# endif
#endif
#ifdef OS_ANY_SOLARIS2
#if defined(sun)
#define NOBLOCK O_NONBLOCK
#define LOAD_SHARED_OBJECT
#define USE_MMAP
#define MMAP_HEAP
#define IEEE_DOUBLE
#define LITTLE_ENDIAN_IEEE_DOUBLE
#define LDEXP
#define ARCHYPERBOLIC
#define LOG1P
@ -451,7 +348,12 @@ typedef char tputsputcchar;
#define UNUSED __attribute__((__unused__))
#endif
/* defaults */
/*****************************************/
/* Defaults and derived */
#ifndef BIG_ENDIAN_IEEE_DOUBLE
# define LITTLE_ENDIAN_IEEE_DOUBLE
#endif
#ifndef CHDIR
# define CHDIR chdir

View File

@ -101,9 +101,7 @@ case "${CONFIG_UNAME}" in
tm64=ta6le
elif uname -a | grep -i power > /dev/null 2>&1 ; then
m32=ppc32le
m64=""
tm32=tppc32le
tm64=""
elif uname -a | egrep 'armv|aarch64' > /dev/null 2>&1 ; then
m32=arm32le
m64=arm64le
@ -500,61 +498,92 @@ case "${flagsm}" in
;;
esac
flagsmuni=`echo $flagsm | sed -e 's/^t//'`
muni=`echo $m | sed -e 's/^t//'`
# Set default CFLAGS if not provided at all. Assuming that the
# compiler is for the right platform, compilation should generally
# succeed if no flags are set; anything required should be propagated
# a different way
if [ "$cflagsset" = "no" ] ; then
case "${flagsm}" in
a6le|ta6le)
case "${flagsmuni}" in
a6le)
CFLAGS="-m64 -msse2 ${optFlags}"
;;
a6fb|ta6fb|a6nb|ta6nb|a6ob|ta6ob)
a6fb|a6nb|a6ob)
CFLAGS="-m64 ${optFlags}"
;;
a6s2|ta6s2)
a6s2)
CFLAGS="-m64 ${optFlags}"
;;
a6osx|ta6osx)
a6osx)
CFLAGS="-m64 ${optFlags}"
;;
arm64osx|tarm64osx)
arm64osx)
CFLAGS="-arch arm64 ${optFlags}"
;;
a6nt|ta6nt)
a6nt)
CFLAGS="${optFlags}"
;;
arm32le|tarm32le|arm64le|tarm64le)
CFLAGS="${optFlags}"
;;
i3le|ti3le)
i3le)
CFLAGS="-m32 -msse2 ${optFlags}"
;;
i3fb|ti3fb|i3nb|ti3nb|i3ob|ti3ob)
i3fb|i3nb|i3ob)
CFLAGS="-m32 ${optFlags}"
;;
i3s2|ti3s2)
i3s2)
CFLAGS="-m32 ${optFlags}"
;;
i3osx|ti3osx)
i3osx)
CFLAGS="-m32 ${optFlags}"
;;
i3nt|ti3nt)
i3nt)
CFLAGS="${optFlags}"
;;
i3qnx)
CC=qcc
CFLAGS="-m32 -N2048K ${optFlags}"
;;
ppc32le|tppc32le)
ppc32le)
CFLAGS="-m32 ${optFlags}"
;;
ppc32osx|tppc32osx)
ppc32osx)
CFLAGS="${optFlags}"
;;
esac
fi
# architecture-specific for Mf-unix
case "${muni}" in
pb)
Cpu=PORTABLE_BYTECODE
mdarchsrc=pb
;;
a6*)
Cpu=X86_64
mdarchsrc=i3le
;;
i3*)
Cpu=I386
mdarchsrc=i3le
;;
arm32*)
Cpu=ARMV6
mdarchsrc=arm32le
;;
arm64*)
Cpu=AARCH64
mdarchsrc=arm32le
;;
ppc32*)
Cpu=PPC32
mdarchsrc=ppc32
;;
esac
# Add automatic thread compilation flags, unless suppressed by --disable-auto-flags
if [ "$addflags" = "yes" ] ; then
if [ "$threadFlags" != "" ] ; then
@ -627,6 +656,84 @@ if [ "$addflags" = "yes" ] ; then
fi
fi
# more compile and link flags for c/Mf-unix and mats/Mf-unix
mdinclude=
mdcppflags=
mdcflags=
mdldflags=
mdlinkflags=
zlibConfigureFlags=
exePostStep=":"
# compile flags for c/Mf-unix and mats/Mf-unix
case "${flagsmuni}" in
*le)
mdcflags="-fPIC -shared"
;;
*fb|*ob)
mdcflags="-fPIC -shared"
mdinclude="-I/usr/local/include -I/usr/X11R6/include"
;;
*nb)
mdcflags="-fPIC -shared"
mdinclude="-I/usr/X11R7/include -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/X11R6/include"
;;
*osx)
mdcflags="-dynamiclib -undefined dynamic_lookup"
;;
*s2)
mdcflags="-fPIC -shared"
mdcppflags="-DSOLARIS"
;;
*qnx)
mdcflags="-fPIC -shared"
mdinclude="-I/usr/local/include"
;;
esac
# dynamic linking flags for c/Mf-unix
case "${flagsmuni}" in
a6le)
mdldflags="-melf_x86_64"
;;
i3le)
mdldflags="-melf_i386"
;;
ppc32le|arm32le|arm64le)
;;
a6fb|a6ob|a6nb|i3fb|i3ob)
;;
i3nb)
mdldflags="-m elf_i386"
;;
*osx)
;;
a6s2)
mdldflags="-melf_x86_64"
;;
i3s2)
mdldflags="-melf_i386"
;;
i3qnx)
mdlinkflags="-Wl,--export-dynamic"
mdldflags="-mi386nto"
;;
esac
# post-link-executable step for c/Mf-unix
case "${flagsmuni}" in
*nb)
exePostStep='paxctl +m ${Scheme}'
;;
esac
# zlib configure flags for c/Mf-unix
case "${flagsmuni}" in
a6*)
zlibConfigureFlags="--64"
;;
esac
if [ -f boot/$m/scheme.boot -o -f "$srcdir"/boot/$m/scheme.boot ] ; then
echo "Configuring for $m"
else
@ -754,6 +861,15 @@ esac
cat > $w/c/Mf-config << END
upupsrcdir=$upupsrcdir
m=$m
Cpu=$Cpu
mdarchsrc=$mdarchsrc
mdinclude=$mdinclude
mdcppflags=$mdcppflags
mdldflags=$mdldflags
mdlinkflags=$mdlinkflags
exePostStep=$exePostStep
zlibConfigureFlags=
CC=$CC
CPPFLAGS=$CPPFLAGS
CFLAGS=$CFLAGS
@ -781,3 +897,12 @@ KernelLinkDeps=\${${Kernel}LinkDeps}
KernelLinkLibs=\${${Kernel}LinkLibs}
C=\${CC} \${CPPFLAGS} \${CFLAGS} \${warningFlags}
END
cat > $w/mats/Mf-config << END
upupsrcdir=$upupsrcdir
m=$m
mdcflags=$mdcflags
CC=$CC
CPPFLAGS=$CPPFLAGS
CFLAGS=$CFLAGS
END

View File

@ -3033,11 +3033,11 @@
(time? (file-change-time "\\\\?\\c:\\"))
(time? (file-modification-time "\\\\?\\c:\\"))))
(or (windows?) (embedded?)
(time=? (file-access-time "Makefile") (file-access-time (format "Mf-~a" (machine-type)))))
(time=? (file-access-time "Makefile") (file-access-time "Mf-unix")))
(or (windows?) (embedded?)
(time=? (file-change-time "Makefile") (file-change-time (format "Mf-~a" (machine-type)))))
(time=? (file-change-time "Makefile") (file-change-time "Mf-unix")))
(or (windows?) (embedded?)
(time=? (file-modification-time "Makefile") (file-modification-time (format "Mf-~a" (machine-type)))))
(time=? (file-modification-time "Makefile") (file-modification-time "Mf-unix")))
(error? (file-access-time "probably/not/there"))
(error? (file-access-time "probably/not/there" #f))
(error? (file-access-time "probably/not/there" #t))

View File

@ -1,27 +0,0 @@
# Mf-a6fb
# 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 ?= a6fb
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-a6le
# 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 ?= a6le
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -m64 -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-a6nb
# 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 ?= a6nb
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
m ?= a6nt
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so

View File

@ -1,27 +0,0 @@
# Mf-a6ob
# 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 ?= a6ob
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# 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 ?= a6osx
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -m64 -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-a6s2
# 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 ?= a6s2
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
gcc -m64 ${threadFlags} -fPIC -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
gcc -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-arm32le
# 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 ?= arm32le
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -fPIC -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-arm64le
# 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 ?= arm64le
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -fPIC -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-i3fb
# 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 ?= i3fb
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-i3le
# 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 ?= i3le
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -m32 -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-i3nb
# 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 ?= i3nb
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
m ?= i3nt
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so

View File

@ -1,27 +0,0 @@
# Mf-i3ob
# 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 ?= i3ob
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-i3osx
# 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 ?= i3osx
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -m32 -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-i3qnx
# 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 = i3qnx
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -m32 -fPIC -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,27 +0,0 @@
# Mf-i3s2
# 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 ?= i3s2
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
gcc -m32 -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
gcc -o cat_flush cat_flush.c

View File

@ -1,5 +0,0 @@
# Mf-pb
m = pb
include Mf-pbhost

View File

@ -1,27 +0,0 @@
# Mf-ppc32le
# 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 ?= ppc32le
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -m32 -fPIC ${threadFlags} -shared -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,14 +0,0 @@
# Mf-ppc32osx
m ?= ppc32osx
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c

View File

@ -1,7 +0,0 @@
# Mf-ta6fb
m = ta6fb
threadFlags = -pthread
include Mf-a6fb

View File

@ -1,7 +0,0 @@
# Mf-ta6le
m = ta6le
threadFlags = -pthread
include Mf-a6le

View File

@ -1,7 +0,0 @@
# Mf-ta6nb
m = ta6nb
threadFlags = -pthread
include Mf-a6nb

View File

@ -1,5 +1,4 @@
# Mf-ta6nt
m = ta6nt
include Mf-a6nt

View File

@ -1,7 +0,0 @@
# Mf-ta6ob
m = ta6ob
threadFlags = -pthread
include Mf-a6ob

View File

@ -1,5 +0,0 @@
# Mf-ta6osx
m = ta6osx
include Mf-a6osx

View File

@ -1,7 +0,0 @@
# Mf-ta6s2
m = ta6s2
threadFlags = -D_REENTRANT
include Mf-a6s2

View File

@ -1,5 +0,0 @@
# Mf-tarm32le
m = tarm32le
include Mf-arm32le

View File

@ -1,5 +0,0 @@
# Mf-tarm64le
m = tarm64le
include Mf-arm64le

View File

@ -1,5 +0,0 @@
# Mf-tarm64osx
m ?= tarm64osx
include Mf-arm64osx

View File

@ -1,7 +0,0 @@
# Mf-ti3fb
m = ti3fb
threadFlags = -pthread
include Mf-i3fb

View File

@ -1,7 +0,0 @@
# Mf-ti3le
m = ti3le
threadFlags = -pthread
include Mf-i3le

View File

@ -1,7 +0,0 @@
# Mf-ti3nb
m = ti3nb
threadFlags = -pthread
include Mf-i3nb

View File

@ -1,5 +1,4 @@
# Mf-ti3nt
m = ti3nt
include Mf-i3nt

View File

@ -1,7 +0,0 @@
# Mf-ti3ob
m = ti3ob
threadFlags = -pthread
include Mf-i3ob

View File

@ -1,5 +0,0 @@
# Mf-ti3osx
m = ti3osx
include Mf-i3osx

View File

@ -1,7 +0,0 @@
# Mf-ti3s2
m = ti3s2
threadFlags = -D_REENTRANT
include Mf-i3s2

View File

@ -1,7 +0,0 @@
# Mf-tppc32le
m = tppc32le
threadFlags = -pthread
include Mf-ppc32le

View File

@ -1,5 +0,0 @@
# Mf-tppc32osx
m ?= tppc32osx
include Mf-ppc32osx

View File

@ -1,14 +1,10 @@
# Mf-arm64osx
m ?= arm64osx
fsrc = foreign1.c foreign2.c foreign3.c foreign4.c
fobj = foreign1.so
include Mf-base
foreign1.so: ${fsrc} ../boot/$m/scheme.h
$(CC) -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc}
$(CC) ${CPPFLAGS} ${CFLAGS} ${mdcflags} -I${Include} -o foreign1.so ${fsrc}
cat_flush: cat_flush.c
$(CC) -o cat_flush cat_flush.c
$(CC) ${CPPFLAGS} ${CFLAGS} -o cat_flush cat_flush.c

View File

@ -1,7 +1,8 @@
#lang racket/base
(require racket/match
"scheme-readtable.rkt"
"config.rkt")
"config.rkt"
"machine-def.rkt")
;; Extract constants that we need to get started by reading
;; "cmacros.ss" and the machine ".def" file (without trying to run or
@ -58,13 +59,13 @@
[else e]))
(define (read-constants-from-file fn)
(call-with-input-file
(build-path scheme-dir "s" fn)
read-constants))
(define i (open-file-with-machine.def-redirect fn target-machine (build-path scheme-dir "s")))
(begin0
(read-constants i)
(close-input-port i)))
(when scheme-dir
(read-constants-from-file
(string-append target-machine ".def"))
(read-constants-from-file "machine.def")
(read-constants-from-file "cmacros.ss"))
(define-syntax-rule (define-constant id ...)

View File

@ -0,0 +1,28 @@
#lang racket/base
(require (only-in racket/file file->string))
(provide open-file-with-machine.def-redirect)
(define (open-file-with-machine.def-redirect filename target-machine dir)
(define (build-path* dir f) (if (eq? dir 'same) f (build-path dir f)))
(cond
[(equal? filename "machine.def")
(define def (string-append target-machine ".def"))
(cond
[(file-exists? (build-path* dir def)) (open-input-file (build-path* dir def))]
[else
;; synthesize a default ".def" file from "[t]unix.def"
(define def (if (regexp-match? #rx"^t" target-machine) "tunix.def" "unix.def"))
(let* ([s (file->string (build-path* dir def))]
[s (regexp-replace* #rx"[$][(]M[)]" s target-machine)]
[s (regexp-replace* #rx"[$][(]March[)]" s
(cond
[(regexp-match? #rx"^t?a6" target-machine) "a6"]
[(regexp-match? #rx"^t?i3" target-machine) "i3"]
[(regexp-match? #rx"^t?arm32" target-machine) "arm32"]
[(regexp-match? #rx"^t?arm64" target-machine) "arm64"]
[(regexp-match? #rx"^t?ppc32" target-machine) "ppc32"]
[else (error "machine.def: cannto infer architecture")]))])
(open-input-string s))])]
[else
(open-input-file (build-path* dir filename))]))

View File

@ -14,6 +14,7 @@
"scheme-readtable.rkt"
"parse-makefile.rkt"
"config.rkt"
"machine-def.rkt"
"strip.rkt")
;; Set `SCHEME_SRC` and `MACH` to specify the ChezScheme source
@ -243,14 +244,14 @@
(loop
#`(begin #,@(with-source-path 'include (syntax->datum #'fn)
(lambda (n)
(call-with-input-file*
n
(lambda (i)
(define i (open-file-with-machine.def-redirect n target-machine 'same))
(begin0
(let loop ()
(define r (read-syntax n i))
(if (eof-object? r)
'()
(cons r (loop))))))))))]
(cons r (loop))))
(close-input-port i))))))]
[(constant-case architecture [else e ...])
(loop #`(begin e ...))]
[(constant-case architecture [(arch ...) e ...] . _)

View File

@ -22,6 +22,7 @@
"record.rkt"
(for-syntax "record.rkt")
"constant.rkt"
"machine-def.rkt"
(only-in "r6rs-lang.rkt"
make-record-constructor-descriptor
set-car!
@ -345,7 +346,6 @@
(define-syntax include
(lambda (stx)
(syntax-case stx ()
[(form "machine.def") #`(form ,(string-append target-machine ".def"))]
[(form p) #'(r:include-at/relative-to form form p)])))
;; If we have to avoid `read-syntax`:
@ -353,7 +353,6 @@
(define-syntax include
(lambda (stx)
(syntax-case stx ()
[(form "machine.def") #`(form #,(string-append target-machine ".def"))]
[(form p)
(let ([r (call-with-input-file*
(syntax->datum #'p)
@ -1167,11 +1166,7 @@
(define who 'some-who)
(define (with-source-path who name procedure)
(cond
[(equal? name "machine.def")
(procedure (string-append target-machine ".def"))]
[else
(procedure name)]))
(procedure name))
(define ($make-source-oops . args) #f)
@ -1192,7 +1187,7 @@
(define (interpret e) (eval e))
(define ($open-file-input-port who filename [options #f])
(open-input-file filename))
(open-file-with-machine.def-redirect filename target-machine 'same))
(define ($open-file-output-port who filename options)
(open-output-file filename #:exists (if (eval `(enum-set-subset? (file-options replace) ',options))

View File

@ -1,19 +0,0 @@
# Mf-a6fb
# 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 ?= a6fb
archincludes = x86_64.ss
include Mf-base

View File

@ -1,19 +0,0 @@
# Mf-a6le
# 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 ?= a6le
archincludes = x86_64.ss
include Mf-base

View File

@ -1,19 +0,0 @@
# Mf-a6nb
# 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 ?= a6nb
archincludes = x86_64.ss
include Mf-base

View File

@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
m ?= a6nt
archincludes = x86_64.ss
include Mf-base

View File

@ -1,19 +0,0 @@
# Mf-a6ob
# 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 ?= a6ob
archincludes = x86_64.ss
include Mf-base

View File

@ -1,19 +0,0 @@
# 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 ?= a6osx
archincludes = x86_64.ss
include Mf-base

View File

@ -1,19 +0,0 @@
# Mf-a6s2
# 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 ?= a6s2
archincludes = x86_64.ss
include Mf-base

View File

@ -1,21 +0,0 @@
# Mf-arm32le
# 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 ?= arm32le
archincludes = arm32.ss
include Mf-base
machine.def: arm32.def

Some files were not shown because too many files have changed in this diff Show More