Skip to content

Building on Mac OSX #2

@cem-

Description

@cem-

Currently, the build exits with errors on OS X.
In trying to get this to build, so far I have changes in the mk\ring.mk:
...
-$(RING_LIB): ARFLAGS = cDrs
+$(RING_LIB): ARFLAGS = crs
...
-PERLASM_x86_ARGS = elf -fPIC -DOPENSSL_IA32_SSE2
-PERLASM_x86_64_ARGS = elf
+PERLASM_x86_ARGS = macosx -fPIC -DOPENSSL_IA32_SSE2
+PERLASM_x86_64_ARGS = macosx
...

The first is because there is not a deterministic flag for ar on OSX, the second to build to the Mac platform.

Also, apparently --gc-sections is deprecated now on OSX, I saw it mentioned[1] that -dead_strip should replace it.
mk/top_of_makefile.mk
-LDFLAGS += -Wl,--gc-sections
+LDFLAGS += -Wl,-dead_strip

[1] http://stackoverflow.com/questions/24734409/make-error-in-mac-clang-ld-unknown-option-gc-sections

After making those changes, I was able to successfully build (x86 and x86_64) on OSX and get a 'PASS' on the various tests I tried in the bin/crypto folder.

-cem

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions