On 30/03/2012, at 6:48 AM, Jan Hubicka wrote: >> 2012-02-27 Enkovich Ilya <ilya.enkov...@intel.com> >> >> * gcc/config/i386/gnu-user.h (GNU_USER_TARGET_CC1_SPEC): New. >> (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC. >> (GNU_USER_TARGET_LINK_SPEC): New. >> (LINK_SPEC): Use GNU_USER_TARGET_LINK_SPEC. >> (GNU_USER_TARGET_MATHFILE_SPEC): New. >> (ENDFILE_SPEC): Use GNU_USER_TARGET_MATHFILE_SPEC. >> >> * gcc/config/i386/linux.h (CC1_SPEC): New. >> (LINK_SPEC): New. >> (LIB_SPEC): New. >> (STARTFILE_SPEC): New. >> (ENDFILE_SPEC): New. > OK. > I guess the patch now follows quite closely the arm implementation, right? > I am not quite sure if it makes sense to go around hassle and breaking up > the following into generic linux-or-android.h?
I think this is clear as one can reasonably get. It would be possible to include linux-or-android.h at the end of linux*.h that would #undef/#define *_SPEC macros like below, but it seems clearer to give the final choice of what is going into the *_SPEC macros to individual targets. -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics >> diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h >> index 73681fe..a832ddc 100644 >> --- a/gcc/config/i386/linux.h >> +++ b/gcc/config/i386/linux.h >> @@ -22,3 +22,30 @@ along with GCC; see the file COPYING3. If not see >> >> #define GNU_USER_LINK_EMULATION "elf_i386" >> #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" >> + >> +#undef CC1_SPEC >> +#define CC1_SPEC \ >> + LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ >> + GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC) >> + >> +#undef LINK_SPEC >> +#define LINK_SPEC \ >> + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LINK_SPEC, \ >> + GNU_USER_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) >> + >> +#undef LIB_SPEC >> +#define LIB_SPEC \ >> + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \ >> + GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC) >> + >> +#undef STARTFILE_SPEC >> +#define STARTFILE_SPEC \ >> + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, \ >> + ANDROID_STARTFILE_SPEC) >> + >> +#undef ENDFILE_SPEC >> +#define ENDFILE_SPEC \ >> + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_MATHFILE_SPEC " " \ >> + GNU_USER_TARGET_ENDFILE_SPEC, \ >> + GNU_USER_TARGET_MATHFILE_SPEC " " \ >> + ANDROID_ENDFILE_SPEC)