Recently, we need to get a CLI command interface program. The initial assumption is that we need to support History commands, and the tab key command should be completed. After reading the relevant information, I went deep into Baidu! (Google is not normal recently)
Really annoying. Readline is really a good thing, so it is first compiled into an ARM platform.
./Configure cc = arm-Linux-GCC -- Host = arm-Linux cross_compile = arm-Linux-gcc
Configuration. At first, it was found that a test program will be automatically compiled during configure, and the cross-compiled program cannot run on x86. Therefore, makefile is not generated.
In this case, you need to modify configure,
Change "yes" in line 2 If test "$ cross_compiling" = no; then: to "no ".
MV xfree. O xfree. So
Rm-F compat. So
Arm-Linux-gcc-C-dhave_config_h-I. -I .. -I .. -drl_library_version = '"6.3"'-g-o-FPIC-O compat. O .. /compat. c
MV compat. O compat. So
Rm-F libreadline. so.6.3
Arm-Linux-gcc-shared-wl,-soname, libreadline. so.6.3-L. /lib/termcap-wl,-rpath,/usr/local/lib-wl,-soname, 'basename libreadline. so.6.3. 3 '-O libreadline. so.6.3 Readline. so vi_mode.so funmap. so keymaps. so Parens. so search. so rltty. so complete. so bind. so Isearch. so display. so signals. so util. so kill. so undo. so macro. so input. so callback. so terminal. so text. so NLS. so Misc. so history. so histexpand. so histfile. so histsearch. so shell. so mbutil. so Tilde. so colors. so parse-colors.so xmalloc. so xfree. so compat. so
Rm-F libhistory. so.6.3
Arm-Linux-gcc-shared-wl,-soname, libhistory. so.6.3-L. /lib/termcap-wl,-rpath,/usr/local/lib-wl,-soname, 'basename libhistory. so.6.3. 3 '-O libhistory. so.6.3 history. so histexpand. so histfile. so histsearch. so shell. so mbutil. so xmalloc. so xfree. so
Make [1]: Leaving directory '/home/test/readline-6.3/shlib'
Final generated Library