Right, so I'm compiling perl on an ARM device. It configures fine, so I start the compiling process. After the dependencies are done, I get this output:
cc -L/lib -L/usr/lib -L/usr/local/lib -o miniperl \
gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms开发者_如何转开发.o locale.o pp_pack.o pp_sort.o \
miniperlmain.o opmini.o perlmini.o -lnsl -ldl -lm -lcrypt -lutil -lc
gv.o: In function `Perl_gv_stashpvn':
gv.c:(.text+0x5794): undefined reference to `__stack_chk_fail'
gv.c:(.text+0x5798): undefined reference to `__stack_chk_guard'
the same for a load of other files as well. I have tried:
- -fno-stack-protector, -fstack-protector, -fstack-protector-all: No effect
- -lssp: Can't find the file. There is no file called 'libssp' on my system
- Looking for the source code for libssp so I can compile it myself and link to it manually, can't find it
Any ideas?
Posting an answer to get this question off the "unanswered" list...
Per @Alex's comment on the original question, the solution was to run
./Configure -Accflags="-fno-stack-protector"
and then rebuild. The important point is that you must compile every source file with -fno-stack-protector
in order to get rid of the calls to __stack_chk_guard
. Manually passing -fno-stack-protector
during the linking stage doesn't do anything useful.
精彩评论