Cross compilation of openssh for ARM

戏子无情 提交于 2019-12-24 04:57:26

问题


I am trying to cross-compile openssh for ARM. I have suceesfully installed zlib and openssl. I configured openssh package as following:

./configure --prefix=/usr/openssharm --host=arm --    oldincludedir=/usr/opensslarm/include --includedir=/usr/opensslarm/include --with-libs --with-zlib=/usr/zlibArm --with-ssl-dir=/usr/opensslarm --disable-etc-default-login CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar

Now when I am trying to make it, I get the following error:

arm-linux-gnueabi-ld -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o mux.o roaming_common.o roaming_client.o -L. -Lopenbsd-compat/ -L/usr/opensslarm/lib -L/usr/zlibArm/lib -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -shared-fstack-protector-all -lssh -lopenbsd-compat -lcrypto -ldl -lutil -lz -lnsl -lresolv arm-linux-gnueabi-ld: unrecognized option '-Wl,-z,relro'

I tried searching for the same, but could not get what the error is. I thought of modifying the LDFLAGS in the makefile but it was not useful either. My LDFLAGS line look like:

LDFLAGS=-L. -Lopenbsd-compat/ -L/usr/opensslarm/lib -L/usr/zlibArm/lib  -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-all

What could be the possible solution of the same?

来源:https://stackoverflow.com/questions/29236378/cross-compilation-of-openssh-for-arm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!