This removes build dependency on gcc and runtime dependency on gcc's runtime libraries. Big thanks to Gleb for working on this. PR: 225185 Submitted by: Gleb Popov <6yearold@gmail.com> Exp-run by: antoine Reviewed by: pgj Differential Revision: https://reviews.freebsd.org/D12043
20 lines
811 B
Haskell
20 lines
811 B
Haskell
Hide the scary c11 features from c2hs, which does not understand them:
|
|
|
|
c2hs: C header contains errors:
|
|
/usr/include/sys/_types.h:104: (column 61) [ERROR] >>> Syntax error !
|
|
The symbol `long' does not fit here.
|
|
*** Error code 1
|
|
|
|
--- c2hs/toplevel/C2HSConfig.hs.orig 2017-01-14 09:17:54 UTC
|
|
+++ c2hs/toplevel/C2HSConfig.hs
|
|
@@ -70,8 +70,8 @@ cpp = case os of
|
|
cppopts :: [String]
|
|
cppopts = case (os,cpp) of
|
|
("openbsd","cpp") -> ["-xc", "-w"]
|
|
- (_,"cpp") -> ["-x", "c", "-w"]
|
|
- (_,"gcc") -> ["-E", "-x", "c", "-w"]
|
|
+ (_,"cpp") -> ["-x", "c", "-w", "-std=c99", "-D_Nullable=", "-D_Nonnull="]
|
|
+ (_,"gcc") -> ["-E", "-x", "c", "-w", "-std=c99", "-D_Nullable", "-D_Nonnull="]
|
|
_ -> []
|
|
|
|
-- C preprocessor option for including only definitions (EXPORTED)
|