From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5617 invoked by alias); 14 Jun 2012 09:22:19 -0000 Received: (qmail 5597 invoked by uid 22791); 14 Jun 2012 09:22:17 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_BJ,TW_CL X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jun 2012 09:22:04 +0000 From: "philomath868 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/32998] -frecord-gcc-switches issues Date: Thu, 14 Jun 2012 09:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: philomath868 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg00884.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32998 philomath changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philomath868 at gmail dot | |com --- Comment #16 from philomath 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 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.