Changeset 30587 in project for wiki/man/4/Using the compiler


Ignore:
Timestamp:
03/21/14 12:12:31 (7 years ago)
Author:
Jubjub
Message:

Updated "Distributing compiled C files."

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/4/Using the compiler

    r28657 r30587  
    413413
    414414Compiled to C, we get {{hello.c}}. We need the files {{chicken.h}},
    415 {{chicken-config.h}} and {{runtime.c}}, which contain the basic
    416 runtime system, plus the five basic library files {{library.c}},
    417 {{eval.c}}, {{expand.c}}, {{modules.c}} and {{build-version.c}}
     415{{chicken-config.h}}, {{runtime.c}} and {{apply-hack.x86.S}} (or {{apply-hack.x86-64}}, depending on the target architecture), which contain the basic runtime system, plus the five basic library files {{library.c}},
     416{{eval.c}}, {{expand.c}}, {{modules.c}}, {{chicken-syntax.c}} and {{build-version.c}}
    418417which contain the same functionality as the library linked into a
    419418plain CHICKEN-compiled application, or which is available by
     
    432431  % cp $CHICKEN_BUILD/chicken-config.h  .
    433432  % cp $CHICKEN_BUILD/buildtag.h  .
     433  % cp $CHICKEN_BUILD/chicken-syntax.c .
     434  % cp $CHICKEN_BUILD/apply-hack.x86.S
    434435  % gcc -static -Os -fomit-frame-pointer -DHAVE_CHICKEN_CONFIG_H runtime.c build-version.c \
    435      library.c eval.c expand.c modules.c hello.c -o hello -lm
     436     library.c eval.c expand.c modules.c chicken-syntax.c apply-hack.x86.S hello.c -o hello -lm
    436437
    437438Now we have all files together, and can create an tarball containing all the files:
    438439
    439440 % tar cf hello.tar hello.c runtime.c build-version.c library.c eval.c extras.c \
    440    expand.c modules.c chicken.h chicken-config.h
     441   expand.c modules.c chicken.h chicken-config.h chicken-syntax.c apply-hack.x86
    441442 % gzip hello.tar
    442443
Note: See TracChangeset for help on using the changeset viewer.