关于linux下的fPIC和openssl fPIC
gedit Makefile
cc="gcc -fPIC"
CFLAGS += -Os -fomit-frame-pointer -g -Wall -fPIC ###加入 -fPIC 参数 -fPIE
make CFLAGS=-fPIC
make CC="gcc -fPIC"
linux编译openssl:
./config -fPIC shared
export CFLAGS=-fPIC
./config shared
CFLAGS=-fPIC ./config shared 在老版本的openssl上failed,新版本成功。
成功:
I also face same problem. so I solved it the following way:
First uninstall that file and download new version like openssl-1.0.2-latest.tar.gz
wget ftp://openssl.org/source/old/1.0.1/openssl-1.0.1e.tar.gz
untar this file using command tar -xf openssl-1.0.2-latest.tar.gz
export CFLAGS=-fPIC
./config shared --prefix=/your/path
make
gedit Makefile
cc="gcc -fPIC"
CFLAGS += -Os -fomit-frame-pointer -g -Wall -fPIC ###加入 -fPIC 参数 -fPIE
make CFLAGS=-fPIC
make CC="gcc -fPIC"
linux编译openssl:
./config -fPIC shared
export CFLAGS=-fPIC
./config shared
CFLAGS=-fPIC ./config shared 在老版本的openssl上failed,新版本成功。
成功:
I also face same problem. so I solved it the following way:
First uninstall that file and download new version like openssl-1.0.2-latest.tar.gz
wget ftp://openssl.org/source/old/1.0.1/openssl-1.0.1e.tar.gz
untar this file using command tar -xf openssl-1.0.2-latest.tar.gz
export CFLAGS=-fPIC
./config shared --prefix=/your/path
make
make install