where is these variables defined? - Minix

This is a discussion on where is these variables defined? - Minix ; "Michael Kennett" wrote in message news:1140915268.140661.20400@z34g2000cwc.googlegro ups.com... > Your questions certainly aren't stupid - they are good questions to > ask. Firstly, you *really* don't have to understand what /usr/lib/descr > does - all of the complexity of compiling and ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 24 of 24

Thread: where is these variables defined?

  1. Re: where is these variables defined?


    "Michael Kennett" wrote in message
    news:1140915268.140661.20400@z34g2000cwc.googlegro ups.com...
    > Your questions certainly aren't stupid - they are good questions to
    > ask. Firstly, you *really* don't have to understand what /usr/lib/descr
    > does - all of the complexity of compiling and linking programs is
    > managed for you by the 'cc' command, and as a beginner you shouldn't
    > really get too concerned if you don't understand it all.




    What an outstandingly clear and beautifully written response! This is
    certainly of benefit to all Minix hackers, not just beginners. I wish that
    all aspects of Minix were equally well documented.

    Thank you!

    --Larry



  2. Re: where is these variables defined?

    In article <1140915268.140661.20400@z34g2000cwc.googlegroups.c om>,
    Michael Kennett wrote:
    >
    >The acd program is the 'ACK compiler driver'.


    Actually, it's "A Compiler Driver". The normal ACK compiler driver is
    surprisingly named 'ack'.

    I needed a driver for Minix-vmd that could implement a common syntax on
    top of either the ACK or the GCC compiler passes. That seemed easy
    enough at first... (Any program of mine that is in a single file yet
    thousands of lines long seemed easy at the start.)

    >The cc command can do both compiling and linking.


    It's basically a "shortest path from here to there" program, with a
    special rule to combine multiple paths into one. (Linking.)

    It may be useful to know that you can tell cc to reach a certain result
    using the extended -c flag:

    cc -c.e hello.c

    This would take hello.c and convert it to .e format, the EM intermediary
    machine language.

    >The -mi86 option says to compile for the 8086, which corresponds to
    >'real mode' when the system is starting up. The option -Was-ncc says to
    >process the option -ncc when running the assembler.


    Actually, in the description file -Was-ncc causes a .s -> .ncc.s
    null-conversion to happen for assembly files whose dialect is unknown.
    The -W options are used for special cases, so what they do exactly must
    always be looked up.

    Now that Minix has left the 16-bit version behind the assembly files
    could be converted to the native ACK syntax. Alas that has to be done
    by hand, because 'cc -c.ack.s -Was-ncc file.s' will strip all the
    comments.

    >Digging further into what happens quickly gets tedious. Instead of
    >doing it manually, it is easiest to add the option '-v2' ...


    Replace -v by -vn and you don't even have to compile anything. To see
    what effect -.o has:

    cc -vn x.c
    cc -vn x.c -.o

    (Apart from -l, it usually doesn't matter much where you put an option.)
    --
    Kees J. Bot, Systems Programmer, Sciences dept., Vrije Universiteit Amsterdam

  3. Re: where is these variables defined?

    Hi Kees,

    Thanks for your comments and insights. I've found the acd description
    file easy to read and modify, but I've only tinkered around the edges.
    But after reading your comment below I've begun to wonder if acd
    adheres to Greenspuns Tenth Law of Programming ;-)

    > I needed a driver for Minix-vmd that could implement a common syntax on
    > top of either the ACK or the GCC compiler passes. That seemed easy
    > enough at first... (Any program of mine that is in a single file yet
    > thousands of lines long seemed easy at the start.)



    > Replace -v by -vn and you don't even have to compile anything. To see
    > what effect -.o has:
    >
    > cc -vn x.c
    > cc -vn x.c -.o
    >
    > (Apart from -l, it usually doesn't matter much where you put an option.)


    This is good to know - I've tended to use -v2 out of habit.

    Kind Regards,

    Michael


  4. Re: where is these variables defined?

    In article <1141213072.503982.224660@u72g2000cwu.googlegroups. com>,
    Michael Kennett wrote:
    >
    >Thanks for your comments and insights. I've found the acd description
    >file easy to read and modify, but I've only tinkered around the edges.
    >But after reading your comment below I've begun to wonder if acd
    >adheres to Greenspuns Tenth Law of Programming ;-)


    Let's see:

    "Any sufficiently complicated C or Fortran program contains an ad-hoc,

    Check.

    "informally-specified

    I've documented it all, honest.

    "bug-ridden

    Hey!

    "slow

    Pretty slow, yeah.

    "implementation of half of Common Lisp.

    Well, ever since I wrote a little lisp interpreter just for the fun of
    it, any program I written since seems to turn into a list processor as
    well. And acd is no exception, processing lists is about all it does.
    (Pausing every now and then to run execvp() on one of those lists.)
    --
    Kees J. Bot, Systems Programmer, Sciences dept., Vrije Universiteit Amsterdam

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2