Add rules for statically linking the standard library in
authorLuke Lau <luke_lau@icloud.com>
Sat, 9 Nov 2019 18:15:38 +0000 (18:15 +0000)
committerLuke Lau <luke_lau@icloud.com>
Sat, 9 Nov 2019 18:28:48 +0000 (18:28 +0000)
If statically linking in the Makefile, we need to make sure that our
putchard symbol/function doesn't get stripped out, as GHC passes the
-dead_strip flag to the linker to remove any unused functions. Since
nothing directly calls putchard in our program, it will get stripped out
unless we specify that we want to export it. We can use an export list
to indicate that we still want the symbol. (On Linux, you might need to
remove the underscore from _putchard. )


No differences found