Re: LCC for the Gigatron. Take two.
Posted: 18 Feb 2024, 23:23
If you do not want to do make install and want to run glcc from the build directory, the cleanest solution is to create a directory $HOME/bin, make sure it is in your PATH, and have symlinks from there to the glcc executables in the build directory. For instance my bin directory contains this because I always want to use the recently built versions:
and my .profile (or .zprofile on a Mac) contains
The purpose of the build directory is to build glcc. It contains plenty of files that are not necessary to run glcc but are useful to build it. I chose to make it possible to run glcc from the build directory, but this is just a bonus.
In principle, "make clean" in glcc only cleans what is in the build directory, and in fact completely removes it. So in short, you should never put anything precious into the build directory. But I frequently create subdirectories in the "gigaton-lcc/stuff" directory for various programs, and they are not disturbed when glcc is recompiled from scratch.
For you particular versioning problem, you could just remove the glccver.py file that is in the build directory. But frankly there may be plenty of other problems. Best would be to delete the build directory completely and compile from fresh.
Code: Select all
lrwxr-xr-x 35 Jun 3 2023 glcc -> ../gigatron/gigatron-lcc/build/glcc
lrwxr-xr-x 36 Jun 3 2023 glink -> ../gigatron/gigatron-lcc/build/glink
lrwxr-xr-x 38 Oct 21 11:02 gt1dump -> ../gigatron/gigatron-lcc/build/gt1dump
lrwxr-xr-x 40 Jan 1 09:39 gt1z -> ../gigatron/gigatron-rom/Utils/gt1z/gt1z
lrwxr-xr-x 37 Jun 3 2023 gtprof -> ../gigatron/gigatron-lcc/build/gtprof
lrwxr-xr-x 36 Jun 3 2023 gtsim -> ../gigatron/gigatron-lcc/build/gtsim
Code: Select all
PATH=$HOME/bin:$PATH
In principle, "make clean" in glcc only cleans what is in the build directory, and in fact completely removes it. So in short, you should never put anything precious into the build directory. But I frequently create subdirectories in the "gigaton-lcc/stuff" directory for various programs, and they are not disturbed when glcc is recompiled from scratch.
For you particular versioning problem, you could just remove the glccver.py file that is in the build directory. But frankly there may be plenty of other problems. Best would be to delete the build directory completely and compile from fresh.