This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/32998] -frecord-gcc-switches issues


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32998

philomath <philomath868 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philomath868 at gmail dot
                   |                            |com

--- Comment #16 from philomath <philomath868 at gmail dot com> 2012-06-14 09:11:25 UTC ---
The wording in the manual is incorrect.  this option does not record "the
command line that was used to invoke the compiler", but the options that where
in affect while compiling.  two simple examples:

~ $ gcc -fno-omit-frame-pointer -o tst tst.c -frecord-gcc-switches
-fomit-frame-pointer

~ $ objdump -s --section=.GCC.command.line tst

tst:     file format elf64-x86-64

Contents of section .GCC.command.line:
 0000 7473742e 63002d6d 74756e65 3d67656e  tst.c.-mtune=gen
 0010 65726963 002d6d61 7263683d 7838362d  eric.-march=x86-
 0020 3634002d 7374643d 63393900 2d667265  64.-std=c99.-fre
 0030 636f7264 2d676363 2d737769 74636865  cord-gcc-switche
 0040 73002d66 6f6d6974 2d667261 6d652d70  s.-fomit-frame-p
 0050 6f696e74 657200                      ointer.

~ $ gcc -o tst tst.c -march=native -frecord-gcc-switches

~ $ objdump -s --section=.GCC.command.line tst

tst:     file format elf64-x86-64

Contents of section .GCC.command.line:
 0000 7473742e 63002d6d 61726368 3d636f72  tst.c.-march=cor
 0010 65693700 2d6d6378 3136002d 6d736

--- Comment #17 from philomath <philomath868 at gmail dot com> 2012-06-14 09:20:56 UTC ---
Sorry, the previous comment was interrupted while posting. here is it again.

The wording in the manual is incorrect.  this option does not record "the
command line that was used to invoke the compiler", but the options that where
in affect while compiling.  two simple examples:

~ $ gcc -fno-omit-frame-pointer -o tst tst.c -frecord-gcc-switches
-fomit-frame-pointer

~ $ objdump -s --section=.GCC.command.line tst

tst:     file format elf64-x86-64

Contents of section .GCC.command.line:
 0000 7473742e 63002d6d 74756e65 3d67656e  tst.c.-mtune=gen
 0010 65726963 002d6d61 7263683d 7838362d  eric.-march=x86-
 0020 3634002d 7374643d 63393900 2d667265  64.-std=c99.-fre
 0030 636f7264 2d676363 2d737769 74636865  cord-gcc-switche
 0040 73002d66 6f6d6974 2d667261 6d652d70  s.-fomit-frame-p
 0050 6f696e74 657200                      ointer.

~ $ gcc -o tst tst.c -march=native -frecord-gcc-switches

~ $ objdump -s --section=.GCC.command.line tst

tst:     file format elf64-x86-64

Contents of section .GCC.command.line:
 0000 7473742e 63002d6d 61726368 3d636f72  tst.c.-march=cor
 0010 65693700 2d6d6378 3136002d 6d736168  ei7.-mcx16.-msah
 0020 66002d6d 6e6f2d6d 6f766265 002d6d6e  f.-mno-movbe.-mn
 0030 6f2d6165 73002d6d 6e6f2d70 636c6d75  o-aes.-mno-pclmu
 0040 6c002d6d 706f7063 6e74002d 6d6e6f2d  l.-mpopcnt.-mno-
 0050 61626d00 2d6d6e6f 2d6c7770 002d6d6e  abm.-mno-lwp.-mn
 0060 6f2d666d 61002d6d 6e6f2d66 6d613400  o-fma.-mno-fma4.
 0070 2d6d6e6f 2d786f70 002d6d6e 6f2d626d  -mno-xop.-mno-bm
 0080 69002d6d 6e6f2d62 6d693200 2d6d6e6f  i.-mno-bmi2.-mno
 0090 2d74626d 002d6d6e 6f2d6176 78002d6d  -tbm.-mno-avx.-m
 00a0 6e6f2d61 76783200 2d6d7373 65342e32  no-avx2.-msse4.2
 00b0 002d6d73 7365342e 31002d6d 6e6f2d6c  .-msse4.1.-mno-l
 00c0 7a636e74 002d2d70 6172616d 206c312d  zcnt.--param l1-
 00d0 63616368 652d7369 7a653d33 32002d2d  cache-size=32.--
 00e0 70617261 6d206c31 2d636163 68652d6c  param l1-cache-l
 00f0 696e652d 73697a65 3d363400 2d2d7061  ine-size=64.--pa
 0100 72616d20 6c322d63 61636865 2d73697a  ram l2-cache-siz
 0110 653d3330 3732002d 6d74756e 653d636f  e=3072.-mtune=co
 0120 72656937 002d7374 643d6339 39002d66  rei7.-std=c99.-f
 0130 7265636f 72642d67 63632d73 77697463  record-gcc-switc
 0140 68657300                             hes.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]