On Sun 16 Mar 2014 13:30:55 Andrew Kosteltsev wrote: > When we build bash for some targets the INCLUDES variable for BUILD_CC > contains the path to target readline headers. This path points to the > target headers which not preferred for utilities which prepared for build > machine. > > Also when we have installed readline on the target the configure script > avoids cross_compilation problems with AC_TRY_RUN and substitutes wrong > (very old) version of libreadline. If we sure that we installed correct > readline version we can change configure script for cross compilation > process. > > Please look at attached patches. If this solution can be used for common > case then please apply these patches for the future versions of bash.
i haven't seen the issues you describe for the first patch. maybe it's because i don't pass full paths to the target readline but instead let the toolchain find it for me. so there is never any -I flag mixing. the 2nd patch is the wrong way to approach the problem. change the AC_TRY_RUN into an AC_TRY_COMPILE test by relying on RL_VERSION_{MAJOR,MINOR} being defined and doing an incremental search for its value. see how autoconf implements its AC_CHECK_SIZEOF macro using only compile tests for the algorithm. -mike
signature.asc
Description: This is a digitally signed message part.