Commit 630d52ca authored by ro's avatar ro
Browse files

Move gthr to toplevel libgcc

	gcc:
	* gthr-single.h, gthr.h: Move to ../libgcc.
	* gthr-aix.h: Move to ../libgcc/config/rs6000.
	* gthr-dce.h: Move to ../libgcc/config/pa.
	* gthr-lynx.h: Move to ../libgcc/config.
	* gthr-mipssde.h: Move to ../libgcc/config/mips.
	* gthr-posix.h: Move to ../libgcc/config.
	* gthr-rtems.h: Likewise.
	* gthr-tpf.h: Move to ../libgcc/config/s390.
	* gthr-vxworks.h: Move to ../libgcc/config.
	* gthr-win32.h: Move to ../libgcc/config/i386.
	* configure.ac (gthread_flags): Remove
	(gthr-default.h): Don't create.
	(thread_file): Don't substitute.
	* configure: Regenerate.
	* Makefile.in (GCC_THREAD_FILE): Remove.
	(GTHREAD_FLAGS): Remove.
	(libgcc.mvars): Remove GTHREAD_FLAGS.
	* config/t-vxworks (EXTRA_HEADERS): Remove.

	gcc/po:
	* EXCLUDES (gthr-aix.h, gthr-dce.h, gthr-posix.c, gthr-posix.h)
	(gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h)
	(gthr-win32.h, gthr.h): Remove.

	libgcc:
	* gthr-single.h, gthr.h: New files.
	* config/gthr-lynx.h, config/gthr-posix.h., config/gthr-rtems.h,
	config/gthr-vxworks.h, config/i386/gthr-win32.h,
	config/mips/gthr-mipssde.h, config/pa/gthr-dce.h,
	config/rs6000/gthr-aix.h, config/s390/gthr-tpf.h: New files.
	* config/i386/gthr-win32.c: Include "gthr-win32.h".
	* configure.ac (thread_header): New variable.
	Set it depending on target_thread_file.
	(gthr-default.h): Link from $thread_header.
	* configure: Regenerate.
	* Makefile.in (LIBGCC2_CFLAGS): Remove $(GTHREAD_FLAGS).

	libgfortran:
	* Makefile.am (AM_CPPFLAGS): Add
	-I$(srcdir)/$(MULTISRCTOP)../libgcc, -I$(MULTIBUILDTOP)../libgcc.
	* Makefile.in: Regenerate.
	* acinclude.m4 (LIBGFOR_CHECK_GTHR_DEFAULT): Remove.
	* configure.ac (LIBGFOR_CHECK_GTHR_DEFAULT): Likewise.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	libobjc:
	* Makefile.in (INCLUDES): Add -I$(MULTIBUILDTOP)../libgcc.
	* configure.ac (target_thread_file, HAVE_GTHR_DEFAULT): Remove.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	libstdc++-v3:
	* acinclude.m4 (GLIBCXX_CONFIGURE): Determine and substitute
	toplevel_builddir.
	(GLIBCXX_ENABLE_THREADS): Remove glibcxx_thread_h,
	HAVE_GTHR_DEFAULT, enable_thread.
	(GLIBCXX_CHECK_GTHREADS): Reflect gthr move to libgcc.
	* include/Makefile.am (thread_host_headers): Remove
	${host_builddir}/gthr-tpf.h.
	(${host_builddir}/gthr.h): Reflect gthr move to libgcc.
	Use $<.
	(${host_builddir}/gthr-single.h): Likewise.
	(${host_builddir}/gthr-posix.h): Likewise.
	(${host_builddir}/gthr-tpf.h): Remove.
	(${host_builddir}/gthr-default.h): Likewise.
	* configure, config.h.in: Regenerate.
	* Makefile.in, doc/Makefile.in, include/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
	src/Makefile.intestsuite/Makefile.in: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180776 138bc75d-0d04-0410-961f-82ee72b054a4
