Author Topic: New compiler options?  (Read 8133 times)

Offline Randajad

  • Multiple posting newcomer
  • *
  • Posts: 13
New compiler options?
« 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.
« Last Edit: June 14, 2012, 08:37:36 am by Randajad »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: New compiler options?
« Reply #1 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Randajad

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: New compiler options?
« Reply #2 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: New compiler options?
« Reply #3 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Randajad

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: New compiler options?
« Reply #4 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: New compiler options?
« Reply #5 on: June 14, 2012, 12:11:52 pm »
Example options, that must be duplicated?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: New compiler options?
« Reply #6 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Randajad

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: New compiler options?
« Reply #7 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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: New compiler options?
« Reply #8 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.

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: New compiler options?
« Reply #9 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.

Regards,
xunxun