Commit a26f86dc by Andreas Tobler Committed by Andreas Tobler

configure.ac (HAVE_LD_NO_DOT_SYMBOLS): Add powerpc64-*-freebsd*.

2012-03-21  Andreas Tobler  <andreast@fgznet.ch>

        * configure.ac (HAVE_LD_NO_DOT_SYMBOLS): Add powerpc64-*-freebsd*.
        Introduce emul_name to select the right linker emulation for
        powerpc64-*-freebsd*.
        * configure: Regenerate.
        * config.gcc: Add bits to support powerpc64-*-freebsd*.
        * config/rs6000/freebsd.h (POWERPC_FREEBSD): Define.
        * config/rs6000/freebsd64.h: New file.
        * config/rs6000/rs6000.c (rs6000_option_override_internal): Use
        POWERPC_FREEBSD.
        (rs6000_savres_strategy): Likewise.
        (rs6000_savres_routine_name): Likewise.
        (rs6000_elf_file_end): Likewise.
        * config/rs6000/t-freebsd64: New file.
        * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Set the
        rs6000_current_abi for 64-bit FreeBSD to ABI_AIX.

From-SVN: r185615
parent d82ad50d
2012-03-21 Andreas Tobler <andreast@fgznet.ch>
* configure.ac (HAVE_LD_NO_DOT_SYMBOLS): Add powerpc64-*-freebsd*.
Introduce emul_name to select the right linker emulation for
powerpc64-*-freebsd*.
* configure: Regenerate.
* config.gcc: Add bits to support powerpc64-*-freebsd*.
* config/rs6000/freebsd.h (POWERPC_FREEBSD): Define.
* config/rs6000/freebsd64.h: New file.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Use
POWERPC_FREEBSD.
(rs6000_savres_strategy): Likewise.
(rs6000_savres_routine_name): Likewise.
(rs6000_elf_file_end): Likewise.
* config/rs6000/t-freebsd64: New file.
* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Set the
rs6000_current_abi for 64-bit FreeBSD to ABI_AIX.
2012-03-21 Georg-Johann Lay <avr@gjlay.de>
PR rtl-optimization/52543
......
......@@ -1888,10 +1888,20 @@ powerpc64-*-darwin*)
tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
extra_headers=altivec.h
;;
powerpc-*-freebsd*)
tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
powerpc*-*-freebsd*)
tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
case ${host} in
powerpc64*)
tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
tmake_file="${tmake_file} rs6000/t-freebsd64"
extra_options="${extra_options} rs6000/linux64.opt"
;;
*)
tm_file="${tm_file} rs6000/freebsd.h"
;;
esac
;;
powerpc-*-netbsd*)
tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
......
......@@ -75,3 +75,5 @@
(target_flags & target_flags_explicit & MASK_RELOCATABLE)
#define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO)
#define POWERPC_FREEBSD
......@@ -2866,7 +2866,7 @@ rs6000_option_override_internal (bool global_init_p)
rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
}
#ifndef POWERPC_LINUX
#if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD)
if (!global_options_set.x_rs6000_ieeequad)
rs6000_ieeequad = 1;
#endif
......@@ -17506,7 +17506,7 @@ rs6000_savres_strategy (rs6000_stack_t *info,
&& info->cr_save_p)
strategy |= REST_INLINE_GPRS;
#ifdef POWERPC_LINUX
#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
if (TARGET_64BIT)
{
if (!(strategy & SAVE_INLINE_FPRS))
......@@ -19046,7 +19046,7 @@ rs6000_savres_routine_name (rs6000_stack_t *info, int regno,
}
else if (DEFAULT_ABI == ABI_AIX)
{
#ifndef POWERPC_LINUX
#if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD)
/* No out-of-line save/restore routines for GPRs on AIX. */
gcc_assert (!TARGET_AIX || !gpr);
#endif
......@@ -19056,7 +19056,7 @@ rs6000_savres_routine_name (rs6000_stack_t *info, int regno,
prefix = (savep
? (lr ? "_savegpr0_" : "_savegpr1_")
: (lr ? "_restgpr0_" : "_restgpr1_"));
#ifdef POWERPC_LINUX
#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
else if (lr)
prefix = (savep ? "_savefpr_" : "_restfpr_");
#endif
......@@ -25051,7 +25051,7 @@ rs6000_elf_file_end (void)
aix_struct_return ? 2 : 1);
}
#endif
#ifdef POWERPC_LINUX
#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
if (TARGET_32BIT)
file_end_indicate_exec_stack ();
#endif
......
......@@ -89,9 +89,8 @@ do { \
} \
else if (!strcmp (rs6000_abi_name, "aixdesc")) \
rs6000_current_abi = ABI_AIX; \
else if (!strcmp (rs6000_abi_name, "freebsd")) \
rs6000_current_abi = ABI_V4; \
else if (!strcmp (rs6000_abi_name, "linux")) \
else if (!strcmp (rs6000_abi_name, "freebsd") \
|| !strcmp (rs6000_abi_name, "linux")) \
{ \
if (TARGET_64BIT) \
rs6000_current_abi = ABI_AIX; \
......
#rs6000/t-freebsd64
# Copyright (C) 2012, Free Software Foundation, Inc.
#
# This file is part of GCC.
#
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# On FreeBSD the 32-bit libraries are found under /usr/lib32.
# Set MULTILIB_OSDIRNAMES according to this.
MULTILIB_OPTIONS = m32 msoft-float
MULTILIB_DIRNAMES = 32 nof
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
MULTILIB_EXCEPTIONS =
MULTILIB_EXCLUSIONS = !m32/msoft-float
MULTILIB_OSDIRNAMES = ../lib32
#MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
#rs6000/t-freebsd64
# Copyright (C) 2011, Free Software Foundation, Inc.
#
# This file is part of GCC.
#
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
# On FreeBSD the 32-bit libraries are found under /usr/lib32.
# Set MULTILIB_OSDIRNAMES according to this.
MULTILIB_OPTIONS = m32 msoft-float
MULTILIB_DIRNAMES = 32 nof
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
MULTILIB_EXCEPTIONS =
MULTILIB_EXCLUSIONS = !m32/msoft-float
MULTILIB_OSDIRNAMES = ../lib32
softfp_wrap_start := '\#ifndef __powerpc64__'
softfp_wrap_end := '\#endif'
......@@ -26377,7 +26377,15 @@ $as_echo "#define HAVE_LD_AS_NEEDED 1" >>confdefs.h
fi
case "$target:$tm_file" in
powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
case "$target" in
*-*-linux*)
emul_name="-melf64ppc"
;;
*-*-freebsd*)
emul_name="-melf64ppc_fbsd"
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5
$as_echo_n "checking linker support for omitting dot symbols... " >&6; }
if test "${gcc_cv_ld_no_dot_syms+set}" = set; then :
......@@ -26407,7 +26415,7 @@ foo:
EOF
if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
&& $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
&& $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
&& $gcc_cv_ld $emul_name -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
gcc_cv_ld_no_dot_syms=yes
fi
rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
......@@ -26444,7 +26452,7 @@ _start:
ld 9,ie0@got@tprel@l(9)
EOF
if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \
&& $gcc_cv_ld -melf64ppc --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then
&& $gcc_cv_ld $emul_name --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then
gcc_cv_ld_large_toc=yes
fi
rm -f conftest conftest.o conftest.s
......
......@@ -4356,7 +4356,15 @@ if test x"$gcc_cv_ld_as_needed" = xyes; then
fi
case "$target:$tm_file" in
powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
case "$target" in
*-*-linux*)
emul_name="-melf64ppc"
;;
*-*-freebsd*)
emul_name="-melf64ppc_fbsd"
;;
esac
AC_CACHE_CHECK(linker support for omitting dot symbols,
gcc_cv_ld_no_dot_syms,
[gcc_cv_ld_no_dot_syms=no
......@@ -4383,7 +4391,7 @@ foo:
EOF
if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
&& $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
&& $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
&& $gcc_cv_ld $emul_name -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
gcc_cv_ld_no_dot_syms=yes
fi
rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
......@@ -4413,7 +4421,7 @@ _start:
ld 9,ie0@got@tprel@l(9)
EOF
if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \
&& $gcc_cv_ld -melf64ppc --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then
&& $gcc_cv_ld $emul_name --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then
gcc_cv_ld_large_toc=yes
fi
rm -f conftest conftest.o conftest.s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment