From 2dec4b5e19be0b82a7a75a5e582bf45dcaa2302e Mon Sep 17 00:00:00 2001 From: John Date: Fri, 17 Dec 2021 12:08:10 +0100 Subject: [PATCH 1/2] in clean-classic for macos-x64 add itask compiler --- clean-classic/macos-x64/build.sh | 3 ++ clean-classic/macos-x64/build_clc_itasks.sh | 19 +++------ clean-classic/macos-x64/build_clean.sh | 1 + clean-classic/macos-x64/cleanup.sh | 1 + clean-classic/macos-x64/txt/Makefile | 2 +- clean-classic/macos-x64/txt/README | 47 +++++++++++++++------ 6 files changed, 45 insertions(+), 28 deletions(-) diff --git a/clean-classic/macos-x64/build.sh b/clean-classic/macos-x64/build.sh index 73fbbd5..f717879 100755 --- a/clean-classic/macos-x64/build.sh +++ b/clean-classic/macos-x64/build.sh @@ -9,6 +9,7 @@ export BOOTCOMPILERPATH=$PWD/boot_compiler/bin:$PWD/boot_compiler/lib/exe:$PATH export PATH=$BOOTCOMPILERPATH ./clean-classic/macos-x64/build_htoclean.sh ./clean-classic/macos-x64/build_clc_larger_stack.sh +./clean-classic/macos-x64/build_clc_itasks.sh ./clean-classic/macos-x64/build_batch_build.sh ./clean-classic/macos-x64/build_libraries.sh ./clean-classic/macos-x64/build_language_report.sh @@ -23,12 +24,14 @@ mkdir step0 mv stdenv step0/ mv clean-libraries step0/ mv compiler step0/ +mv compiler_itask step0/ mv write_clean_manual step0/ mv htoclean step0/ mv clean-ide step0/ mv clean-platform step0/ ./clean-classic/macos-x64/build_htoclean.sh ./clean-classic/macos-x64/build_clc.sh +./clean-classic/macos-x64/build_clc_itasks.sh ./clean-classic/macos-x64/build_batch_build.sh ./clean-classic/macos-x64/build_libraries.sh ./clean-classic/macos-x64/build_language_report.sh diff --git a/clean-classic/macos-x64/build_clc_itasks.sh b/clean-classic/macos-x64/build_clc_itasks.sh index 2212da3..5a06611 100755 --- a/clean-classic/macos-x64/build_clc_itasks.sh +++ b/clean-classic/macos-x64/build_clc_itasks.sh @@ -1,19 +1,10 @@ set -e -# ./checkout.sh libraries/ArgEnvUnix -if test ! -d libraries/ArgEnvUnix ; then - ./svn_checkout.sh clean-libraries/trunk/Libraries/ArgEnvUnix libraries/ArgEnvUnix -fi -# ./checkout.sh compiler -./svn_checkout.sh clean-compiler/branches/itask compiler +# ./git_clone.sh clean-compiler-and-rts/compiler.git compiler +(cd git/compiler; git checkout origin/itask -- .) +mkdir compiler_itask +mv git/compiler/* compiler_itask/ -cd compiler +cd compiler_itask clm -ABC -nw -ci -I backend -I frontend -I main -I main/Unix -IL ArgEnv backendconvert -cd unix -sed "s/-h 80M -s 4m/-h 256m -s 8m/" make.macosx64.sh_ -rm -f make.macosx64.sh -mv make.macosx64.sh_ make.macosx64.sh -chmod +x make.macosx64.sh -cd .. unix/make.macosx64.sh cd .. - diff --git a/clean-classic/macos-x64/build_clean.sh b/clean-classic/macos-x64/build_clean.sh index e4d06e7..ae44267 100755 --- a/clean-classic/macos-x64/build_clean.sh +++ b/clean-classic/macos-x64/build_clean.sh @@ -22,6 +22,7 @@ cp clean-ide/cpm/cpm clean/bin mkdir -p clean/exe cp compiler/cocl clean/exe +cp compiler_itask/cocl clean/exe/cocl_itask cp code-generator/cg clean/exe mkdir -p clean/doc diff --git a/clean-classic/macos-x64/cleanup.sh b/clean-classic/macos-x64/cleanup.sh index cbb5c99..2c94fb8 100755 --- a/clean-classic/macos-x64/cleanup.sh +++ b/clean-classic/macos-x64/cleanup.sh @@ -4,6 +4,7 @@ rm -rf code-generator rm -rf clm rm -rf run-time-system rm -rf compiler +rm -rf compiler_itask rm -rf clean-libraries rm -rf clean-ide rm -rf htoclean diff --git a/clean-classic/macos-x64/txt/Makefile b/clean-classic/macos-x64/txt/Makefile index 94d0d4a..391f791 100755 --- a/clean-classic/macos-x64/txt/Makefile +++ b/clean-classic/macos-x64/txt/Makefile @@ -77,7 +77,7 @@ PATCH_BIN = $(CURRENTDIR)/bin/patch_bin # Binaries # BIN_FILES = clm htoclean -EXE_FILES = cocl cg +EXE_FILES = cocl cocl_itask cg INSTALL_BIN_FILES = $(BIN_FILES:%=$(INSTALL_BIN_DIR)/%) INSTALL_CLM = $(INSTALL_BIN_DIR)/clm diff --git a/clean-classic/macos-x64/txt/README b/clean-classic/macos-x64/txt/README index 98e34f3..a4d87f1 100755 --- a/clean-classic/macos-x64/txt/README +++ b/clean-classic/macos-x64/txt/README @@ -1,31 +1,52 @@ -# Using Clean +Installing Clean +================ -Compiling Clean programs on a mac can be done using one of the following tools: +By default the Clean system is installed in the current directory. +You can override these defaults by changing INSTALL_BIN_DIR, INSTALL_LIB_DIR, INSTALL_MAN_DIR in the Makefile. + +To install the Clean system type: + + make + +Using Clean +=========== + +Compiling Clean programs on linux can be done using one of the following tools: - clm: A build tool for simple projects. All compilation options and paths to libraries are specified as command line arguments + - cpm: A build tool that allows you to specify build configurations of programs in Clean project files (.prj). - You can use cpm create or edit project files and build those projects. + You can use cpm to create or edit project files and build those projects. -Both tools rely on the environment variable `CLEAN_HOME` to point to where you installed Clean to find libraries and executables. -So for example if you have unpacked this package to `/Users/myusername/clean` you should the following exports to your .bashrc/.profile/etc -``` -export CLEAN_HOME=/Users/myusername/clean -export PATH=$PATH:$CLEAN_HOME/bin -``` + cpm relies on the environment variable `CLEAN_HOME` to point to where you installed Clean to find libraries and executables. + So for example if you have installed clean in '/Users/myusername/clean' you should add the following exports to your .bashrc/.profile/etc -# Dependencies + export CLEAN_HOME=/Users/myusername/clean + export PATH=$PATH:$CLEAN_HOME/bin + +Dependencies +============ Clean uses the linker and assembler from Apple. These are not installed by default. Therefore first Apple's XCode must be installed. For more information on XCode see: https://developer.apple.com/xcode/ -# More Info +Compiling the example programs +============================== + +The directory 'examples/SmallExamples' contains small Clean programs. +The directory contains a Makefile to compile the examples. -Additional information about Clean is can be found on the website: +General Info +============ + +Additional information about Clean can be found on the website: http://clean.cs.ru.nl Bug reports, questions and suggestions are welcome. Please send them to: - mailto:clean@cs.ru.nl + mailto:clean@cs.ru.nl + +Versions of Clean are available for several platforms. -- GitLab From f9662f473dd8a3d02f79de3ed4afcd2cf1fd105e Mon Sep 17 00:00:00 2001 From: John Date: Fri, 17 Dec 2021 12:19:20 +0100 Subject: [PATCH 2/2] in clean-classic for macos-x64 use a larger stack when compiling the itask compiler with the boot compiler --- clean-classic/macos-x64/build.sh | 2 +- .../macos-x64/build_clc_itasks_larger_stack.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 clean-classic/macos-x64/build_clc_itasks_larger_stack.sh diff --git a/clean-classic/macos-x64/build.sh b/clean-classic/macos-x64/build.sh index f717879..d31a1a3 100755 --- a/clean-classic/macos-x64/build.sh +++ b/clean-classic/macos-x64/build.sh @@ -9,7 +9,7 @@ export BOOTCOMPILERPATH=$PWD/boot_compiler/bin:$PWD/boot_compiler/lib/exe:$PATH export PATH=$BOOTCOMPILERPATH ./clean-classic/macos-x64/build_htoclean.sh ./clean-classic/macos-x64/build_clc_larger_stack.sh -./clean-classic/macos-x64/build_clc_itasks.sh +./clean-classic/macos-x64/build_clc_itasks_larger_stack.sh ./clean-classic/macos-x64/build_batch_build.sh ./clean-classic/macos-x64/build_libraries.sh ./clean-classic/macos-x64/build_language_report.sh diff --git a/clean-classic/macos-x64/build_clc_itasks_larger_stack.sh b/clean-classic/macos-x64/build_clc_itasks_larger_stack.sh new file mode 100755 index 0000000..c21d2d6 --- /dev/null +++ b/clean-classic/macos-x64/build_clc_itasks_larger_stack.sh @@ -0,0 +1,15 @@ +set -e +# ./git_clone.sh clean-compiler-and-rts/compiler.git compiler +(cd git/compiler; git checkout origin/itask -- .) +mkdir compiler_itask +mv git/compiler/* compiler_itask/ + +cp clm/clm boot_compiler/bin/clm_ +(cd boot_compiler/bin; ./patch_bin clm_ `./patch_bin clm CLEANPATH | tr -d '='` ) +(cd boot_compiler/bin; ./patch_bin clm_ `./patch_bin clm CLEANLIB | tr -d '='` ) +(cd boot_compiler/bin; ./patch_bin clm_ `./patch_bin clm CLEANILIB | tr -d '='` ) + +cd compiler_itask +clm_ -aC,-s,2m -fusion -ABC -nw -ci -I backend -I frontend -I main -I main/Unix -IL ArgEnv backendconvert +unix/make.macosx64.sh +cd .. -- GitLab