summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-12 11:56:43 +0000
committermidipix <writeonce@midipix.org>2021-06-12 12:15:45 +0000
commite0b807c9536cbc3031b99789c822f3d1b568064e (patch)
tree3263d5fb3ef19c64f8c82c8ae7fe8f8214b5d8a3
parent5e47257f287f072cd23167bb04b86a2c221a74af (diff)
downloadsofort-e0b807c9536cbc3031b99789c822f3d1b568064e.tar.bz2
sofort-e0b807c9536cbc3031b99789c822f3d1b568064e.tar.xz
build system: configure: LDFLAGS_LAST: refined cross-compilation logic.
-rwxr-xr-xconfigure16
1 files changed, 13 insertions, 3 deletions
diff --git a/configure b/configure
index e324f8d..0982754 100755
--- a/configure
+++ b/configure
@@ -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