Hello, I made gcc as a shell script and passed -mcpu and -Dmalloc=XXX_malloc flags, then fipscanister build succeeds. I then use the fipscanister.o in openssl tree which creates libcrypto.a .
Now for our system we need to build a shared object file. So I pass "export CC=/opt/bin/arm-linux-gcc; fipsld -shared -o libfips.so $(CFLAGS)" It results in error "fips_premain_dso: No Such File or directory". According to the fips/Makefile : fips_premain_dso gets build only when I build fips using "./config shared" option, which I am not allowed to pass and is not intended usecase also. Kindly help in this regard. Thanking you, -Abhijit On Fri, Mar 8, 2013 at 9:00 PM, Abhijit Ray Chaudhury <abhijit.ray.chaudh...@gmail.com> wrote: > Thank you all, for your kind responses and your time . > > I will try the > http://opensslfoundation.com/testing/validation-2.0/platforms/ios/setenv-ios.sh > approach and see the result. > > I saw the Configure script which config finally runs. It has > provisions of adding some extra flags like -mcpu or include / lib > directory for android armv7 platform, so I would still like to > believe there could be some way of passing some flags. > > With Regards, > -Abhijit > > On Fri, Mar 8, 2013 at 7:27 PM, Dr. Stephen Henson <st...@openssl.org> wrote: >> On Fri, Mar 08, 2013, Abhijit Ray Chaudhury wrote: >> >>> Hello, >>> >>> I am trying to cross compile FIPS compliant openssl module >>> (openssl-fips-ecp-2.0.2.tar.gz) for linux armv4 pratform : >>> >>> I have used following script to setup the environment: >>> =============================================== >>> export MACHINE=armv4t >>> export RELEASE=2.6.23 >>> export SYSTEM=Linux >>> export ARCH=arm >>> export CROSS_COMPILE="/opt/gccarm-4.1.2/bin/" >>> export HOSTCC=/usr/bin/gcc >>> ================================================ >>> ./config -t >>> Operating system: armv4t-whatever-linux2 >>> Auto Configuring fipsonly >>> Auto Configuring fipsonly >>> Configuring for linux-armv4 >>> /usr/bin/perl ./Configure linux-armv4 -Wa,--noexecstack no-bf >>> no-camellia no-cast no-idea no-md2 no-md5 no-mdc2 no-rc2 no-rc4 no-rc5 >>> no-ripemd no-seed >>> ================================================== >>> after config the make fails finding include directories : >>> ================================================== >>> In file included from cryptlib.c:117: >>> cryptlib.h:62:20: error: stdlib.h: No such file or directory >>> cryptlib.h:63:20: error: string.h: No such file or directory >>> In file included from cryptlib.h:65, >>> from cryptlib.c:117: >>> ../e_os.h:444:30: error: unistd.h: No such file or directory >>> ../e_os.h:449:29: error: sys/types.h: No such file or directory >>> ================================================== >>> >>> also in my platform malloc and free is redefined to XXX_malloc and XXX_free. >>> >>> Please let me know how to pass CFLAGS to the build system or how to >>> resolve above problems. >>> >> >> As some other people have indicated, passing custom CFLAGS is problematical >> to >> say the least. Setting environment variables is OK though: there are various >> environment variables gcc understands which can specify header locations. >> >> Steve. >> -- >> Dr Stephen N. Henson. OpenSSL project core developer. >> Commercial tech support now available see: http://www.openssl.org >> ______________________________________________________________________ >> OpenSSL Project http://www.openssl.org >> User Support Mailing List openssl-users@openssl.org >> Automated List Manager majord...@openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org