json-c uses the attribute 'cold' in one place for optimization.
ports-gcc doesn't know it so warns. So we need to disable using -Werror in order to fix the build on sparc64 ok jca@
This commit is contained in:
parent
b7e9b666b8
commit
76979e1714
@ -14,4 +14,6 @@ MASTER_SITES = https://s3.amazonaws.com/json-c_releases/releases/
|
||||
|
||||
MODULES= devel/cmake
|
||||
|
||||
CONFIGURE_ARGS= -DDISABLE_WERROR=ON
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
17
devel/json-c/patches/patch-json_object_c
Normal file
17
devel/json-c/patches/patch-json_object_c
Normal file
@ -0,0 +1,17 @@
|
||||
This optimization breaks for ports-gcc. Patch it out.
|
||||
|
||||
Index: json_object.c
|
||||
--- json_object.c.orig
|
||||
+++ json_object.c
|
||||
@@ -145,10 +145,7 @@ static json_object_to_json_string_fn _json_object_user
|
||||
#elif defined(__OS400__)
|
||||
#define JSON_NORETURN
|
||||
#else
|
||||
-/* 'cold' attribute is for optimization, telling the computer this code
|
||||
- * path is unlikely.
|
||||
- */
|
||||
-#define JSON_NORETURN __attribute__((noreturn, cold))
|
||||
+#define JSON_NORETURN __attribute__((noreturn))
|
||||
#endif
|
||||
#endif
|
||||
/**
|
Loading…
Reference in New Issue
Block a user