Commit 3328a3b7 by Thomas Schwinge Committed by Thomas Schwinge

re PR target/28102 (GNU Hurd bootstrap error: 'OPTION_GLIBC' undeclared)

2008-11-13  Thomas Schwinge  <tschwinge@gnu.org>

	PR target/28102
	* config.gcc (*-*-gnu*): Move Alpha parts into the `alpha*-*-gnu*', x86
	parts into the `i[34567]86-*-linux*' and parts that are independent of
	the processor architecture into the `*-*-linux*' cases.
	(*-*-linux*): Consider `linux.opt' only for Linux-based configurations.
	* config/i386/gnu.h (GLIBC_DYNAMIC_LINKER): Redefine.
	(TARGET_OS_CPP_BUILTINS, LINK_SPEC): Don't redefine.
	[TARGET_LIBC_PROVIDES_SSP] (TARGET_THREAD_SSP_OFFSET): Undefine.
	* config/gnu.h (NO_IMPLICIT_EXTERN_C): Don't redefine.
	(HURD_TARGET_OS_CPP_BUILTINS): Don't define, but instead...
	(LINUX_TARGET_OS_CPP_BUILTINS): Redefine.

From-SVN: r141838
parent ab70111b
2008-11-13 Thomas Schwinge <tschwinge@gnu.org>
PR target/28102
* config.gcc (*-*-gnu*): Move Alpha parts into the `alpha*-*-gnu*', x86
parts into the `i[34567]86-*-linux*' and parts that are independent of
the processor architecture into the `*-*-linux*' cases.
(*-*-linux*): Consider `linux.opt' only for Linux-based configurations.
* config/i386/gnu.h (GLIBC_DYNAMIC_LINKER): Redefine.
(TARGET_OS_CPP_BUILTINS, LINK_SPEC): Don't redefine.
[TARGET_LIBC_PROVIDES_SSP] (TARGET_THREAD_SSP_OFFSET): Undefine.
* config/gnu.h (NO_IMPLICIT_EXTERN_C): Don't redefine.
(HURD_TARGET_OS_CPP_BUILTINS): Don't define, but instead...
(LINUX_TARGET_OS_CPP_BUILTINS): Redefine.
2008-11-13 Ruan Beihong <ruanbeihong@gmail.com>
* config/mips/loongson.md (<u>div<mode>3, <u>mod<mode>3): New patterns.
......
......@@ -480,16 +480,28 @@ case ${target} in
esac
fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
;;
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
# Must come before *-*-gnu* (because of *-*-linux-gnu* systems).
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
extra_options="${extra_options} linux.opt"
gas=yes
gnu_ld=yes
case ${enable_threads} in
"" | yes | posix) thread_file='posix' ;;
esac
tmake_file="t-slibgcc-elf-ver t-linux"
case $target in
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
:;;
*-*-gnu*)
tmake_file="$tmake_file t-gnu";;
esac
# glibc / uclibc switch. uclibc isn't usable for GNU/Hurd and neither for
# GNU/k*BSD.
case $target in
*linux*)
extra_options="$extra_options linux.opt";;
*)
tm_defines="$tm_defines OPTION_GLIBC=1";;
esac
case ${target} in
*-*-*uclibc*)
tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
......@@ -502,30 +514,6 @@ case ${target} in
default_use_cxa_atexit=yes
use_gcc_tgmath=no
;;
*-*-gnu*)
# On the Hurd, the setup is just about the same on
# each different CPU. The specific machines that we
# support are matched above and just set $cpu_type.
tm_file="${cpu_type}/gnu.h"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
# GNU tools are the only tools.
gas=yes
gnu_ld=yes
# These details are the same as for Linux.
# But here we need a little extra magic.
tmake_file="t-slibgcc-elf-ver t-linux t-gnu"
case ${target} in
alpha*)
tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
;;
i[34567]86-*-*)
tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
;;
esac
# Assume that glibc is being used and so __cxa_atexit is provided.
default_use_cxa_atexit=yes
use_gcc_tgmath=no
;;
*-*-netbsd*)
tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
gas=yes
......@@ -618,6 +606,7 @@ alpha*-*-linux*)
tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
;;
alpha*-*-gnu*)
tm_file="$tm_file alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h alpha/gnu.h"
target_cpu_default="MASK_GAS"
tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
;;
......@@ -1085,7 +1074,7 @@ i[34567]86-*-openbsd*)
i[34567]86-*-coff*)
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
;;
i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*)
# Intel 80386's running GNU/*
# with ELF format using glibc 2
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h"
......@@ -1116,6 +1105,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
;;
i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
i[34567]86-*-gnu*) tm_file="$tm_file i386/linux.h gnu.h i386/gnu.h";;
esac
tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
;;
......@@ -1128,8 +1118,6 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
esac
tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
;;
i[34567]86-*-gnu*)
;;
i[34567]86-pc-msdosdjgpp*)
xm_file=i386/xm-djgpp.h
tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
......
......@@ -32,10 +32,8 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
#undef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR "/include"
/* The system headers under GNU are C++-aware. */
#define NO_IMPLICIT_EXTERN_C
#define HURD_TARGET_OS_CPP_BUILTINS() \
#undef LINUX_TARGET_OS_CPP_BUILTINS
#define LINUX_TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define ("__gnu_hurd__"); \
builtin_define ("__GNU__"); \
......
......@@ -20,31 +20,18 @@ You should have received a copy of the GNU General Public License
along with GCC. If not, see <http://www.gnu.org/licenses/>.
*/
#undef GLIBC_DYNAMIC_LINKER
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so"
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386 GNU)");
#undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
HURD_TARGET_OS_CPP_BUILTINS(); \
} \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "%{pthread:-D_REENTRANT} %{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
#undef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu)"
#undef LINK_SPEC
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
%{static:-static}}"
#undef STARTFILE_SPEC
#if defined HAVE_LD_PIE
#define STARTFILE_SPEC \
......@@ -62,3 +49,8 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
/* FIXME: Is a Hurd-specific fallback mechanism necessary? */
#undef MD_UNWIND_SUPPORT
#ifdef TARGET_LIBC_PROVIDES_SSP
/* Not supported yet. */
#undef TARGET_THREAD_SSP_OFFSET
#endif
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