From ab1ba32d0b2709d04b8b8756a40933328af42c4f Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 6 Apr 2012 15:03:42 +0000 Subject: [PATCH] bring back $LDSTATIC support --- Build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Build.sh b/Build.sh index f8399d1..32cf546 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.539 2012/04/06 13:25:51 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.540 2012/04/06 15:03:42 tg Exp $' #- # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 @@ -379,6 +379,11 @@ if test x"$srcdir" = x"."; then else CPPFLAGS="-I. -I'$srcdir' $CPPFLAGS" fi +test -n "$LDSTATIC" && if test -n "$LDFLAGS"; then + LDFLAGS="$LDFLAGS $LDSTATIC" +else + LDFLAGS=$LDSTATIC +fi test x"$TARGET_OS" = x"" && TARGET_OS=`uname -s 2>/dev/null || uname` if test x"$TARGET_OS" = x""; then @@ -1371,7 +1376,7 @@ else #define EXTERN #define MKSH_INCLUDES_ONLY #include "sh.h" - __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.539 2012/04/06 13:25:51 tg Exp $"); + __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.540 2012/04/06 15:03:42 tg Exp $"); int main(void) { printf("Hello, World!\n"); return (0); } EOF case $cm in @@ -2035,6 +2040,7 @@ CFLAGS if empty, defaults to -xO2 or +O2 or -O3 -qstrict or -O2, per compiler CPPFLAGS default empty LDFLAGS default empty; added before sources +LDSTATIC set this to '-static'; default unset LIBS default empty; added after sources [Interix] default: -lcrypt (XXX still needed?) NOWARN -Wno-error or similar