parent 022a2799
2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gthr-single.h, gthr.h: Move to ../libgcc.
* gthr-aix.h: Move to ../libgcc/config/rs6000.
* gthr-dce.h: Move to ../libgcc/config/pa.
* gthr-lynx.h: Move to ../libgcc/config.
* gthr-mipssde.h: Move to ../libgcc/config/mips.
* gthr-posix.h: Move to ../libgcc/config.
* gthr-rtems.h: Likewise.
* gthr-tpf.h: Move to ../libgcc/config/s390.
* gthr-vxworks.h: Move to ../libgcc/config.
* gthr-win32.h: Move to ../libgcc/config/i386.
* configure.ac (gthread_flags): Remove
(gthr-default.h): Don't create.
(thread_file): Don't substitute.
* configure: Regenerate.
* Makefile.in (GCC_THREAD_FILE): Remove.
(GTHREAD_FLAGS): Remove.
(libgcc.mvars): Remove GTHREAD_FLAGS.
* config/t-vxworks (EXTRA_HEADERS): Remove.
2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Paolo Bonzini <bonzini@gnu.org>
 
......@@ -532,9 +532,7 @@ lang_opt_files=@lang_opt_files@ $(srcdir)/c-family/c.opt $(srcdir)/common.opt
lang_specs_files=@lang_specs_files@
lang_tree_files=@lang_tree_files@
target_cpu_default=@target_cpu_default@
GCC_THREAD_FILE=@thread_file@
OBJC_BOEHM_GC=@objc_boehm_gc@
GTHREAD_FLAGS=@gthread_flags@
extra_modes_file=@extra_modes_file@
extra_opt_files=@extra_opt_files@
host_hook_obj=@out_host_hook_obj@
......@@ -1808,7 +1806,6 @@ libgcc-support: libgcc.mvars stmp-int-hdrs $(TCONFIG_H) \
libgcc.mvars: config.status Makefile specs xgcc$(exeext)
: > tmp-libgcc.mvars
echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars
echo GTHREAD_FLAGS = '$(GTHREAD_FLAGS)' >> tmp-libgcc.mvars
echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars
echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
......
......@@ -17,10 +17,6 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# Some runtime modules need these. Can't set extra_headers in config.gcc
# because the paths are always made absolute to the cpu config dir.
EXTRA_HEADERS += $(srcdir)/gthr-vxworks.h gthr-default.h
# Both the kernel and RTP headers provide limits.h.
LIMITS_H_TEST = true
......
......@@ -621,7 +621,6 @@ tm_p_file_list
tm_defines
tm_include_list
tm_file_list
thread_file
common_out_object_file
common_out_file
out_object_file
......@@ -724,7 +723,6 @@ LIBINTL
USE_NLS
extra_opt_files
extra_modes_file
gthread_flags
NATIVE_SYSTEM_HEADER_DIR
objext
manext
......@@ -11353,19 +11351,6 @@ if test x${thread_file} = x; then
thread_file=${target_thread_file}
fi
 
# Make gthr-default.h if we have a thread file.
gthread_flags=
if test $thread_file != single; then
echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
rm -f gthr-default.h-t
else
mv -f gthr-default.h-t gthr-default.h
fi
gthread_flags=-DHAVE_GTHR_DEFAULT
fi
# --------
# UNSORTED
# --------
......@@ -18059,7 +18044,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 18062 "configure"
#line 18047 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -18165,7 +18150,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 18168 "configure"
#line 18153 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -27005,7 +26990,6 @@ fi
 
 
 
 
 
