This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On certain hosts (ie. mingw) the default wrapper scripts and binary do not work due to incompatible paths, path syntax, executable extensions Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com> --- config/companion_libs.in | 14 +++++++- scripts/build/internals.sh | 78 +++++++++++++++++++++++---------------------- 2 files changed, 53 insertions(+), 39 deletions(-) Index: crosstool-ng/config/companion_libs.in =================================================================== --- crosstool-ng.orig/config/companion_libs.in +++ crosstool-ng/config/companion_libs.in @@ -196,7 +196,7 @@ choice bool prompt "| Install tools wrapper as:" depends on WRAPPER_NEEDED - default TOOLS_WRAPPER_SHELL + default TOOLS_WRAPPER_SCRIPT config TOOLS_WRAPPER_SCRIPT bool @@ -216,11 +216,23 @@ config TOOLS_WRAPPER_EXEC See docs/overview.txt, section "Tools wrapper". +config TOOLS_WRAPPER_NONE + bool + prompt "none" + help + If for you're host it is known that the wrapper script and executable + do not work, then you should say 'Y' here. + Manual actions need to be taken on the host to verify that the correct + libraries are used run-time. + + See docs/overview.txt, section "Tools wrapper". + endchoice config TOOLS_WRAPPER string default "script" if TOOLS_WRAPPER_SCRIPT default "exec" if TOOLS_WRAPPER_EXEC + default "none" if TOOLS_WRAPPER_NONE endmenu Index: crosstool-ng/scripts/build/internals.sh =================================================================== --- crosstool-ng.orig/scripts/build/internals.sh +++ crosstool-ng/scripts/build/internals.sh @@ -39,44 +39,46 @@ do_finish() { # If using the companion libraries, we need a wrapper # that will set LD_LIBRARY_PATH approriately if [ "${CT_WRAPPER_NEEDED}" = "y" ]; then - CT_DoLog EXTRA "Installing toolchain wrappers" - CT_Pushd "${CT_PREFIX_DIR}/bin" - - # Install the wrapper - case "${CT_TOOLS_WRAPPER}" in - script) - CT_DoExecLog DEBUG install \ - -m 0755 \ - "${CT_LIB_DIR}/scripts/wrapper.in" \ - ".${CT_TARGET}-wrapper" - ;; - exec) - _t="-s" - if [ "${CT_DEBUG_CT}" = "y" ]; then - _t="" # If debugging crosstool-NG, don't strip the wrapper - fi - CT_DoExecLog DEBUG "${CT_HOST}-gcc" \ - -Wall -Wextra -Wunreachable-code -Werror \ - -O3 -static ${_t} \ - "${CT_LIB_DIR}/scripts/wrapper.c" \ - -o ".${CT_TARGET}-wrapper" - ;; - esac - - # Replace every tools with the wrapper - # Do it unconditionally, even for those tools that happen to be shell - # scripts, we don't know if they would in the end spawn a binary... - # Just skip symlinks - for _t in "${CT_TARGET}-"*; do - if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then - CT_DoExecLog ALL mv "${_t}" ".${_t}" - CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}" - fi - done - - # Get rid of the wrapper, we're using hardlinks - CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper" - CT_Popd + if [ "${CT_TOOLS_WRAPPER}" != "none" ]; then + CT_DoLog EXTRA "Installing toolchain wrappers" + CT_Pushd "${CT_PREFIX_DIR}/bin" + + # Install the wrapper + case "${CT_TOOLS_WRAPPER}" in + script) + CT_DoExecLog DEBUG install \ + -m 0755 \ + "${CT_LIB_DIR}/scripts/wrapper.in" \ + ".${CT_TARGET}-wrapper" + ;; + exec) + _t="-s" + if [ "${CT_DEBUG_CT}" = "y" ]; then + _t="" # If debugging crosstool-NG, don't strip the wrapper + fi + CT_DoExecLog DEBUG "${CT_HOST}-gcc" \ + -Wall -Wextra -Wunreachable-code -Werror \ + -O3 -static ${_t} \ + "${CT_LIB_DIR}/scripts/wrapper.c" \ + -o ".${CT_TARGET}-wrapper" + ;; + esac + + # Replace every tools with the wrapper + # Do it unconditionally, even for those tools that happen to be shell + # scripts, we don't know if they would in the end spawn a binary... + # Just skip symlinks + for _t in "${CT_TARGET}-"*; do + if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then + CT_DoExecLog ALL mv "${_t}" ".${_t}" + CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}" + fi + done + + # Get rid of the wrapper, we're using hardlinks + CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper" + CT_Popd + fi fi CT_DoLog EXTRA "Removing access to the build system tools" -- -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |