Re: TR : cross-compile cryptlib 3.4.0 with arm-linux-gcc
yuqm <[email protected]>
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
Peter Gutmann wrote:
>
> The portion with #if defined( __UNIX__ ) around line 2500.
>
> Peter.
>
Thanks to your help,I compiled it successfully with some changes as that
listed below:
1.line 71 of makefile:
CFLAGS = -MMD -MP -MF -fpic -ffunction-sections -funwind-tables
-fstack-protector -I. -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__
-D__ARM_ARCH_5TE__ -D__UNIX__ -D__CYGWIN__ -Wno-psabi -march=armv5te
-mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer
-fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -O2
-DNDEBUG -g
-IE:/cygwinTest/android-ndk-r5/platforms/android-8/arch-arm/usr/include -c
2.line 831 of misc/os_spec.h: wchar_t Redefine.I just noted it.
3.line 3229 of io/file.c:futimes undeclared.I used utimes instead.
4.unix.c:No head files.Maybe the head files are not necessary.I just noted
it and it was compiled well.
5. line 180 of int_api.h:just need define two functions.
#include<string.h>
#define strnicmp strncasecmp
#define stricmp strcasecmp
6.line 320 of int_string.c:
#include <wchar.h>
size_t mbstowcs(wchar_t *pwcs, const char *s, size_t n)
{
if (pwcs == NULL)
return strlen(s);
return mbsrtowcs(pwcs, &s, n, NULL);
}
size_t wcstombs(char *s, const wchar_t *pwcs, size_t n)
{
return wcsrtombs(s, &pwcs, n, NULL);
}
Then Add following codes in makefile:
mycl340.a: $(OBJS)
ar rcs mycl340.a $(OBJS)
clean-mycl:
@rm -f $(OBJS) mycl340.a
Now I compiled the project successfully.But then I used it in Android
project,it crashed when I called cryptInit().
status = deviceInfoPtr->initFunction( deviceInfoPtr, name,nameLength );
//crash,it is around line 617 in cryptdev.c.And I couldn't find where
initFunction is declared and implemented.
Then I thought that I didn`t need functions of 'device',maybe I could delete
some codes to make it run successfully.
Some suggestion please?Either why initFunction crashed or what i could
delete.
--
View this message in context: http://old.nabble.com/TR-%3A---cross-compile-cryptlib-3.4.0-with-arm-linux-gcc-tp31657458p31833193.html
Sent from the Cryptlib mailing list archive at Nabble.com.
_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.