mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-27 22:03:57 +08:00
[i386][musl] Add cpuinfo to static libgcc only on *-musl*
The __cpu_indicator_init and __cpu_model symbols are not safe to use from shared libgcc_s.so from ifunc resolvers, so since gcc-6, only the definitions from static libgcc.a are used, however the symbols are kept in libgcc_s as well for backward compatibility (with appropriate symbol version). On targets without such backward compatibility concern add cpuinfo to the static library only (this avoids running the ctor, reduces libgcc_s size and elf abi concerns about the versioned symbols). libgcc/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * config.host (i[3456]86-*-musl*, x86_64-*-musl*): Use i386/t-cpuinfo-static instead of i386/t-cpuinfo. * config/i386/t-cpuinfo-static: New. From-SVN: r242268
This commit is contained in:
parent
c901bc0d8e
commit
9d8f95deca
@ -1,3 +1,9 @@
|
||||
2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
* config.host (i[3456]86-*-musl*, x86_64-*-musl*): Use
|
||||
i386/t-cpuinfo-static instead of i386/t-cpuinfo.
|
||||
* config/i386/t-cpuinfo-static: New.
|
||||
|
||||
2016-11-03 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* libgcov-profiler.c (__gcov_time_profiler): Remove.
|
||||
|
@ -1320,8 +1320,15 @@ esac
|
||||
|
||||
case ${host} in
|
||||
i[34567]86-*-* | x86_64-*-*)
|
||||
case ${host} in
|
||||
*-musl*)
|
||||
tmake_file="${tmake_file} i386/t-cpuinfo-static"
|
||||
;;
|
||||
*)
|
||||
tmake_file="${tmake_file} i386/t-cpuinfo"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${host} in
|
||||
|
4
libgcc/config/i386/t-cpuinfo-static
Normal file
4
libgcc/config/i386/t-cpuinfo-static
Normal file
@ -0,0 +1,4 @@
|
||||
# If the compatibility cpuinfo symbols in shared libgcc_s are not needed
|
||||
# then they can be added to the static library only.
|
||||
|
||||
LIB2ADD_ST += $(srcdir)/config/i386/cpuinfo.c
|
Loading…
Reference in New Issue
Block a user