poppopjmp / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Improve flag definition system #116

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using the FLAGS file is confusing at first because it actually defines the 
whole top portion of the Makefile instead of just the contents of the CCFLAGS 
variable or LFLAGS.

Many things can be done to make this better, but one small change that would 
help users out is to replace part of the 'optimized CCFLAGS' line in the 
default Makefile with '-march=native' instead of '-msse2'. SSE2 is only one of 
many flags, and isn't necessarily cross-platform (my desktop only has SSE), 
while -march=native is a 'safe' CFLAG that enables all such CPU-based flags 
though it requires gcc 4.2+.

A quick check on the version of gcc being used ('gcc -v' or 'ls -l $(which 
gcc)')

http://en.gentoo-wiki.com/wiki/Safe_Cflags#-march.3Dnative

Original issue reported on code.google.com by fahh...@gmail.com on 17 Nov 2010 at 5:18

GoogleCodeExporter commented 8 years ago
thanks! I will think a bit about this.

Original comment by mark.duf...@gmail.com on 18 Nov 2010 at 7:41

GoogleCodeExporter commented 8 years ago
you are clearly right about -msse2, so I removed it. I also don't mind 
requiring GCC 4.2+.. while at it, I also removed -pipe, because that was never 
very useful I guess.

any other suggestions..? :)

Original comment by mark.duf...@gmail.com on 23 Nov 2010 at 5:08

GoogleCodeExporter commented 8 years ago
So does that mean you added -march=native? Other than -O2 and -march=native, I 
don't know of any safe flags, though I personally use O3 most of the time. 
Also, this will keep shedskin arch-independent for possibly using it on ARM 
systems and the such.

I'd like to thank you for your time in making and maintaining shedskin, it's 
really saved my behind. I may be able to help out in some aspects starting next 
semester.

Original comment by fahh...@gmail.com on 23 Nov 2010 at 5:32

GoogleCodeExporter commented 8 years ago
yes, the defaults are now:

-O2 -march=native -fomit-frame-pointer -Wno-deprecated

I guess -O3 is fine for personal use, but I ran into what looked like bugs 
before with this, so I prefer to keep -O2 for now. any thoughts about 
-fomit-frame-pointer? this option probably helps more than -O3, so I'd really 
like to keep it by default.

working on shedskin is my pleasure! thank you for the feedback, and please, 
when you compile something interesting and/or large I might add to examples/, 
please let me know.

Original comment by mark.duf...@gmail.com on 23 Nov 2010 at 5:45

GoogleCodeExporter commented 8 years ago
oh, of course any help would be welcome, though I'm guessing it's a relatively 
hard project to contribute to. please see the wiki tasks page for some 
relatively easy stuff, to start getting your feet wet.. 

Original comment by mark.duf...@gmail.com on 23 Nov 2010 at 5:47

GoogleCodeExporter commented 8 years ago
can I close this issue now, or do you have other suggestions..?

Original comment by mark.duf...@gmail.com on 27 Nov 2010 at 11:12

GoogleCodeExporter commented 8 years ago
Seems fine

Original comment by fahh...@gmail.com on 27 Nov 2010 at 11:15

GoogleCodeExporter commented 8 years ago
thanks again for the suggestions, the flags are much better now.

Original comment by mark.duf...@gmail.com on 27 Nov 2010 at 11:18