From f36bb7557ea33826fded4ca8c09e7810965d34ae Mon Sep 17 00:00:00 2001 From: kichik Date: Tue, 14 Mar 2006 18:22:57 +0000 Subject: [PATCH] make sure -Wl,-Map is supported by the linker mingw supports it, so only check for non-cross envs git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4590 212acab6-be3b-0410-9dea-997c60f758d6 --- SCons/Config/gnu | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/SCons/Config/gnu b/SCons/Config/gnu index 882b727f..a5295d36 100644 --- a/SCons/Config/gnu +++ b/SCons/Config/gnu @@ -6,6 +6,10 @@ Import('defenv') # http://sourceforge.net/tracker/?func=detail&aid=1313856&group_id=30337&atid=398973 defenv['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS ${INCPREFIX}${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET' +### imports + +Import('FlagsConfigure') + ### cross compiling def cross_env(env): @@ -64,7 +68,10 @@ makensis_env.Append(CCFLAGS = '-Wall') # all warnings if not defenv['DEBUG']: makensis_env.Append(LINKFLAGS = '-s') # strip -makensis_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file + +conf = FlagsConfigure(makensis_env) +conf.CheckLinkFlag('$MAP_FLAG') # generate map file +conf.Finish() ### plugin environment @@ -91,7 +98,10 @@ cp_util_env.Append(CCFLAGS = '-Wall') # all warnings if not defenv['DEBUG']: cp_util_env.Append(LINKFLAGS = '-s') # strip -cp_util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file + +conf = FlagsConfigure(cp_util_env) +conf.CheckLinkFlag('$MAP_FLAG') # generate map file +conf.Finish() ### util environment @@ -190,8 +200,6 @@ conf.Finish() # instead of -lpthread. # -Import('FlagsConfigure') - conf = FlagsConfigure(makensis_env) conf.CheckLinkFlag('-pthread') conf.Finish()