Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Randajad on June 14, 2012, 08:34:45 am

Title: New compiler options?
Post by: Randajad on June 14, 2012, 08:34:45 am
GCC have a many intresting options, that is not currently support CB.
Please, add these options to opt window. :)

Quote
-flto(link time codegeneration)
-Ofast(-O3 with --fash-math and other improvements)
-momit-leaf-frame-pointer(omit frame pointer from leaf functions)
-msse(using SSE instruction set) --- it's needed because in my test i found, that with -march=pentium3(mmx, sse) gcc produces bad code rather than i use -mmmx & -msse
... and many others, i can lead list of important options

Also there is a bug in codeblocks. If i type by myself option, that CB supports, to compiler options(for example, -O3) and click OK, then codeblocks removes it from compiler options and does not add to compiler flags.

Also i'm tested and found, that it's need to add some compiler options to linker flags too. CB only adds -s to linker options, if i specify it in compiler flags. I think, codeblocks should duplicate all the options from compiler command line to linker. There is no options, that linker say it's invalid. But in some cases it important to duplicate options to gcc linker.

Also there is vary bad situation with ICC compiler. I have ICC 12.
It doesn't support now options such as /QxK, /QxB, ... There is now similiar options like: /arch:IA32(uses mmx & sse), /arch:SSE2(uses SSE2) and so on.

Also sorry for my Eng, i'm Ru.
Title: Re: New compiler options?
Post by: oBFusCATed on June 14, 2012, 09:24:57 am
Why do you think it doesn't support it ?
There is the other options, both in the compiler and in the linker.
I suppose you don't expect us to add all possible options?
Title: Re: New compiler options?
Post by: Randajad on June 14, 2012, 09:49:30 am
Because i don't see it in CB.
I know about other options, but usual many(not all, of course) options can and should be duplicated to linker command line.
Yes, i don't expect that all options will be added. But i think, it is possible to add intresting options.
Don't know what you thinking about list above options, but i think new options(since gcc 4.6) as -Ofast & -flto should be added.
Title: Re: New compiler options?
Post by: oBFusCATed on June 14, 2012, 10:10:45 am
I think we already have too many options there.

I know about other options, but usual many(not all, of course) options can and should be duplicated to linker command line.
If you need a special option for the linker, you can put it in "other linker options". I don't see what is the problem here.
Title: Re: New compiler options?
Post by: Randajad on June 14, 2012, 11:59:56 am
Why i need do it by my hands, when it can be done by CB?
It's not special options, btw. For example, cb duplicate option "-s". Why not all?
Title: Re: New compiler options?
Post by: oBFusCATed on June 14, 2012, 12:11:52 pm
Example options, that must be duplicated?
Title: Re: New compiler options?
Post by: MortenMacFly on June 14, 2012, 04:24:18 pm
Example options, that must be duplicated?
Huh? that would really be strange. Use case? What compiler are you talking about? And in the end you always have the "other options" for this purpose.
Title: Re: New compiler options?
Post by: Randajad on June 23, 2012, 09:53:39 am
Every options, when using -flto, because the linker generates code.

P.S. MortenMacFly, in the end i have notepad and console!
Title: Re: New compiler options?
Post by: oBFusCATed on June 23, 2012, 05:55:22 pm
Every options, when using -flto, because the linker generates code.
Example build log and a quote from the help please?
I doubt you have to duplicate the define options or the warning options.

Title: Re: New compiler options?
Post by: xunxun on June 23, 2012, 06:39:19 pm
There are many gcc options (tens of thousands), so no need to add all of them.

If you want to ask why not to add -flto, other one will ask why not to add -fwhole-program, -fuse-linker-plugin, -flto[n], -flto-compression-level=, -flto-report, -ffat-lto-objects or other many similar options.

And I think -s position in CB is wrong, "-Wl,-s" is a linker option, not a compiler option.