#1 2021-09-18 10:11:50

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

[mORMot2] ECC static lib

Hi ab , right now the static lib always gets linked even if using openssl instead, can we change this? I think {$define ECC_STATICLIB_AVAILABLE} should be moved to mormot.defines.inc or some other global switch should be made.

Offline

#2 2021-09-18 13:07:22

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: [mORMot2] ECC static lib

I don't see why a few KB of static ECC code may be an issue. Especially if you are using OpenSSL which is much bigger.

This static code is used as fallback if OpenSSL 1.1 is not available, which could be the case for a various number of reasons.

Offline

#3 2021-09-18 14:49:45

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

Re: [mORMot2] ECC static lib

that's fine, don't care about the size, I wanted to create a lib (.so) using mormot2 and the linker complained that ../static/x86_64-linux/ecclin64O2.o wasn't compiled with -fPIC so needs to be recompiled. Since I couldn't find the source code it was easier to just switch to openssl to keep the linker happy.

Offline

#4 2021-09-18 19:25:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: [mORMot2] ECC static lib

Now I understand.

The easiest is to fallback to pascal version on x86_64 PIC.
Please check the latest commit.

Offline

#5 2021-09-19 06:37:08

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

Re: [mORMot2] ECC static lib

thanks, that works!

Offline

Board footer

Powered by FluxBB