From c92f94c8b09a6394f64c428f07b881ef561b4ec2 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 19 Jul 2014 05:06:25 +0000 Subject: [PATCH] fix mingw build of system plug-in (thanks Anders) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6527 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/System/SConscript | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Contrib/System/SConscript b/Contrib/System/SConscript index 28b57e13..0dc36609 100644 --- a/Contrib/System/SConscript +++ b/Contrib/System/SConscript @@ -38,18 +38,18 @@ if env['TARGET_ARCH'] != 'amd64' or msvc: # BUGBUG: Call-amd64.S is missing GAS defs += ['SYSTEM_PARTIALCALLSUPPORT'] filename = 'Call' + srcsuff - # When using the MS toolchain, SCons can pass .sx files to cl.exe: - # "D4024 : unrecognized source file type 'file.sx', object file assumed" - # "D4027 : source file 'file.sx' ignored" - # ...and then it returns 0! - # This only happens if TryCompile .S fails (ML/ML64 not in %PATH%?) - # - # BUGBUG: GCC < 4.3 does not understand .sx, only .S + src_ascpp = """ + #if 1 /* a C style comment */ + .end + #else + ERROR! + #endif + """ conf = env.Configure() if conf.TryCompile('END', '.S'): files += ['Source/'+filename+'.S'] - elif (not msvc) and conf.TryCompile('.end', '.sx'): - files += ['Source/'+filename+'.sx'] + elif conf.TryCompile(src_ascpp, '.S'): + files += ['Source/'+filename+'CPP.S'] else: print 'WARNING: System.dll: unable to find assembler for '+filename+'.S' conf.Finish()