2012/8/8 Jean-Claude Beaudoin <[email protected]>
>
>
> On Wed, Aug 8, 2012 at 1:39 AM, Dongsheng Song
> <[email protected]>wrote:
>
>> I recommend you use '-march=x86-64' instead of '-march=nocona'.
>>
>
I don't see that option listed
here<http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html>,
although my 32-bit GCC 4.6.3 seems to accept it. "nocona" is the last
generation P4, Intel's first attempt at x86_64, and AMD's support of it
isn't much worse. Again, see:
http://en.wikipedia.org/wiki/SSE3
I build optimized toolchains, and reserve my artistic right to fail on
older systems (see PS for the very limited cases in which it actually
matters)
>
>> On Tue, Aug 7, 2012 at 3:24 AM, Ruben Van Boxem
>> <[email protected]> wrote:
>> > Hi everyone,
>> >
>> > I have finished messing up my scripts and fixing them afterwards. I
>> > bring you another GCC 4.6.3 build, with MinGW-w64 v2.0.5.
>> >
>> > Changes since the last build:
>> > - optimization options are for sure -O2 -march=nocona -mtune=core2.
>> > This means SSE3 is required.
>>
>
> I am concerned that these choices of -march, -mtune options may be the
> source of a problem I faced recently.
>
> I distribute a Common Lisp environment
> (MKCL<http://www.common-lisp.net/project/mkcl>)
> that is using MinGW64
> as its backend on Win64. A user of it reported that the precompiled Win64
> installation package that I had done for the latest version of it would not
> work properly on his machine (it SIGSEGVs) for an operation that I know
> works perfectly well on my machine.
>
> I had used Ruben's MinGW64 gcc 4.7.1 release toolset for it.
>
> I then went back down to Ruben's MinGW64 gcc 4.5.4 release toolset
> and that version of the exact same MKCL code, built with the exact
> same Makefile than previously, worked perfectly on my user's machine.
> (BTW, I also tried Ruben's gcc 4.6.3 and it failed like the gcc 4.7.1)
>
> My user's machine CPU is: Intel Core2 Duo U7300 @ 1,3GHz
>
> My build and test machine CPU is: Intel Core i7 930 @ 2,8GHz
>
> Could these options be the source of the problem?
>
No. Core2 and Core i7 both support SSE3.
The option -march=nocona should not affect the code you build whatsoever.
These are only options that affect the compiler executables themselves, and
as such only puts requirements on a developer's machine, not your users'
machines. If some incompatible CPU instruction ended up in your executable,
you'd get a SIGILL (illegal instruction).
I noticed you hit an ICE in GCC
4.6.2<http://old.nabble.com/GCC-4.6.2-internal-compiler-error-td33461245.html>.
It seems GCC hates your project ;-)
Have you tried running the crashing program through gdb to see exactly
where it segfaults?
Does a 32-bit compilation exhibit the same problems? Does your user run the
same OS?
If it also happens in 32-bit, and gdb gave you no additional information,
might I suggest upping the warning level (-Wall -Wextra -pedantic) and also
giving Clang a go? (download the win32 dw2 gcc 4.6.3-1 package and the
clang 3.1 package and unzip them into the same directory) It might catch
some intricacy that GCC fails to notice.
Hope this helps,
Ruben
PS: I investigated the implications of the -march=nocona option and it
seems this is unfortunately also passed to runtime libraries. It is not a
general cause for concern; only libgfortran contained 3 calls to an SSE3
instruction, all the rest did not have any SSE3 instructions embedded. I am
doubly disappointed: there seems to be no option to pass optimizations only
for the compiler executables and not runtime libs (for both cross and
native compilers), and SSE3 seems to have little to no effect whatsoever.
Only the 32-bit fortran runtime dll might not work on non-SSE3-enabled CPUs.
>
> Thanks,
>
> Jean-Claude Beaudoin
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public