Compilation with tdfada

Ada producer is at early develop stage, so compilation with it is rather tricky. Here is an example.

  • Prepare the ada test text:
    cat > test.adb <<EOF
    procedure Test (X : in out Integer) is
    begin
      X := X + 1;
    end;
    EOF
    
  • Point tdfada to predefined specifications:
    export GELA_INCLUDE_PATH=/home/max/tendra/src/lib/libada/spec/
    
  • Compile test to capsule
    tdfada test.adb
    
  • Compile units test depends on (at least standard.ads)
    tdfada standard.ads
    
  • Compile Ada related tokens
    tcc -Fj -Ypl_tdf /home/max/tendra/src/lib/libada/token/ada.pl
    
  • Link all capsulas together
    tcc -M -Ytarget_tok -Fs -o test.s ada.j standard.j test.j
    

Note: take a look at tdfada regression tests. They are linked with wrapper.c to get true executeion modules.