Skip to main content

Search

Items tagged with: Compiler


Advanced #Programming in the #UNIX Environment

Week 5, Unix Development Tools: The #Compiler Chain, Part I

We begin our discussion of compilers as part of the Unix programming environment. We provide a high-level overview of how compilers process input source code and turn it into an executable. (And I show my age by mentioning "Borland" and "Turbo C". You can safely ignore those. 😂)

youtu.be/SOeo4zLBqdI

#apue


Advanced #Programming in the #UNIX Environment

Week 5, Unix Development Tools: The #Compiler Chain, Part II

We look at the preprocessing stage of the compiler and observe how it invokes the cpp(1) command to include header files or replace macro definitions in place.

youtu.be/8qPxQ3g8bso

#apue


Advanced #Programming in the #UNIX Environment

Week 5, Unix Development Tools: The #Compiler Chain, Part III

We continue to analyze the steps of the compilation process. This time, we look at the compilation proper and the optimization and assembly of the intermediate code into an object file.

youtu.be/ddvYL-G3oew

#apue


Advanced #Programming in the #UNIX Environment

Week 5, Unix Development Tools: The #Compiler Chain, Part IV

We conclude our discussion of the compiler chain, analyzing the last step in the process: linking the object files into the executable. We identify aspects of the C Runtime libraries as well as the standard C library that we need to include and cover a few of the most important flags to ld(1).

youtu.be/8LCyPmjknBY

#apue


this is precisely the type of enhancement that one could do by extending the C preprocessor. In this particular case, I wonder if one could just do it via a custom #pragma directive.
There is a tutorial on how to implement those for the #clang / #llvm #compiler :

git.scc.kit.edu/CES/clang-cust…

Or, just use a regex powered #perl script to remove those extra commas by invoking the perl script to generate a C source without those commas prior to compiling. @Perl

⇧