The Day 1 exercise now works. It did compile yesterday, but didn't link.
I installed the package `gcc-multilib` to fix this.
This commit is contained in:
parent
643d255a21
commit
74b47f4380
1 changed files with 13 additions and 2 deletions
15
src/c/day1.c
15
src/c/day1.c
|
|
@ -3,10 +3,15 @@
|
|||
*
|
||||
* Grendel: a compiling Beowulf reimplementation.
|
||||
*
|
||||
* Day 1 of work towards a compiler... eventually..
|
||||
* Day 1 of work towards a compiler... eventually...
|
||||
*
|
||||
* This is a straight copy of Noah Zentzis' work. There's no original work of
|
||||
* mine here, yet
|
||||
* mine here, yet.
|
||||
*
|
||||
* See: https://generalproblem.net/lets_build_a_compiler/01-starting-out/
|
||||
*
|
||||
* I needed to install (on Debian) the package `gcc-multilib` to get this to
|
||||
* link.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
|
|
@ -16,6 +21,12 @@
|
|||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* "The `__attribute__((__cdecl__))` part is a GCC-specific syntax extension
|
||||
* that tells the compiler to use the
|
||||
* "[cdecl](https://en.wikipedia.org/wiki/X86_calling_conventions#cdecl)"
|
||||
* calling convention when executing the function."
|
||||
*/
|
||||
__attribute__((__cdecl__))
|
||||
extern int lisp_entry();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue