From 82a63895252cdf409678ae52116fa170d333926c Mon Sep 17 00:00:00 2001 From: Adrian Chiris Date: Tue, 28 Apr 2015 18:08:36 +0300 Subject: [PATCH] added support for cross compilation with powerpc64le-linux-gnu cross compiler --- configure.ac | 7 +++++++ mstflint.spec.in | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4b4f90e..5b99422 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,13 @@ AS_IF([test "x$enable_static_libstdcpp" = "xyes"], [ CXXFLAGS="$CXXFLAGS -static-libstdc++" ]) +AC_ARG_ENABLE([dynamic_ld], + AS_HELP_STRING([--enable-dynamic-ld], [Enable dynamic link to ld64.so])) + +AS_IF([test "x$enable_dynamic_ld" = "xyes"], [ + LDFLAGS="$LDFLAGS -Wl,--dynamic-linker=/lib64/ld64.so.2" +]) + CFLAGS="$CFLAGS -Werror -DMST_UL" CXXFLAGS="$CXXFLAGS -Werror -DMST_UL" diff --git a/mstflint.spec.in b/mstflint.spec.in index dbf4eb6..2446c83 100644 --- a/mstflint.spec.in +++ b/mstflint.spec.in @@ -47,7 +47,7 @@ for network adapters based on Mellanox Technologies chips. %endif %if %{buildtype} == "ppc64le" - config_flags="$config_flags --host=powerpc64le-linux-gnu" + config_flags="$config_flags --host=powerpc64le-linux-gnu --enable-dynamic-ld=yes" %endif %if %{buildtype} == "arm64" -- 2.41.0