Browse Source

Merge pull request #283 from apjanke-build-on-mac-darnit

Karel Miko 8 years ago
parent
commit
c908eb16bb
4 changed files with 4 additions and 9 deletions
  1. 1 1
      README.md
  2. 0 6
      makefile
  3. 1 1
      makefile_include.mk
  4. 2 1
      src/misc/crypt/crypt_ltc_mp_descriptor.c

+ 1 - 1
README.md

@@ -68,7 +68,7 @@ There are several `makefile`s provided. Please choose the one that fits best for
 
 
 | makefile | use-case |
 | makefile | use-case |
 | -------- | -------- |
 | -------- | -------- |
-| `makefile` | builds a static library (GNU Make required, broken on Mac OSX - use `makefile.unix` instead) |
+| `makefile` | builds a static library (GNU Make required) |
 | `makefile.shared` | builds a shared (and static) library (GNU Make required) |
 | `makefile.shared` | builds a shared (and static) library (GNU Make required) |
 | `makefile.unix` | for unusual UNIX platforms, or if you do not have GNU Make |
 | `makefile.unix` | for unusual UNIX platforms, or if you do not have GNU Make |
 | `makefile.mingw` | for usage with the mingw compiler on MS Windows |
 | `makefile.mingw` | for usage with the mingw compiler on MS Windows |

+ 0 - 6
makefile

@@ -15,12 +15,6 @@ endif
 
 
 PLATFORM := $(shell uname | sed -e 's/_.*//')
 PLATFORM := $(shell uname | sed -e 's/_.*//')
 
 
-ifneq ($(MAKECMDGOALS),clean)
-ifeq ($(PLATFORM), Darwin)
-$(error Known to not work on Mac, please use makefile.unix for static libraries or makefile.shared for shared libraries)
-endif
-endif
-
 # ranlib tools
 # ranlib tools
 ifndef RANLIB
 ifndef RANLIB
 RANLIB:=$(CROSS_COMPILE)ranlib
 RANLIB:=$(CROSS_COMPILE)ranlib

+ 1 - 1
makefile_include.mk

@@ -102,7 +102,7 @@ endif # COMPILE_DEBUG
 
 
 
 
 ifneq ($(findstring clang,$(CC)),)
 ifneq ($(findstring clang,$(CC)),)
-LTC_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header
+LTC_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header -Wno-missing-field-initializers
 endif
 endif
 ifeq ($(PLATFORM), Darwin)
 ifeq ($(PLATFORM), Darwin)
 LTC_CFLAGS += -Wno-nullability-completeness
 LTC_CFLAGS += -Wno-nullability-completeness

+ 2 - 1
src/misc/crypt/crypt_ltc_mp_descriptor.c

@@ -8,7 +8,8 @@
  */
  */
 #include "tomcrypt.h"
 #include "tomcrypt.h"
 
 
-ltc_math_descriptor ltc_mp;
+/* Initialize ltc_mp to nulls, to force allocation on all platforms, including macOS. */
+ltc_math_descriptor ltc_mp = { 0 };
 
 
 /* ref:         $Format:%D$ */
 /* ref:         $Format:%D$ */
 /* git commit:  $Format:%H$ */
 /* git commit:  $Format:%H$ */