From 81e0dc596f5e71f5e255ad39405518ad165d244e Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 18 Dec 2012 13:45:56 +0100 Subject: [PATCH 1/1] Linker option is useless when '-c' is present. --- src/smpi/smpiff.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpiff.in b/src/smpi/smpiff.in index 800415cc2d..b86184bd96 100644 --- a/src/smpi/smpiff.in +++ b/src/smpi/smpiff.in @@ -1,7 +1,8 @@ #! /bin/bash prefix="@exec_prefix@" -ARGS="-DMAIN__=user_main -Diargc_=smpi_process_argc -Dgetarg_=smpi_process_getarg -lf2c" +ARGS="-DMAIN__=user_main -Diargc_=smpi_process_argc -Dgetarg_=smpi_process_getarg" +LINKARGS="-lf2c" SRCFILES="" while [ -n "$1" ]; do @@ -16,10 +17,14 @@ while [ -n "$1" ]; do SRCFILES="${SRCFILES} ${SRCFILE}" ;; *) + if [ "${ARG}" = "-c" ]; then + LINKARGS="" + fi ARGS="${ARGS} ${ARG}" ;; esac done +ARGS="${ARGS} ${LINKARGS}" if [ -n "${SRCFILES}" ] then -- 2.20.1