refactored gcc pisi files
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
diff -Nuar gcc-4.9.0.orig/gcc/config/i386/linux64.h gcc-4.9.0/gcc/config/i386/linux64.h
|
||||
--- gcc-4.9.0.orig/gcc/config/i386/linux64.h 2014-01-03 00:23:26.000000000 +0200
|
||||
+++ gcc-4.9.0/gcc/config/i386/linux64.h 2014-05-15 13:21:11.968021447 +0300
|
||||
@@ -28,5 +28,5 @@
|
||||
#define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
|
||||
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
|
||||
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
|
||||
#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
|
||||
diff -Nuar gcc-4.9.0.orig/gcc/config/i386/t-linux64 gcc-4.9.0/gcc/config/i386/t-linux64
|
||||
--- gcc-4.9.0.orig/gcc/config/i386/t-linux64 2014-01-03 00:23:26.000000000 +0200
|
||||
+++ gcc-4.9.0/gcc/config/i386/t-linux64 2014-05-15 13:11:48.198012307 +0300
|
||||
@@ -33,6 +33,6 @@
|
||||
comma=,
|
||||
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
|
||||
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
|
||||
-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)
|
||||
MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
|
||||
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
||||
@@ -1,17 +0,0 @@
|
||||
--- gcc/c-family/c-opts.c (revision 200330)
|
||||
+++ gcc/c-family/c-opts.c (working copy)
|
||||
@@ -1338,10 +1338,14 @@ c_finish_options (void)
|
||||
|
||||
/* Give CPP the next file given by -include, if any. */
|
||||
static void
|
||||
push_command_line_include (void)
|
||||
{
|
||||
+ // This can happen if disabled by -imacros for example.
|
||||
+ if (include_cursor > deferred_count)
|
||||
+ return;
|
||||
+
|
||||
if (!done_preinclude)
|
||||
{
|
||||
done_preinclude = true;
|
||||
if (flag_hosted && std_inc && !cpp_opts->preprocessed)
|
||||
{
|
||||
@@ -1,69 +0,0 @@
|
||||
diff -Nuar gcc-4.7.1.old/gcc/output.h gcc-4.7.1/gcc/output.h
|
||||
--- gcc-4.7.1.old/gcc/output.h 2012-03-22 12:40:31.000000000 +0200
|
||||
+++ gcc-4.7.1/gcc/output.h 2012-07-22 08:03:30.669774211 +0300
|
||||
@@ -661,6 +661,7 @@
|
||||
extern void default_file_start (void);
|
||||
extern void file_end_indicate_exec_stack (void);
|
||||
extern void file_end_indicate_split_stack (void);
|
||||
+extern void pisilinux_file_end_indicate_optflags (void);
|
||||
|
||||
extern void default_elf_asm_output_external (FILE *file, tree,
|
||||
const char *);
|
||||
diff -Nuar gcc-4.7.1.old/gcc/toplev.c gcc-4.7.1/gcc/toplev.c
|
||||
--- gcc-4.7.1.old/gcc/toplev.c 2012-01-05 17:08:42.000000000 +0200
|
||||
+++ gcc-4.7.1/gcc/toplev.c 2012-07-22 08:05:04.729598301 +0300
|
||||
@@ -674,6 +674,8 @@
|
||||
|
||||
/* Invoke registered plugin callbacks. */
|
||||
invoke_plugin_callbacks (PLUGIN_FINISH_UNIT, NULL);
|
||||
+
|
||||
+ pisilinux_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
|
||||
diff -Nuar gcc-4.7.1.old/gcc/varasm.c gcc-4.7.1/gcc/varasm.c
|
||||
--- gcc-4.7.1.old/gcc/varasm.c 2012-04-24 09:10:53.000000000 +0300
|
||||
+++ gcc-4.7.1/gcc/varasm.c 2012-07-22 08:01:31.878259309 +0300
|
||||
@@ -7165,14 +7165,34 @@
|
||||
switch_to_section (get_section (".note.GNU-stack", flags, NULL));
|
||||
}
|
||||
|
||||
-/* Emit a special section directive to indicate that this object file
|
||||
- was compiled with -fsplit-stack. This is used to let the linker
|
||||
- detect calls between split-stack code and non-split-stack code, so
|
||||
- that it can modify the split-stack code to allocate a sufficiently
|
||||
- large stack. We emit another special section if there are any
|
||||
- functions in this file which have the no_split_stack attribute, to
|
||||
- prevent the linker from warning about being unable to convert the
|
||||
- functions if they call non-split-stack code. */
|
||||
+/* This is a generic routine emitting a PisiLinux specific section for
|
||||
+ QA check marks. */
|
||||
+
|
||||
+void
|
||||
+pisilinux_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.PISILINUX.OPTs", flags, NULL));
|
||||
+ ASM_OUTPUT_ASCII (asm_out_file, opts_buffer, strlen (opts_buffer) + 1);
|
||||
+}
|
||||
|
||||
void
|
||||
file_end_indicate_split_stack (void)
|
||||
Reference in New Issue
Block a user