[botan-devel] build issue OSX clang

john skaller skaller at users.sourceforge.net
Sat Jan 26 00:15:05 EST 2013


On 26/01/2013, at 12:43 PM, Jack Lloyd wrote:

> 
> Can you try this patch:
> 
> +darwin  -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME)"

OK .. running now. Hmm.. couldn't figure out how to apply the patch
so I hand edited the file, still tries to use the soname.
Trying darwin option first before the default ..


FYI: I need to build with my own scripts (using fbuild, also Python).

General code has to be standard processor independent C/C++,
and work with the same sources on all platforms. So the build
I'm doing at the moment is purely a sanity check: once I get it to build
I will throw my standard script at it, and anything that breaks just 
gets dumped.

So for example:

src/entropy/rdrand/rdrand.cpp:50:38: warning: variable 'r' is uninitialized when used here [-Wuninitialized]
          "=a" (r), "=r" (cf) : "0" (r), "1" (cf) : "cc");
                                     ^
src/entropy/rdrand/rdrand.cpp:43:21: note: initialize the variable 'r' to silence this warning
      unsigned int r;
                    ^
                     = 0

means I have to throw out that file because it contains inline assembler.

My product is a programming language: its a cross-cross compiler
so I have to split out and minimise platform dependent code.
Stuff like entropy gathering belongs in the core RTL.
[Roughly I am trying to provide a "write once run anywhere" platform
so I have to build platform dependencies into the core build]

General crypto is pure math and has no reason to be dependent
on anything (other than the horrible job of trying to trick C/C++
into using precise sizes), other than performance.

Anyhow, maybe I can get some help separating out the
platform dependent C++ and the rest, and also making it
possible for your build code to work as a sub function
to build the platform dependent parts only.

Then performance enhancement by using weird stuff is OK
because there's a fallback.



--
john skaller
skaller at users.sourceforge.net
http://felix-lang.org






More information about the botan-devel mailing list