diff options
-rw-r--r-- | gcc-4.4.3/gcc/config/arm/elf.h | 6 | ||||
-rw-r--r-- | gcc-4.4.3/gcc/config/arm/linux-eabi.h | 5 | ||||
-rw-r--r-- | gcc-4.4.3/gcc/config/i386/linux.h | 3 | ||||
-rw-r--r-- | gcc-4.4.3/gcc/config/linux-android.h | 5 | ||||
-rw-r--r-- | gcc-4.4.3/gcc/config/mips/linux.h | 3 | ||||
-rw-r--r-- | gcc-4.6/gcc/config/arm/elf.h | 6 | ||||
-rw-r--r-- | gcc-4.6/gcc/config/arm/linux-eabi.h | 5 | ||||
-rw-r--r-- | gcc-4.6/gcc/config/i386/linux.h | 3 | ||||
-rw-r--r-- | gcc-4.6/gcc/config/linux-android.h | 5 | ||||
-rw-r--r-- | gcc-4.6/gcc/config/mips/linux.h | 3 | ||||
-rw-r--r-- | gcc-4.7/gcc/config/arm/elf.h | 6 | ||||
-rw-r--r-- | gcc-4.7/gcc/config/arm/linux-eabi.h | 5 | ||||
-rw-r--r-- | gcc-4.7/gcc/config/i386/gnu-user.h | 3 | ||||
-rw-r--r-- | gcc-4.7/gcc/config/linux-android.h | 5 | ||||
-rw-r--r-- | gcc-4.7/gcc/config/mips/gnu-user.h | 3 |
15 files changed, 51 insertions, 15 deletions
diff --git a/gcc-4.4.3/gcc/config/arm/elf.h b/gcc-4.4.3/gcc/config/arm/elf.h index 7c3eddbe0..018319b07 100644 --- a/gcc-4.4.3/gcc/config/arm/elf.h +++ b/gcc-4.4.3/gcc/config/arm/elf.h @@ -52,8 +52,7 @@ #undef SUBSUBTARGET_EXTRA_SPECS #define SUBSUBTARGET_EXTRA_SPECS -#ifndef ASM_SPEC -#define ASM_SPEC "\ +#define LINUX_ASM_SPEC "\ %{mbig-endian:-EB} \ %{mlittle-endian:-EL} \ %{mcpu=*:-mcpu=%*} \ @@ -64,6 +63,9 @@ %{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \ %{mfloat-abi=*} %{mfpu=*} \ %(subtarget_extra_asm_spec)" + +#ifndef ASM_SPEC +#define ASM_SPEC LINUX_ASM_SPEC #endif /* The ARM uses @ are a comment character so we need to redefine diff --git a/gcc-4.4.3/gcc/config/arm/linux-eabi.h b/gcc-4.4.3/gcc/config/arm/linux-eabi.h index 2ca881890..9bec0c9fa 100644 --- a/gcc-4.4.3/gcc/config/arm/linux-eabi.h +++ b/gcc-4.4.3/gcc/config/arm/linux-eabi.h @@ -79,6 +79,11 @@ #define CC1PLUS_SPEC \ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC) +#undef ASM_SPEC +#define ASM_SPEC \ + LINUX_OR_ANDROID_CC (LINUX_ASM_SPEC, \ + LINUX_ASM_SPEC " " ANDROID_ASM_SPEC) + #undef LIB_SPEC #define LIB_SPEC \ LINUX_OR_ANDROID_LD (LINUX_TARGET_LIB_SPEC, \ diff --git a/gcc-4.4.3/gcc/config/i386/linux.h b/gcc-4.4.3/gcc/config/i386/linux.h index f3a98c26a..f0640b5a6 100644 --- a/gcc-4.4.3/gcc/config/i386/linux.h +++ b/gcc-4.4.3/gcc/config/i386/linux.h @@ -108,7 +108,8 @@ along with GCC; see the file COPYING3. If not see #undef ASM_SPEC #define ASM_SPEC \ "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} --32 \ - %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" + %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}} " \ + LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC) /* These may be provided by config/linux-grtev2.h. */ #ifndef LINUX_GRTE_EXTRA_SPECS diff --git a/gcc-4.4.3/gcc/config/linux-android.h b/gcc-4.4.3/gcc/config/linux-android.h index 8184bf90f..73975c6c1 100644 --- a/gcc-4.4.3/gcc/config/linux-android.h +++ b/gcc-4.4.3/gcc/config/linux-android.h @@ -39,7 +39,7 @@ "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}" #define ANDROID_LINK_SPEC \ - "%{shared: -Bsymbolic}" + "%{shared: -Bsymbolic} -z noexecstack -z relro -z now" #define ANDROID_CC1_SPEC \ "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \ @@ -49,6 +49,9 @@ "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \ "%{!frtti:%{!fno-rtti: -fno-rtti}}" +#define ANDROID_ASM_SPEC \ + "--noexecstack" + #define ANDROID_LIB_SPEC \ "%{!static: -ldl}" diff --git a/gcc-4.4.3/gcc/config/mips/linux.h b/gcc-4.4.3/gcc/config/mips/linux.h index 21670e300..280d6fbda 100644 --- a/gcc-4.4.3/gcc/config/mips/linux.h +++ b/gcc-4.4.3/gcc/config/mips/linux.h @@ -81,7 +81,8 @@ along with GCC; see the file COPYING3. If not see #undef SUBTARGET_ASM_SPEC #define SUBTARGET_ASM_SPEC \ - "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}" + "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}} " \ + LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC) /* The MIPS assembler has different syntax for .set. We set it to .dummy to trap any errors. */ diff --git a/gcc-4.6/gcc/config/arm/elf.h b/gcc-4.6/gcc/config/arm/elf.h index 88400884e..44d840b39 100644 --- a/gcc-4.6/gcc/config/arm/elf.h +++ b/gcc-4.6/gcc/config/arm/elf.h @@ -52,8 +52,7 @@ #undef SUBSUBTARGET_EXTRA_SPECS #define SUBSUBTARGET_EXTRA_SPECS -#ifndef ASM_SPEC -#define ASM_SPEC "\ +#define LINUX_ASM_SPEC "\ %{mbig-endian:-EB} \ %{mlittle-endian:-EL} \ %{mcpu=*:-mcpu=%*} \ @@ -64,6 +63,9 @@ %{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \ %{mfloat-abi=*} %{mfpu=*} \ %(subtarget_extra_asm_spec)" + +#ifndef ASM_SPEC +#define ASM_SPEC LINUX_ASM_SPEC #endif /* The ARM uses @ are a comment character so we need to redefine diff --git a/gcc-4.6/gcc/config/arm/linux-eabi.h b/gcc-4.6/gcc/config/arm/linux-eabi.h index 3a3218853..2febcb293 100644 --- a/gcc-4.6/gcc/config/arm/linux-eabi.h +++ b/gcc-4.6/gcc/config/arm/linux-eabi.h @@ -79,6 +79,11 @@ #define CC1PLUS_SPEC \ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC) +#undef ASM_SPEC +#define ASM_SPEC \ + LINUX_OR_ANDROID_CC (LINUX_ASM_SPEC, \ + LINUX_ASM_SPEC " " ANDROID_ASM_SPEC) + #undef LIB_SPEC #define LIB_SPEC \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \ diff --git a/gcc-4.6/gcc/config/i386/linux.h b/gcc-4.6/gcc/config/i386/linux.h index 414dc65bf..5f0bcdbf6 100644 --- a/gcc-4.6/gcc/config/i386/linux.h +++ b/gcc-4.6/gcc/config/i386/linux.h @@ -104,7 +104,8 @@ along with GCC; see the file COPYING3. If not see #undef ASM_SPEC #define ASM_SPEC \ - "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" + "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}} " \ + LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC) /* These may be provided by config/linux-grtev2.h. */ #ifndef LINUX_GRTE_EXTRA_SPECS diff --git a/gcc-4.6/gcc/config/linux-android.h b/gcc-4.6/gcc/config/linux-android.h index acbc6627f..82346585a 100644 --- a/gcc-4.6/gcc/config/linux-android.h +++ b/gcc-4.6/gcc/config/linux-android.h @@ -39,7 +39,7 @@ "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}" #define ANDROID_LINK_SPEC \ - "%{shared: -Bsymbolic}" + "%{shared: -Bsymbolic} -z noexecstack -z relro -z now" #define ANDROID_CC1_SPEC \ "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \ @@ -49,6 +49,9 @@ "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \ "%{!frtti:%{!fno-rtti: -fno-rtti}}" +#define ANDROID_ASM_SPEC \ + "--noexecstack" + #define ANDROID_LIB_SPEC \ "%{!static: -ldl}" diff --git a/gcc-4.6/gcc/config/mips/linux.h b/gcc-4.6/gcc/config/mips/linux.h index a78f6bcbb..a1a8efc25 100644 --- a/gcc-4.6/gcc/config/mips/linux.h +++ b/gcc-4.6/gcc/config/mips/linux.h @@ -76,7 +76,8 @@ along with GCC; see the file COPYING3. If not see #undef SUBTARGET_ASM_SPEC #define SUBTARGET_ASM_SPEC \ - "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}" + "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}} " \ + LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC) /* The MIPS assembler has different syntax for .set. We set it to .dummy to trap any errors. */ diff --git a/gcc-4.7/gcc/config/arm/elf.h b/gcc-4.7/gcc/config/arm/elf.h index e0a0aa06c..417adf8a2 100644 --- a/gcc-4.7/gcc/config/arm/elf.h +++ b/gcc-4.7/gcc/config/arm/elf.h @@ -52,8 +52,7 @@ #undef SUBSUBTARGET_EXTRA_SPECS #define SUBSUBTARGET_EXTRA_SPECS -#ifndef ASM_SPEC -#define ASM_SPEC "\ +#define LINUX_ASM_SPEC "\ %{mbig-endian:-EB} \ %{mlittle-endian:-EL} \ %(asm_cpu_spec) \ @@ -62,6 +61,9 @@ %{mthumb-interwork:-mthumb-interwork} \ %{mfloat-abi=*} %{mfpu=*} \ %(subtarget_extra_asm_spec)" + +#ifndef ASM_SPEC +#define ASM_SPEC LINUX_ASM_SPEC #endif /* The ARM uses @ are a comment character so we need to redefine diff --git a/gcc-4.7/gcc/config/arm/linux-eabi.h b/gcc-4.7/gcc/config/arm/linux-eabi.h index 80bd82593..af13e35f0 100644 --- a/gcc-4.7/gcc/config/arm/linux-eabi.h +++ b/gcc-4.7/gcc/config/arm/linux-eabi.h @@ -79,6 +79,11 @@ #define CC1PLUS_SPEC \ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC) +#undef ASM_SPEC +#define ASM_SPEC \ + LINUX_OR_ANDROID_CC (LINUX_ASM_SPEC, \ + LINUX_ASM_SPEC " " ANDROID_ASM_SPEC) + #undef LIB_SPEC #define LIB_SPEC \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \ diff --git a/gcc-4.7/gcc/config/i386/gnu-user.h b/gcc-4.7/gcc/config/i386/gnu-user.h index 5232bd603..deb1341a2 100644 --- a/gcc-4.7/gcc/config/i386/gnu-user.h +++ b/gcc-4.7/gcc/config/i386/gnu-user.h @@ -95,7 +95,8 @@ along with GCC; see the file COPYING3. If not see #undef ASM_SPEC #define ASM_SPEC \ - "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" + "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}} " \ + LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC) #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ diff --git a/gcc-4.7/gcc/config/linux-android.h b/gcc-4.7/gcc/config/linux-android.h index acbc6627f..82346585a 100644 --- a/gcc-4.7/gcc/config/linux-android.h +++ b/gcc-4.7/gcc/config/linux-android.h @@ -39,7 +39,7 @@ "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}" #define ANDROID_LINK_SPEC \ - "%{shared: -Bsymbolic}" + "%{shared: -Bsymbolic} -z noexecstack -z relro -z now" #define ANDROID_CC1_SPEC \ "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \ @@ -49,6 +49,9 @@ "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \ "%{!frtti:%{!fno-rtti: -fno-rtti}}" +#define ANDROID_ASM_SPEC \ + "--noexecstack" + #define ANDROID_LIB_SPEC \ "%{!static: -ldl}" diff --git a/gcc-4.7/gcc/config/mips/gnu-user.h b/gcc-4.7/gcc/config/mips/gnu-user.h index 49c459bc7..4b340f862 100644 --- a/gcc-4.7/gcc/config/mips/gnu-user.h +++ b/gcc-4.7/gcc/config/mips/gnu-user.h @@ -67,7 +67,8 @@ along with GCC; see the file COPYING3. If not see #undef SUBTARGET_ASM_SPEC #define SUBTARGET_ASM_SPEC \ - "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}" + "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}} " \ + LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC) /* The MIPS assembler has different syntax for .set. We set it to .dummy to trap any errors. */ |