diff options
author | midipix <writeonce@midipix.org> | 2021-06-12 11:56:43 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-06-12 12:15:43 +0000 |
commit | 6dc727f9dcf60591e3f14e399c1ee411a97837a2 (patch) | |
tree | 276605d3d4e040d13ee5f3c367250d9765ed8fdc /configure | |
parent | e5f17defad8c3d2c4c29e88aad8c709d78954d50 (diff) | |
download | ntcon-6dc727f9dcf60591e3f14e399c1ee411a97837a2.tar.bz2 ntcon-6dc727f9dcf60591e3f14e399c1ee411a97837a2.tar.xz |
build system: configure: LDFLAGS_LAST: refined cross-compilation logic.
Diffstat (limited to 'configure')
-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 |