aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-11-09 09:29:23 -0800
committerH.J. Lu <hjl.tools@gmail.com>2020-12-01 16:33:10 -0800
commit54967b02c192f893e0f23481c865dd8abcb74018 (patch)
tree1e75845ab61a36fa0800d8459e20ac5868c6bd77 /gcc/config.gcc
parente0f5e7926789f2ddeabb5b0266958532a43cc155 (diff)
downloadgcc-54967b02c192f893e0f23481c865dd8abcb74018.zip
gcc-54967b02c192f893e0f23481c865dd8abcb74018.tar.gz
gcc-54967b02c192f893e0f23481c865dd8abcb74018.tar.bz2
x86: Add -mneeded for GNU_PROPERTY_X86_ISA_1_V[234] marker
GCC 11 supports -march=x86-64-v[234] to enable x86 micro-architecture ISA levels: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97250 Binutils has been updated to support GNU_PROPERTY_X86_ISA_1_V[234] marker: https://gitlab.com/x86-psABIs/x86-64-ABI/-/merge_requests/13 with commit b0ab06937385e0ae25cebf1991787d64f439bf12 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Oct 30 06:49:57 2020 -0700 x86: Support GNU_PROPERTY_X86_ISA_1_BASELINE marker and commit 32930e4edbc06bc6f10c435dbcc63131715df678 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Oct 9 05:05:57 2020 -0700 x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker in x86 ELF binaries. Add -mneeded to emit GNU_PROPERTY_X86_ISA_1_NEEDED property to indicate the micro-architecture ISA level required to execute the binary. gcc/ * config.gcc: Replace cet.o with gnu-property.o. Replace i386/t-cet with i386/t-gnu-property. * config/i386/cet.c: Renamed to ... * config/i386/gnu-property.c: This. (emit_gnu_property): New function. (file_end_indicate_exec_stack_and_cet): Renamed to ... (file_end_indicate_exec_stack_and_gnu_property): This. Call emit_gnu_property to generate GNU_PROPERTY_X86_FEATURE_1_AND and GNU_PROPERTY_X86_ISA_1_NEEDED properties. * config/i386/i386.opt (mneeded): New. * config/i386/linux-common.h (file_end_indicate_exec_stack_and_cet): Renamed to ... (file_end_indicate_exec_stack_and_gnu_property): This. (TARGET_ASM_FILE_END): Updated. * config/i386/t-cet: Renamed to ... * config/i386/t-gnu-property: This. (cet.o): Renamed to ... (gnu-property.o): This. * doc/invoke.texi: Document -mneeded. gcc/testsuite/ * gcc.target/i386/x86-needed-1.c: New test. * gcc.target/i386/x86-needed-2.c: Likewise. * gcc.target/i386/x86-needed-3.c: Likewise.
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 4808b69..b8d2686 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5231,8 +5231,8 @@ case ${target} in
i[34567]86-*-darwin* | x86_64-*-darwin*)
;;
i[34567]86-*-linux* | x86_64-*-linux*)
- extra_objs="${extra_objs} cet.o"
- tmake_file="$tmake_file i386/t-linux i386/t-cet"
+ extra_objs="${extra_objs} gnu-property.o"
+ tmake_file="$tmake_file i386/t-linux i386/t-gnu-property"
;;
i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
tmake_file="$tmake_file i386/t-kfreebsd"