diff options
author | midipix <writeonce@midipix.org> | 2021-06-12 11:56:43 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-06-12 12:15:41 +0000 |
commit | fad8674b38d18b7d44eef97d012db04e9844fcff (patch) | |
tree | 5c715a8bc9e89b99c895b6d4912e44a55163c8d0 | |
parent | 27771583201db32256a0682cced3728e3549068e (diff) | |
download | bfirm-fad8674b38d18b7d44eef97d012db04e9844fcff.tar.bz2 bfirm-fad8674b38d18b7d44eef97d012db04e9844fcff.tar.xz |
build system: configure: LDFLAGS_LAST: refined cross-compilation logic.
-rwxr-xr-x | configure | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -693,9 +693,6 @@ common_defaults() mb_cflags_cmdline="$mb_cflags_cmdline $mb_cflags" mb_ldflags_cmdline="$mb_ldflags_cmdline $mb_ldflags" - # add the prefix's library directory to the linker library path - mb_ldflags_last="$mb_ldflags_last -L$mb_libdir" - # step epilog output_step_epilog } @@ -823,6 +820,19 @@ config_ccenv() exit 2 fi + # add the library directory to the linker library path + if [ "$mb_cchost" = "$mb_native_cchost" ]; then + mb_ldflags_last="$mb_ldflags_last -L$mb_libdir" + else + case "$mb_libdir" in + /*) + mb_ldflags_last="$mb_ldflags_last -L$mb_sysroot/.$mb_libdir" + ;; + *) + mb_ldflags_last="$mb_ldflags_last -L$mb_libdir" + esac + fi + # re-generate Makefile.tmp output_section_break config_copy |