Hello,
Some code fails with strict aliasing, attached compiler output.
You can add -fno-strict-aliasing or better fix the problems.
Strange enough... I tried to use CFLAGS and CPPFLAGS at environment and as command-line to sccons without any success... So I had to patch nsis-2.23-src/SCons/Config/gnu. Can you please allow modifying these variables from external (Maybe I just don't know how to do that...)
Another issue... Can you please add another way to tell configuration not to strip the binaries? Currently you don't strip only if debug... We (Gentoo) patch in order to allow stripping by user request at package manager. Best way is to add STRIP=0 or something at scons.
Thanks!
Compiler output
nsis-2.23-config.patch
Logged In: YES
user_id=1157530
Originator: YES
Gentoo current patches.
File Added: nsis-2.23-config.patch
Logged In: YES
user_id=1157530
Originator: YES
Forther reference can be found at, eg why it is important can be found at:
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Optimize-Options.html#index-fstrict_002daliasing-542
Logged In: YES
user_id=584402
Originator: NO
SCons doesn't support CFLAGS and CPPFLAGS by default. It's a bit hairy to add. For now, I've added APPEND_CCFLAGS and APPEND_LINKFLAGS command line options instead. STRIP is now also available.
I've also added -fno-strict-aliasing to avoid all the warnings as it's too much to change. Thanks.
So, you're left with:
scons STRIP=no
BTW, it's highly recommended that you do strip the resulting Windows binaries. A big feature of NSIS is the installer size and you lose a lot of that if you skip stripping. Just using MinGW already almost doubles the size... The best option here is to use the VC6 built binaries distributed with each Windows version. There's a ZIP file available for download that contains everything so you don't have to handle executable installers.
Logged In: YES
user_id=1157530
Originator: YES
Thanks!
We are stripping the executables... But by user request from package management... So thanks for the addition.
Logged In: YES
user_id=887028
Originator: NO
nsis-2.24 still has issues in this regard.
This is the patch that fix it:
diff -Nru nsis-2.24-src.orig/SCons/Config/gnu nsis-2.24-src/SCons/Config/gnu
--- nsis-2.24-src.orig/SCons/Config/gnu 2007-03-11 10:52:57.000000000 +0200
+++ nsis-2.24-src/SCons/Config/gnu 2007-03-11 10:54:11.000000000 +0200
@@ -113,6 +113,7 @@
if not defenv['DEBUG']:
cp_util_env.Append(CCFLAGS = '-O2') # optimize
cp_util_env.Append(CCFLAGS = '-Wall') # all warnings
+cp_util_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
conf = FlagsConfigure(cp_util_env)
conf.CheckLinkFlag('$MAP_FLAG') # generate map file
Logged In: YES
user_id=584402
Originator: NO
Thanks, fixed.