# Echo link setup.
......
......@@ -1416,19 +1416,6 @@ if test x${thread_file} = x; then
thread_file=${target_thread_file}
fi
# Make gthr-default.h if we have a thread file.
gthread_flags=
if test $thread_file != single; then
echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
rm -f gthr-default.h-t
else
mv -f gthr-default.h-t gthr-default.h
fi
gthread_flags=-DHAVE_GTHR_DEFAULT
fi
AC_SUBST(gthread_flags)
# --------
# UNSORTED
# --------
......@@ -4961,7 +4948,6 @@ AC_SUBST(out_file)
AC_SUBST(out_object_file)
AC_SUBST(common_out_file)
AC_SUBST(common_out_object_file)
AC_SUBST(thread_file)
AC_SUBST(tm_file_list)
AC_SUBST(tm_include_list)
AC_SUBST(tm_defines)
......
2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* EXCLUDES (gthr-aix.h, gthr-dce.h, gthr-posix.c, gthr-posix.h)
(gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h)
(gthr-win32.h, gthr.h): Remove.
2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* EXCLUDES (config/vxlib.c, gbl-ctors.h, libgcc2.c, libgcc2.h)
......
......@@ -24,16 +24,6 @@
# These files are part of libgcc, or target headers provided by gcc.
gcov-io.h
gcov-iov.c
gthr-aix.h
gthr-dce.h
gthr-posix.c
gthr-posix.h
gthr-rtems.h
gthr-single.h
gthr-solaris.h
gthr-vxworks.h
gthr-win32.h
gthr.h
limitx.h
limity.h
......
2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gthr-single.h, gthr.h: New files.
* config/gthr-lynx.h, config/gthr-posix.h., config/gthr-rtems.h,
config/gthr-vxworks.h, config/i386/gthr-win32.h,
config/mips/gthr-mipssde.h, config/pa/gthr-dce.h,
config/rs6000/gthr-aix.h, config/s390/gthr-tpf.h: New files.
* config/i386/gthr-win32.c: Include "gthr-win32.h".
* configure.ac (thread_header): New variable.
Set it depending on target_thread_file.
(gthr-default.h): Link from $thread_header.
* configure: Regenerate.
* Makefile.in (LIBGCC2_CFLAGS): Remove $(GTHREAD_FLAGS).
2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (tm_file_): New variable.
......
......@@ -223,8 +223,7 @@ endif
#
LIBGCC2_DEBUG_CFLAGS = -g
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
$(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \
-DIN_LIBGCC2 \
$(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
-fbuilding-libgcc -fno-stack-protector \
$(INHIBIT_LIBC_CFLAGS)
......
/* Threads compatibility routines for libgcc2 and libobjc for
LynxOS. */
/* Compile this one with gcc. */
/* Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 2004, 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -52,7 +52,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef GTHREAD_USE_WEAK
#define GTHREAD_USE_WEAK 0
#include "gthr-posix.h"
#include "config/gthr-posix.h"
#else
#include "gthr-single.h"
......
File moved
File moved
/* Threads compatibility routines for libgcc2 and libobjc for VxWorks. */
/* Compile this one with gcc. */
/* Copyright (C) 1997, 1999, 2000, 2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 1997, 1999, 2000, 2008, 2009, 2011
Free Software Foundation, Inc.
Contributed by Mike Stump <mrs@wrs.com>.
This file is part of GCC.
......@@ -30,7 +31,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifdef _LIBOBJC
/* libobjc requires the optional pthreads component. */
#include "gthr-posix.h"
#include "config/gthr-posix.h"
#else
#ifdef __cplusplus
......
/* Implementation of W32-specific threads compatibility routines for
libgcc2. */
/* Copyright (C) 1999, 2000, 2002, 2004, 2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 1999, 2000, 2002, 2004, 2008, 2009, 2011
Free Software Foundation, Inc.
Contributed by Mumit Khan <khan@xraylith.wisc.edu>.
Modified and moved to separate file by Danny Smith
<dannysmith@users.sourceforge.net>.
......@@ -33,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#endif
#undef __GTHREAD_I486_INLINE_LOCK_PRIMITIVES
#define __GTHREAD_I486_INLINE_LOCK_PRIMITIVES
#include <gthr-win32.h>
#include "gthr-win32.h"
/* Windows32 threads specific definitions. The windows32 threading model
does not map well into pthread-inspired gcc's threading model, and so
......
File moved
File moved
File moved
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 2000, 2009 Free Software Foundation, Inc.
/* Copyright (C) 2000, 2009, 2011 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -27,7 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define GCC_GTHR_AIX_H
#ifdef _THREAD_SAFE
#include "gthr-posix.h"
#include "config/gthr-posix.h"
#else
#include "gthr-single.h"
#endif
......
File moved
......@@ -2273,7 +2273,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
# FIXME: Do we need something for CFLAGS below?
case "${host}" in
# PIC is the default on some targets or must not be used.
......@@ -2288,24 +2288,23 @@ case "${host}" in
hppa*64*-*-hpux*)
# PIC is the default for 64-bit PA HP-UX.
;;
i3456786-*-cygwin* | i3456786-*-mingw* | x86_64-*-mingw*)
i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i3456786-*-interix3*)
i[34567]86-*-interix3*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
i3456786-*-nto-qnx*)
i[34567]86-*-nto-qnx*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
# it will coredump.
PICFLAG='-fPIC -shared'
;;
i3456786-pc-msdosdjgpp*)
i[34567]86-pc-msdosdjgpp*)
# DJGPP does not support shared libraries at all.
;;
ia64*-*-hpux*)
# On IA64 HP-UX, PIC is the default but the pic flag
# sets the default TLS model and affects inlining.
# FIXME: Still in gcc 4.7?
PICFLAG=-fPIC
;;
mips-sgi-irix6*)
......@@ -2317,7 +2316,7 @@ case "${host}" in
# Some targets support both -fPIC and -fpic, but prefer the latter.
# FIXME: Why?
i3456786-*-* | x86_64-*-*)
i[34567]86-*-* | x86_64-*-*)
PICFLAG=-fpic
;;
m68k-*-*)
......@@ -2327,7 +2326,7 @@ case "${host}" in
PICFLAG=-fpic
;;
# FIXME: Override -fPIC default in libgcc only?
sh-*-linux* | sh2346lbe*-*-linux*)
sh-*-linux* | sh[2346lbe]*-*-linux*)
PICFLAG=-fpic
;;
# FIXME: Simplify to sh*-*-netbsd*?
......@@ -2335,22 +2334,22 @@ case "${host}" in
sh64-*-netbsd* | sh64l*-*-netbsd*)
PICFLAG=-fpic
;;
sparc*-*-*)
# FIXME: This could be done everywhere -fpic and -fPIC differ.
case "${CFLAGS}" in
*-fpic*)
PICFLAG=-fpic
;;
*)
PICFLAG=-fPIC
;;
esac ;;
# Default to -fPIC unless specified otherwise.
*)
PICFLAG=-fPIC
;;
esac
# If the user explicitly uses -fpic/-fPIC, keep that.
case "${CFLAGS}" in
*-fpic*)
PICFLAG=-fpic
;;
*-fPIC*)
PICFLAG=-fPIC
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-version-specific-runtime-libs" >&5
......@@ -4797,6 +4796,20 @@ tm_file="${tm_file_}"
# Map from thread model to thread header.
case $target_thread_file in
aix) thread_header=config/rs6000/gthr-aix.h ;;
dce) thread_header=config/pa/gthr-dce.h ;;
lynx) thread_header=config/gthr-lynx.h ;;
mipssde) thread_header=config/mips/gthr-mipssde.h ;;
posix) thread_header=config/gthr-posix.h ;;
rtems) thread_header=config/gthr-rtems.h ;;
single) thread_header=gthr-single.h ;;
tpf) thread_header=config/s390/gthr-tpf.h ;;
vxworks) thread_header=config/gthr-vxworks.h ;;
win32) thread_header=config/i386/gthr-win32.h ;;
esac
# Substitute configuration variables
......@@ -4809,6 +4822,8 @@ ac_config_links="$ac_config_links md-unwind-support.h:config/$md_unwind_header"
ac_config_links="$ac_config_links sfp-machine.h:config/$sfp_machine_header"
ac_config_links="$ac_config_links gthr-default.h:$thread_header"
# We need multilib support.
ac_config_files="$ac_config_files Makefile"
......@@ -5538,6 +5553,7 @@ do
"unwind.h") CONFIG_LINKS="$CONFIG_LINKS unwind.h:$unwind_header" ;;
"md-unwind-support.h") CONFIG_LINKS="$CONFIG_LINKS md-unwind-support.h:config/$md_unwind_header" ;;
"sfp-machine.h") CONFIG_LINKS="$CONFIG_LINKS sfp-machine.h:config/$sfp_machine_header" ;;
"gthr-default.h") CONFIG_LINKS="$CONFIG_LINKS gthr-default.h:$thread_header" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
......
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