包的下载地址及安装命令:http://download.aixtools.net/gcc/
aixtools.bash.4.3.33.0.aix537.I
aixtools.gmp.5.0.5.0.I
aixtools.mpfr.2.4.2.0.I
aixtools.mpc.1.0.2.0.I
aixtools.gettext.0.18.1.1.I
aixtools.gcc.4.7.4.0.aix537.I
installp -d . -aXc all
期间遇到问题: ld:open(): A file or directory in the path name does not exist
编译生成的动态库在链接生成可执行文件时一直报错
gcc -w sm3test.c sm4gcmtest.c sm4ecbtest.c sm4cbctest.c sm4ctrtest.c sm4ccmtest.c fpetest.c aesgcmtest.c aesecbtest.c aescbctest.c aesctrtest.c othertest.c testmain.c -o testsdk -L./ -lCipherSuite_Sdk
ld: 0706-006 Cannot find or open library file: -l CipherSuite_Sdk
ld:open(): A file or directory in the path name does not exist.
collect2: error: ld returned 255 exit status
make: 1254-004 The error code from the last command is 1.
通过查找资料发现变更为如下方式可以通过
gcc -w sm3test.c sm4gcmtest.c sm4ecbtest.c sm4cbctest.c sm4ctrtest.c sm4ccmtest.c fpetest.c aesgcmtest.c aesecbtest.c aescbctest.c aesctrtest.c othertest.c testmain.c -o testsdk -L./ libCipherSuite_Sdk.so
ld: 0711-224 WARNING: Duplicate symbol: .print_bytes
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
Target "all" is up to date.
指定编译64位的需要加上参数-maix64