Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Maintenance:12.2_ArchPorts
cross-x86_64-gcc47-icecream-backend
suse-record-gcc-opts.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File suse-record-gcc-opts.diff of Package cross-x86_64-gcc47-icecream-backend
Index: gcc/varasm.c =================================================================== --- gcc/varasm.c.orig 2011-11-03 16:27:43.000000000 +0100 +++ gcc/varasm.c 2011-11-03 17:07:57.000000000 +0100 @@ -6979,6 +6979,35 @@ file_end_indicate_split_stack (void) } } +/* This is a generic routine emitting a SUSE specific section for + QA check marks. */ + +void +suse_file_end_indicate_optflags (void) +{ + unsigned int flags = SECTION_DEBUG | SECTION_STRINGS | SECTION_MERGE | (SECTION_ENTSIZE & 1); + + /* + o/O: optimize was off/on + s/S: size optimisation was off/on + p/P: stack-protector was off/on + w/W: warnings were off/on + g/G: debug was off/on + */ + + char opts_buffer[6]; + + opts_buffer[0] = (optimize >= 2) ? 'O' : 'o'; + opts_buffer[1] = (optimize >= 1 && optimize_size) ? 'S' : 's'; + opts_buffer[2] = (flag_stack_protect >= 1) ? 'P' : 'p'; + opts_buffer[3] = (warn_uninitialized >= 1 && warn_sequence_point >= 1) ? 'W' : 'w'; + opts_buffer[4] = (debug_info_level > DINFO_LEVEL_NONE) ? 'G' : 'g'; + opts_buffer[5] = '\0'; + + switch_to_section (get_section (".comment.SUSE.OPTs", flags, NULL)); + ASM_OUTPUT_ASCII (asm_out_file, opts_buffer, strlen (opts_buffer) + 1); +} + /* Output DIRECTIVE (a C string) followed by a newline. This is used as a get_unnamed_section callback. */ Index: gcc/output.h =================================================================== --- gcc/output.h.orig 2011-11-03 16:27:43.000000000 +0100 +++ gcc/output.h 2011-11-03 17:07:57.000000000 +0100 @@ -652,6 +652,7 @@ extern void default_asm_declare_constant extern void default_file_start (void); extern void file_end_indicate_exec_stack (void); extern void file_end_indicate_split_stack (void); +extern void suse_file_end_indicate_optflags (void); extern void default_elf_asm_output_external (FILE *file, tree, const char *); Index: gcc/toplev.c =================================================================== --- gcc/toplev.c.orig 2011-11-03 16:27:43.000000000 +0100 +++ gcc/toplev.c 2011-11-03 17:07:57.000000000 +0100 @@ -682,6 +682,8 @@ compile_file (void) /* Invoke registered plugin callbacks. */ invoke_plugin_callbacks (PLUGIN_FINISH_UNIT, NULL); + suse_file_end_indicate_optflags (); + /* This must be at the end. Some target ports emit end of file directives into the assembly file here, and hence we can not output anything to the assembly file after this point. */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor