aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config.host
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2015-09-24 08:51:39 +0000
committerRainer Orth <ro@gcc.gnu.org>2015-09-24 08:51:39 +0000
commit2d11044217edd9168eafea1c8c60603f87b0e00d (patch)
tree025e93ec3292313d548bc0002efbee95ff405726 /libgcc/config.host
parentfcb901cdfac9321b0202d800621f06b2aafd5bee (diff)
downloadgcc-2d11044217edd9168eafea1c8c60603f87b0e00d.zip
gcc-2d11044217edd9168eafea1c8c60603f87b0e00d.tar.gz
gcc-2d11044217edd9168eafea1c8c60603f87b0e00d.tar.bz2
Use CRTs provided by Solaris
gcc: * configure.ac (gcc_cv_solaris_crts): New test. * configure. Regenerate. * config.in: Regenerate. * config/sol2.h (STARTFILE_SPEC): Simplify, provide HAVE_SOLARIS_CRTS variant. libgcc: * configure.ac (libgcc_cv_solaris_crts): New test. * configure: Regenerate. * config.in: Regenerate. * config/sol2/crtp.c, config/sol2/crtpg.c: New files. * config/gmon-sol2.c: Rename to ... * config/sol2/gmon.c: ... this. Include auto-target.h. (internal_mcount): Wrap setup handling in !HAVE_SOLARIS_CRTS. * config/t-sol2: Rename to ... * config/sol2/t-sol2: ... this. (gmon.o): Reflect renaming. (crtp.o, crtpg.o): New rules. * config.host (*-*-solaris2*): Reflect renaming. Use system CRTs if present. Remove default CRT case. From-SVN: r228077
Diffstat (limited to 'libgcc/config.host')
-rw-r--r--libgcc/config.host31
1 files changed, 17 insertions, 14 deletions
diff --git a/libgcc/config.host b/libgcc/config.host
index 140aa22..6c8b97b 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -267,7 +267,7 @@ case ${host} in
*-*-solaris2*)
# Unless linker support and dl_iterate_phdr are present,
# unwind-dw2-fde-dip.c automatically falls back to unwind-dw2-fde.c.
- tmake_file="$tmake_file t-sol2 t-eh-dw2-dip t-libgcc-pic t-slibgcc t-slibgcc-elf-ver"
+ tmake_file="$tmake_file sol2/t-sol2 t-eh-dw2-dip t-libgcc-pic t-slibgcc t-slibgcc-elf-ver"
if test $with_gnu_ld = yes; then
tmake_file="$tmake_file t-slibgcc-gld"
else
@@ -276,19 +276,22 @@ case ${host} in
# Add cpu-specific t-sol2 after t-slibgcc-* so it can augment SHLIB_MAPFILES.
tmake_file="$tmake_file $cpu_type/t-sol2"
extra_parts="gmon.o crtbegin.o crtend.o"
- case ${host} in
- i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
- # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
- # part of the base system.
- ;;
- sparc*-*-solaris2.1[0-9]*)
- # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
- extra_parts="$extra_parts crt1.o gcrt1.o"
- ;;
- *)
- extra_parts="$extra_parts crt1.o crti.o crtn.o gcrt1.o"
- ;;
- esac
+ if test "${libgcc_cv_solaris_crts}" = yes; then
+ # Solaris 11.x and 12 provide crt1.o, crti.o, and crtn.o as part of the
+ # base system. crtp.o and crtpg.o implement the compiler-dependent parts.
+ extra_parts="$extra_parts crtp.o crtpg.o"
+ else
+ case ${host} in
+ i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
+ # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
+ # part of the base system.
+ ;;
+ sparc*-*-solaris2.1[0-9]*)
+ # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
+ extra_parts="$extra_parts crt1.o gcrt1.o"
+ ;;
+ esac
+ fi
;;
*-*-uclinux*)
extra_parts="crtbegin.o crtend.o"