[bootstrappable] Re: GNU Mes 0.18 released

  • From: Ondřej Čertík <ondrej@xxxxxxxxx>
  • To: bootstrappable@xxxxxxxxxxxxx
  • Date: Wed, 07 Nov 2018 14:58:48 -0700

Hi Jeremiah,

On Wed, Nov 7, 2018, at 2:08 PM, Orians, Jeremiah (DTMB) wrote:


I applied the following patch:
.....
but the bootstrap.sh worked, but based on your comments it should fail the 
tests. And blood-elf still segfaults. So I don't know.
Ok to attempt to replicate your error, I did the following:
wget -c 'http://releases.ubuntu.com/18.04.1/ubuntu-18.04.1-desktop-amd64.iso'
(verified checksums and signatures)
Installed onto a blank machine with recommended defaults
sudo apt-get install git
git clone 'https://github.com/oriansj/mescc-tools-seed.git'
cd mescc-tools-seed
Applied the following diff:
diff --git a/bootstrap.sh b/bootstrap.sh
index 2edda6c..6c89f42 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -26,31 +26,6 @@ stage0_PREFIX=${stage0_PREFIX-../stage0}
 # source using cc_x86.s                 #
 #########################################
 
-# Generate get_machine.M1
-# $stage0_PREFIX/bin/vm --rom $stage0_PREFIX/roms/cc_x86 \
-#      --memory 4M \
-#      --tape_01 $stage0_PREFIX/stage3/get_machine_x86.c \
-#      --tape_02 get_machine.M1
-
-# Generate blood-elf.M1
-$stage0_PREFIX/bin/vm --rom $stage0_PREFIX/roms/cc_x86 \
-       --memory 4M \
-       --tape_01 $stage0_PREFIX/stage3/blood-elf_x86.c \
-       --tape_02 blood-elf.M1
-
-# Generate hex2.M1
-$stage0_PREFIX/bin/vm --rom $stage0_PREFIX/roms/cc_x86 \
-       --memory 4M \
-       --tape_01 $stage0_PREFIX/stage3/hex2_linker_x86.c \
-       --tape_02 hex2.M1
-
-# Generate M1.M1
-$stage0_PREFIX/bin/vm --rom $stage0_PREFIX/roms/cc_x86 \
-       --memory 4M \
-       --tape_01 $stage0_PREFIX/stage3/M1-macro_x86.c \
-       --tape_02 M1.M1
-
-
 # Sin that needs to be removed
 # Current hack generate binary seeds
 # To execute this block ./bootstrap.sh sin

Then ran:
./bootstrap.sh
mkdir ~/bin
cp blood-elf ~/bin/
cp M1 ~/bin/
cp hex2 ~/bin/
PATH=~/bin:$PATH
cd
git clone 'https://github.com/oriansj/M2-Planet.git'
cd M2-Planet
./bootstrap.sh

All completes successfully

I tested this and it works!

Note that the patch above is different to the patch that I applied. I then 
compiled the simple compiler in test99, and it also worked, and it can compile 
C programs.


There is no rush. Once you fix it, I'll try it again. I use Linux kernel 
4.15.0 in Ubuntu 18.04.
My uname -a shows:
Linux ubuntu 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 
2018 x86_64 x86_64 x86_64 GNU/Linux

Is your system different from that kernel version?

Assuming the steps are identical, you should have the following output 
files:
a9708d6e40a4c00d7afe1163a9d149d46525071e9b8a0f283d82f76b443da182  bin/
M2-Planet
65354ea5f760e42ea054785033a6519e0eee30d21b1b69ac7715ef958c5e0e2f  ~/bin/
blood-elf
9a79bdfb35c1c17bb0c66357836382bb08d3876ae8c0c77356776d16aa7faa7f  ~/bin/
hex2
96e1789254675815a3ec5ad93c1cc32c4805d1ad7f029721cef102c4501df8e2  ~/bin/
M1

Yes, I get the same checksums.

Ok, this is very cool. So this does exactly what I wanted. The C compiler seems 
to be implemented in seed.M1, which seems to be the result of the compilation 
of stage0/stage3/M2-Planet_x86.c (which you wrote by hand in C), which was 
compiled using
roms/cc_x86, which is implemented by stage2/cc_x86.s (which you also wrote by 
hand), which is a more primitive C compiler. Did I get it right?

Ondrej

Other related posts: