This is the mail archive of the gcc-patches@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]

[google/google-main] Fix regression - SUBTARGET_EXTRA_SPECS overridden by LINUX_GRTE_EXTRA_SPECS (issue 6016047)


Reviewers: asharif1, jingyu, Diego Novillo,

Message:
Hi, the newest chrome gcc (from google-main) fails to linking anything,
by looking into specs file, it seems that 'link_emulation' section is
missing in specs.

The problem I found is that SUBTARGET_EXTRA_SPECS, which is not empty
for chromeos, is overridden by "LINUX_GRTE_EXTRA_SPECS".

Please review the proposed a patch. (Tested by buildit bootstrap).

-Han



Description:
In linux.h, macro SUBTARGET_EXTRA_SPECS is overridden by
"LINUX_GRTE_EXTRA_SPECS", so the origin content of SUBTARGET_EXTRA_SPECS
never gets written into gcc spec, which causes linking failure for
chrome gcc.


Please review this at http://codereview.appspot.com/6016047/


Affected files:
  M gcc/config/i386/i386.h
  M gcc/config/i386/linux.h


Index: gcc/config/i386/i386.h diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 7721c46..29fdd0b 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -621,8 +621,9 @@ enum target_cpu_default #endif

 #define EXTRA_SPECS							\
-  { "cc1_cpu",  CC1_CPU_SPEC },						\
-  SUBTARGET_EXTRA_SPECS
+  { "cc1_cpu",  CC1_CPU_SPEC },					\
+    LINUX_GRTE_EXTRA_SPECS						\
+    SUBTARGET_EXTRA_SPECS
 

 /* Set the value of FLT_EVAL_METHOD in float.h.  When using only the
Index: gcc/config/i386/linux.h
diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
index ade524c..383dedf 100644
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
@@ -30,7 +30,3 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef LINUX_GRTE_EXTRA_SPECS
 #define LINUX_GRTE_EXTRA_SPECS
 #endif
-
-#undef  SUBTARGET_EXTRA_SPECS
-#define SUBTARGET_EXTRA_SPECS \
-  LINUX_GRTE_EXTRA_SPECS



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