Skip to content

Commit a6c405a

Browse files
committed
rts-loader.c needs -std=gnu99
1 parent fd8c1e6 commit a6c405a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ GHC_VERSION := $(shell ghc --numeric-version)
66
DEFINES = -D__GLASGOW_HASKELL__=$(shell echo $(GHC_VERSION) | sed -r 's/([0-9]+)\.([0-9])\.([0-9]+)/\10\2/;s/([0-9]+)\.([0-9]{2})\.([0-9]+)/\1\2/')
77

88
rts-loader: rts-loader.c
9-
gcc -g -I$(GHC_LIBDIR)/include $(DEFINES) $< -ldl -o $@
9+
gcc -std=gnu99 -Wall -g -I$(GHC_LIBDIR)/include $(DEFINES) $< -ldl -o $@
1010

1111
libmain.so: Main.hs
1212
ghc -dynamic -shared -fPIC -no-hs-main $< -o $@

Setup.hs

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ buildLoaderExecutable pd lbi flags = do
5858
includeOpts = map ("-I"++) includes
5959
libs = ["dl"]
6060
libOpts = map ("-l"++) libs
61-
opts = ["-o", targetDir </> exeName']
61+
opts = [ "-std=gnu99"
62+
, "-o", targetDir </> exeName'
63+
]
6264
++ includeOpts
6365
++ libOpts
6466
++ [modulePath]

0 commit comments

Comments
 (0)