From b73d3fe2c11d2d670092bce2da48c1ee0f6eaf5f Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Wed, 29 Jan 2014 16:08:49 -0800 Subject: [PATCH] cccl: Handle library paths for one shot compilation. When one wishes to compile and link a program with an external library in one shot, additional option "-link" is expected after all the other options. For example, $ cl -I/c/OpenSSL-Win32/include 3.c -link -LIBPATH:"C:/OpenSSL-Win32/lib" This is needed in an upcoming commit to compile conftest.c in autoconf. Signed-off-by: Gurucharan Shetty --- build-aux/cccl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-aux/cccl b/build-aux/cccl index 7914b4061..0c7f3d967 100644 --- a/build-aux/cccl +++ b/build-aux/cccl @@ -91,7 +91,8 @@ EOF -L*) path=`echo "$1" | sed 's/-L//'` - linkopt="$linkopt /LIBPATH:$path" + linkopt="$linkopt ${slash}LIBPATH:\"$path\"" + cl_linkopt="${slash}link ${slash}LIBPATH:\"$path\"" ;; -l*) @@ -188,7 +189,7 @@ fi # choose which opts we built up based on which program will actually run if test x$prog = xcl ; then - opts=$clopt + opts="$clopt $cl_linkopt" else opts=$linkopt fi -- 2.43.0