问题:使用mips-linux-uclibc-gnu-gcc交叉编译链在编译openssl的时候报出以下错误:
[root@localhost openssl-1.0.1e]# libdl.c:(.text+0x1778): undefined reference to `TLS_DTPREL_VALUE' [root@localhost openssl-1.0.1e]# libdl.c:(.text+0x17b8): undefined reference to `TLS_TPREL_VALUE' [root@localhost openssl-1.0.1e]# libdl.c:(.text+0x1770): undefined reference to `TLS_DTPREL_VALUE' [root@localhost openssl-1.0.1e]# libdl.c:(.text+0x1790): undefined reference to `TLS_TPREL_VALUE' [root@localhost openssl-1.0.1e]# libdl.c:(.text+0x17ac): undefined reference to `TLS_TPREL_VALUE' [root@localhost openssl-1.0.1e]# collect2: error: ld returned 1 exit status解决方法:修改Makefile以下两处
sub_all: build_all #build_all: build_libs build_apps build_tests build_tools build_all: build_libs build_libs: build_crypto build_ssl build_engines #DIRS= crypto ssl engines apps test tools DIRS= crypto ssl engines ENGDIRS= ccgost SHLIBDIRS= crypto ssl