Commit Graph

104 Commits

Author SHA1 Message Date
Nobody f3201d7ce6 libgcc, libatomic, libquadmath with MCST patches 2022-08-11 23:05:21 +03:00
Martin Liska 46928a8fda Introduce gcov.h header file (PR gcov-profile/80435).
2017-04-19  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/80435
	* Makefile.in: Install gcov.h.
	* gcov.h: New file.
	* libgcov.h: Use the header and make __gcov_flush publicly
	visible.

From-SVN: r246990
2017-04-19 08:08:44 +00:00
Jeff Law 29d8aae6bd Makefile.in: Swap definition of LIBGCC_LINKS and inclusion of target makefile fragment.
* Makefile.in: Swap definition of LIBGCC_LINKS and inclusion of
	target makefile fragment.
	* config/sh/t-sh (unwind-dw2-Os-4-200.o): Depend on LIBGCC_LINKS.

From-SVN: r246766
2017-04-07 10:11:57 -06:00
Jakub Jelinek 3c36aa6ba2 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
	* configure: Regenerated.
config/
	* acx.m4 (GCC_BASE_VER): New m4 function.
	(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
	--with-gcc-major-version-only use just major number from BASE-VER.
gcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
	(gcc.o): Depend on $(BASEVER).
	* common.opt (dumpfullversion): New option.
	* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
	* doc/invoke.texi: Document -dumpfullversion.
	* doc/install.texi: Document --with-gcc-major-version-only.
	* configure: Regenerated.
libatomic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgomp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
libssp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
liboffloadmic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libquadmath/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libmpx/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libada/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
lto-plugin/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libitm/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
fixincludes/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libcilkrts/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libcc1/
	* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
	use just major number from BASE-VER.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libobjc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libstdc++-v3/
	* configure.ac: Add GCC_BASE_VER.
	* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* po/Makefile.in: Regenerated.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* doc/Makefile.in: Regenerated.
	* python/Makefile.in: Regenerated.
	* src/c++11/Makefile.in: Regenerated.
	* src/c++98/Makefile.in: Regenerated.
	* src/filesystem/Makefile.in: Regenerated.
libvtv/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libsanitizer/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* libbacktrace/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* ubsan/Makefile.in: Regenerated.
	* configure: Regenerated.
	* sanitizer_common/Makefile.in: Regenerated.
	* lsan/Makefile.in: Regenerated.
	* Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.
libgfortran/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r244521
2017-01-17 10:38:48 +01:00
Alan Modra 8f56cb5163 Update configure deps, remove stray \xA0 in picflag.m4, regenerate
Also fix a stray changelog entry.  Some of the regen here is due to
previous changes not being regenerated properly, in part due to the
missing configure dependencies.

	* configure: Regenerate.
config/
	* picflag.m4: Remove stray \xA0 in comment.
gcc/
	* Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
	* configure: Regenerate.
	* config.in: Regenerate.
libada/
	* Makefile.in (configure_deps): Update and order as per
	configure.ac sinclude.
	* configure: Regenerate.
libgcc/
	* Makefile.in (configure_deps): Update.
	* configure: Regenerate.
libiberty/
	* Makefile.in (configure_deps): Update.
	* configure: Regenerate.
libitm/
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r244049
2017-01-04 18:59:34 +10:30
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Uros Bizjak 183624479f Makefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.
* Makefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.
	* libgcc2.c (__divmoddi4): New function.
	* libgcc2.h (__divmoddi4): Declare.
	* libgcc-std.ver.in (GCC_7.0.0): New. Add __PFX_divmoddi4
	and __PFX_divmodti4.

From-SVN: r241804
2016-11-02 23:23:13 +01:00
Martin Liska 56b653f1a3 Remove __gcov_merge_delta (PR bootstrap/77749)
PR bootstrap/77749
	* gcov-counter.def: Remove GCOV_COUNTER_V_DELTA.
	PR bootstrap/77749
	* Makefile.in: Remove _gcov_merge_delta.
	* libgcov-merge.c (void __gcov_merge_delta): Remove.
	* libgcov-util.c (__gcov_delta_counter_op): Remove.
	* libgcov.h: Remove declaration of __gcov_merge_delta.

From-SVN: r240524
2016-09-27 10:04:39 +00:00
Eric Botcazou 7e02fd1b7b configure.ac: Do not create links, only substitute the filenames.
* configure.ac: Do not create links, only substitute the filenames.
	* configure: Regenerate.
	* Makefile.in: Assign the substitution results to variables.
	(LIBGCC_LINKS): Define.
	(enable-execute-stack.c): New rule.
	(unwind.h): Likewise.
	(md-unwind-support.h): Likewise.
	(sfp-machine.h): Likewise.
	(gthr-default.h): Likewise.
	Add $(LIBGCC_LINKS) to the prerequisites of all object files and
	unwind.h as prerequisite of install-unwind_h-forbuild.

From-SVN: r240312
2016-09-21 12:53:20 +00:00
James Greenhalgh 0abcd6cc73 [Patch libgcc] Enable HCmode multiply and divide (mulhc3/divhc3)
This patch arranges for half-precision complex multiply and divide
routines to be built if __LIBGCC_HAS_HF_MODE__.  This will be true
if the target supports the _Float16 type.

libgcc/

	PR target/63250
	*  Makefile.in (lib2funcs): Build _mulhc3 and _divhc3.
	* libgcc2.h (LIBGCC_HAS_HF_MODE): Conditionally define.
	(HFtype): Likewise.
	(HCtype): Likewise.
	(__divhc3): Likewise.
	(__mulhc3): Likewise.
	* libgcc2.c: Support _mulhc3 and _divhc3.

From-SVN: r240043
2016-09-09 09:40:22 +00:00
Martin Liska a266236e85 Add new *_atomic counter update function
PR gcov-profile/58306
	* Makefile.in: New functions (modules) are added.
	* libgcov-profiler.c (__gcov_interval_profiler_atomic): New
	function.
	(__gcov_pow2_profiler_atomic): New function.
	(__gcov_one_value_profiler_body): New argument is instroduced.
	(__gcov_one_value_profiler): Call with the new argument.
	(__gcov_one_value_profiler_atomic): Likewise.
	(__gcov_indirect_call_profiler_v2): Likewise.
	(__gcov_time_profiler_atomic): New function.
	(__gcov_average_profiler_atomic): Likewise.
	(__gcov_ior_profiler_atomic): Likewise.
	* libgcov.h: Declare the aforementioned functions.
	PR gcov-profile/58306
	* gcc.dg/tree-prof/val-profiler-threads-1.c: New test.
	PR gcov-profile/58306
	* tree-profile.c (gimple_init_edge_profiler): Create conditionally
	atomic variants of profile update functions.

From-SVN: r239324
2016-08-10 13:14:56 +00:00
Martin Liska 6dce6418c5 Remove __gcov_indirect_call_profiler
* Makefile.in: Remove __gcov_indirect_call_profiler.
	* libgcov-profiler.c (__gcov_indirect_call_profiler): Remove
	function.
	* libgcov.h: And the declaration of the function.

From-SVN: r239306
2016-08-09 21:01:19 +00:00
Ilya Verbin e6861a99f8 re PR driver/68463 (Offloading fails when some objects are compiled with LTO and some without)
gcc/
	PR driver/68463
	* config/gnu-user.h (CRTOFFLOADBEGIN): Define.  Add crtoffloadbegin.o if
	offloading is enabled and -fopenacc or -fopenmp is specified.
	(CRTOFFLOADEND): Likewise.
	(GNU_USER_TARGET_STARTFILE_SPEC): Add CRTOFFLOADBEGIN.
	(GNU_USER_TARGET_ENDFILE_SPEC): Add CRTOFFLOADEND.
	* lto-wrapper.c (offloadbegin, offloadend): Remove static vars.
	(offload_objects_file_name): New static var.
	(tool_cleanup): Remove offload_objects_file_name file.
	(find_offloadbeginend): Replace with ...
	(find_crtoffloadtable): ... this.
	(run_gcc): Remove offload_argc and offload_argv.
	Get offload_objects_file_name from -foffload-objects=... option.
	Read names of object files with offload from this file, pass them to
	compile_images_for_offload_targets.  Don't call find_offloadbeginend and
	don't pass offloadbegin and offloadend to the linker.  Don't pass
	offload non-LTO files to the linker, because now they're not claimed.
libgcc/
	PR driver/68463
	* Makefile.in (crtoffloadtable$(objext)): New rule.
	* configure.ac (extra_parts): Add crtoffloadtable$(objext) if
	enable_offload_targets is not empty.
	* configure: Regenerate.
	* offloadstuff.c: Move __OFFLOAD_TABLE__ from crtoffloadend to
	crtoffloadtable.
libgomp/
	PR driver/68463
	* testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: Remove.
lto-plugin/
	PR driver/68463
	* lto-plugin.c (struct plugin_offload_file): New.
	(offload_files): Change type.
	(offload_files_last, offload_files_last_obj): New.
	(offload_files_last_lto): New.
	(free_2): Adjust accordingly.
	(all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
	Don't call free_1 for offload_files.  Write names of object files with
	offloading to the temporary file.  Add new option to lto_arg_ptr.
	(claim_file_handler): Don't claim file if it contains offload sections
	without LTO sections.  If it contains offload sections, add to the list.

From-SVN: r233712
2016-02-25 12:23:52 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Rainer Orth e5ef217c3e Port libvtv to Solaris
libstdc++-v3:
	* acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY) <solaris2*>: Use
	-Wl,-R in VTV_CXXLINKFLAGS.
	* configure: Regenerate.

	* testsuite/18_support/bad_exception/23591_thread-1.c: Use
	-fvtable-verify=none on Solaris 12+.

	libgcc:
	* Makefile.in (VTV_CFLAGS): New variable.
	(vtv_start$(objext), vtv_end$(objext), vtv_end$(objext))
	(vtv_start_preinit$(objext), vtv_end_preinit$(objext)): Use it.
	* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
	Add vtv_start.o, vtv_end.o, vtv_start_preinit.o, vtv_end_preinit.o
	to extra_parts if $enable_vtable_verify = yes.

	libvtv:
	* configure.tgt (*-*-solaris2.[1-9]*): Declare supported.
	* configure.ac: Call AC_USE_SYSTEM_EXTENSIONS.
	<*-*-solaris2*>: Check for init priority support.
	Check for getexecname, __fortify_fail, _obstack_begin.
	(VTV_NO_OBSTACK): New conditional.
	* configure: Regenerate.
	* Makefile.am [VTV_NO_OBSTACK] (obstack.c): Use new condition.
	Create empty config.h
	* Makefile.in: Regenerate.

	* vtv_rts.cc [HAVE_GETEXECNAME] (program_invocation_name): New
	variable.
	(read_section_offset_and_length) [HAVE_GETEXECNAME]: Set it.
	(dl_iterate_phdr_callback) [HAVE_GETEXECNAME]: Set it.

	(__fortify_fail): Wrap in HAVE___FORTIFY_FAIL
	[!HAVE___FORTIFY_FAIL]: Provide non-Cygwin implementation.

	(read_section_offset_and_length): Assert sh_size >= VTV_PAGE_SIZE.
	(iterate_modules): Fix typo.
	Use VTV_PAGE_SIZE.
	(dl_iterate_phdr_callback): Fix typo.
	Use VTV_PAGE_SIZE.
	(__VLTChangePermission): Fix typos.

	include:
	* vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ &&
	__sparc__]: Define.

	gcc:
	* config/sol2.h (SUPPORTS_INIT_PRIORITY): Move up.
	(STARTFILE_VTV_SPEC, ENDFILE_VTV_SPEC): Define.
	(STARTFILE_SPEC): Use %(startfile_vtv).
	(ENDFILE_SPEC): Use %(endfile_vtv).
	(SUBTARGET_EXTRA_SPECS): Handle STARTFILE_VTV_SPEC,
	ENDFILE_VTV_SPEC.

	* gcc.c (LINK_COMMAND_SPEC): Move VTABLE_VERIFICATION_SPEC after %{L*}.

From-SVN: r230865
2015-11-25 10:30:25 +00:00
H.J. Lu 428b381275 Add --enable-default-pie option to GCC configure
Add --enable-default-pie option to configure GCC to generate PIE by
default.

gcc/

	* Makefile.in (COMPILER): Add @NO_PIE_CFLAGS@.
	(BUILD_CFLAGS): Likewise.
	(BUILD_CXXFLAGS): Likewise.
	(LINKER): Add @NO_PIE_FLAG@.
	(BUILD_LDFLAGS): Likewise.
	(libgcc.mvars): Set NO_PIE_CFLAGS to -fno-PIE for
	--enable-default-pie.
	* common.opt (fPIE): Initialize to -1.
	(fpie): Likewise.
	(no-pie): New option.
	(pie): Replace "Negative(shared)" with "Negative(no-pie)".
	* configure.ac: Add --enable-default-pie.
	(NO_PIE_CFLAGS): New.  Check if -fno-PIE works.  AC_SUBST.
	(NO_PIE_FLAG): New.  Check if -no-pie works.  AC_SUBST.
	* defaults.h (DEFAULT_FLAG_PIE): New.  Default PIE to -fPIE.
	* gcc.c (NO_PIE_SPEC): New.
	(PIE_SPEC): Likewise.
	(NO_FPIE1_SPEC): Likewise.
	(FPIE1_SPEC): Likewise.
	(NO_FPIE2_SPEC): Likewise.
	(FPIE2_SPEC): Likewise.
	(NO_FPIE2_SPEC): Likewise.
	(FPIE_SPEC): Likewise.
	(NO_FPIE_SPEC): Likewise.
	(NO_FPIC1_SPEC): Likewise.
	(FPIC1_SPEC): Likewise.
	(NO_FPIC2_SPEC): Likewise.
	(FPIC2_SPEC): Likewise.
	(NO_FPIC2_SPEC): Likewise.
	(FPIC_SPEC): Likewise.
	(NO_FPIC_SPEC): Likewise.
	(NO_FPIE1_AND_FPIC1_SPEC): Likewise.
	(FPIE1_OR_FPIC1_SPEC): Likewise.
	(NO_FPIE2_AND_FPIC2_SPEC): Likewise.
	(FPIE2_OR_FPIC2_SPEC): Likewise.
	(NO_FPIE_AND_FPIC_SPEC): Likewise.
	(FPIE_OR_FPIC_SPEC): Likewise.
	(LD_PIE_SPEC): Likewise.
	(LINK_PIE_SPEC): Handle -no-pie.  Use PIE_SPEC and LD_PIE_SPEC.
	* opts.c (finish_options): Update opts->x_flag_pie if it is -1.
	* config/darwin.h (PIE_SPEC): Renamed to ...
	(DARWIN_PIE_SPEC): This.
	(LINK_SPEC): Replace PIE_SPEC with DARWIN_PIE_SPEC.
	* config/darwin9.h (PIE_SPEC): Renamed to ...
	(DARWIN_PIE_SPEC): This.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
	PIE_SPEC and NO_PIE_SPEC if HAVE_LD_PIE is defined.
	* config/openbsd.h (ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and
	FPIE2_OR_FPIC2_SPEC.
	* config/m68k/netbsd-elf.h (ASM_SPEC): Likewise.
	* config/m68k/openbsd.h (ASM_SPEC): Likewise.
	* gcc/config/sol2.h (ASM_PIC_SPEC): Likewise.
	* config/arm/freebsd.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/arm/semi.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise.
	* config/m32r/m32r.h (ASM_SPEC): Likewise.
	* config/m68k/uclinux.h (DRIVER_SELF_SPECS): Likewise.
	* config/rs6000/linux64.h (ASM_SPEC32): Likewise.
	* config/rs6000/sysv4.h (ASM_SPEC): Likewise.
	* config/sparc/freebsd.h (ASM_SPEC): Likewise.
	* config/sparc/linux.h (ASM_SPEC): Likewise.
	* config/sparc/linux64.h (ASM_SPEC): Likewise.
	* config/sparc/netbsd-elf.h (ASM_SPEC): Likewise.
	* config/sparc/openbsd64.h (ASM_SPEC): Likewise.
	* config/sparc/sp-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sp64-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sparc.h (ASM_SPEC): Likewise.
	* config/sparc/sysv4.h (ASM_SPEC): Likewise.
	* config/sparc/vxworks.h (ASM_SPEC): Likewise.
	* config/c6x/elf-common.h (ASM_SPEC): Use NO_FPIC2_SPEC,
	FPIC2_SPEC, FPIC1_SPEC and FPIC2_SPEC.
	* config/c6x/uclinux-elf.h (LINK_SPEC): Use FPIE_SPEC.
	* config/frv/frv.h (DRIVER_SELF_SPECS): Use FPIC_SPEC,
	NO_FPIC_SPEC and NO_FPIE1_AND_FPIC1_SPEC.
	(ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and FPIE2_OR_FPIC2_SPEC.
	* config/m68k/m68k.h (ASM_PCREL_SPEC): Use FPIC_SPEC and
	NO_FPIC_SPEC.
	* config/mips/gnu-user.h (NO_SHARED_SPECS): Use
	NO_FPIE_AND_FPIC_SPEC.
	* config/mips/vxworks.h (SUBTARGET_ASM_SPEC): Use FPIC_SPEC.
	* config/rs6000/freebsd64.h (ASM_SPEC32): Likewise.
	* config/rs6000/vxworks.h (ASM_SPEC): Likewise.
	* config/vax/linux.h (ASM_SPEC): Likewise.
	* doc/install.texi: Document --enable-default-pie.
	* doc/invoke.texi: Document -no-pie.
	* config.in: Regenerated.
	* configure: Likewise.

gcc/ada/

	* gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.

libgcc/

	* Makefile.in (CRTSTUFF_CFLAGS): Add $(NO_PIE_CFLAGS).

From-SVN: r223796
2015-05-27 19:36:55 -07:00
Eric Botcazou 515ae71b1c Makefile.in (LIBUNWIND): Move dependency for shared libgcc.
* Makefile.in (LIBUNWIND): Move dependency for shared libgcc.
	Remove useless endif/ifneq ($(enable_shared),yes) pair.

From-SVN: r223412
2015-05-19 19:02:55 +00:00
Bernd Schmidt d28ad5d4c5 Fix libgcc installation for offload targets.
* Makefile.in (real_host_noncanonical): New variable.
	(libsubdir): Use it.
	* configure.ac (real_host_noncanonical): Compute.  Remove special
	case for intelmicemul.
	* configure: Regenerate.

From-SVN: r222585
2015-04-29 16:52:45 +00:00
Caroline Tice f7f049fa46 Committing VTV Cygwin patch for Patrick Wollgast
* gcc/config/i386/cygwin.h (STARTFILE_SPEC): Add vtv_start.o,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw-w64.h (STARTFILE_SPEC): Likewise.
* gcc/config/i386/mingw32.h (STARTFILE_SPEC): Likewise.
* gcc/config/i386/cygwin.h (ENDFILE_SPEC): Add vtv_end.o,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw32.h (ENDFILE_SPEC): Likewise.
* gcc/config/i386/cygwin.h (LIB_SPEC): Pass -lvtv and -lpsapi,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw-w64.h (LIB_SPEC): Likewise.
* gcc/config/i386/mingw32.h (LIB_SPEC): Likewise.

* gcc/cp/vtable-class-hierarchy.c (vtv_generate_init_routine): Add
    check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.

* gcc/varasm.c (assemble_variable): Add code to properly set the comdat
    section and name for the .vtable_map_vars section in case the
    target is PE or COFF.


* libgcc/Makefile.in: Move rules to build vtv_*.o out of the check
    for CUSTOM_CRTSTUFF.
* libgcc/config.host (i[34567]86-*-cygwin*, x86_64-*-cygwin*, i[34567]86-*-mingw*)
    (x86_64-*-mingw*): Only add vtv_*.o to extra_parts if enable_vtable_verify.


* libstdc++-v3/acinclude.m4: Define VTV_CYGMIN.
* libstdc++-v3/configure: Regenerate.

* libstdc++-v3/libsupc++/Makefile.am: Add vtv_sources only to
    libsupc___la_SOURCES and libsupc__convenience_la_SOURCES if VTV_CYGMIN is
    not set.
* libstdc++-v3/libsupc++/Makefile.in: Regenerated.
* libstdc++-v3/libsupc++/vtv_stubs.cc: Add none weak declaration of every
    function for Cygwin and MinGW.

* libstdc++-v3/src/Makefile.am: Add libvtv.la to toolexeclib_LTLIBRARIES,
    if VTV_CYGMIN is set. Define libvtv_la_SOURCES, libvtv_la_LDFLAGS,
    libvtv_la_AM_CXXFLAGS and libvtv_la_LINK if VTV_CYGMIN is set.
* libstdc++-v3/src/Makefile.in: Regenerate.


* libvtv/Makefile.am : Add libvtv.la to toolexeclib_LTLIBRARIES, if VTV_CYGMIN
    is set. Define libvtv_la_LIBADD, libvtv_la_LDFLAGS, libvtv_stubs_la_LDFLAGS
    and libvtv_stubs_la_SOURCES if VTV_CYGMIN is set. Add obstac.c to
    libvtv_la_SOURCES if VTV_CYGMIN is set.
* libvtv/Makefile.in : Regenerate.
* libvtv/aclocal.m4 : Regenerate.
* libvtv/configure : Regenerate.
* libvtv/configure.ac : Add ACX_LT_HOST_FLAGS. Define VTV_CYGMIN.
* libvtv/configure.tgt : (x86_64-*-cygwin*, i?86-*-cygwin*, x86_64-*-mingw*)
    (i?86-*-mingw*): Add to supported targets.
* libvtv/vtv_fail.cc : Skip inclusion of execinfo.h on Cygwin and MinGW.
(log_error_message): Skip calls to backtrace and backtrace_symbols_fd on Cygwin
    and MinGW.
* libvtv/vtv_malloc.cc : Include windows.h and skip sys/mman.h inclusion on
    Cygwin and MinGW. Add sysconf port on Cygwin and MinGW.
(obstack_chunk_alloc): Exchange call to mmap with call to VirtualAlloc on Cygwin
    and MinGW.
(__vtv_malloc_init): Exchange call to sysconf with call to port of sysconf on
    Cygwin and MinGW.
* libvtv/vtv_malloc.h : Declare mprotect and define PROT_READ and PROT_WRITE on
    Cygwin and MinGW.
* libvtv/map.h : Include stdint.h on MinGW.
* libvtv/rts.cc : Include windows.h, winternl.h and psapi.h, skip include of
    execinfo.h, sys/mman.h and link.h on Cygwin and MinGW.
    Add port of __fortify_fail on Cygwin and MinGW.
    Change ElfW (Addr) to uintptr_t on Cygwin and MinGW.
(read_section_offset_and_length): Add port for Cygwin and MinGW
(iterate_modules): New function.
(vtv_unprotect_vtable_vars): Use iterate_modules instead of dl_iterate_phdr on
    Cygwin and MinGW.
(vtv_protect_vtable_vars): Likewise.
(count_all_pages): Likewise.
(dl_iterate_phdr_count_pages): Don't build on Cygwin and MinGW.
* libvtv/utils.cc : Include windows.h and skip execinfo.h inclusion on
    Cygwin and MinGW.
(__vtv_open_log): Exchange call to getuid and getpid with GetCurrentProcessId and
    adjust call to snprintf accordingly on Cygwin and MinGW.
    Adjust calls to mkdir on MinGW.
    Adjust call to open on Cygwin and MinGW.
(__vtv_add_to_log): Adjust call to snprintf on Cygwin and MinGW.
(__vtv_log_verification_failure): Don't generate a backtrace on Cygwin and MinGW.

From-SVN: r220232
2015-01-29 00:03:56 -08:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
David Edelsohn a06478dd6c Commit missing part of patch.
From-SVN: r218608
2014-12-10 16:14:36 -05:00
Bernd Schmidt 85c64bbee9 [PATCH 1/7] OpenMP 4.0 offloading infrastructure: configure and make
* configure: Regenerate.
	* configure.ac (--enable-as-accelerator-for)
	(--enable-offload-targets): New configure options.
gcc/
	* Makefile.in (real_target_noncanonical, accel_dir_suffix)
	(enable_as_accelerator): New variables substituted by configure.
	(libsubdir, libexecsubdir, unlibsubdir): Tweak for the possibility of
	being configured as an offload compiler.
	(DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and
	ACCEL_DIR_SUFFIX.
	(install-cpp, install-common, install_driver, install-gcc-ar): Do not
	install for the offload compiler.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (real_target_noncanonical, accel_dir_suffix)
	(enable_as_accelerator): Compute new variables.
	(ACCEL_COMPILER): Define if the compiler is built as the accel compiler.
	(OFFLOAD_TARGETS): List of target names suitable for offloading.
	(ENABLE_OFFLOADING): Define if list of offload targets is not empty.
gcc/cp/
	* Make-lang.in (c++.install-common): Do not install for the offload
	compiler.
gcc/doc/
	* install.texi (Options specification): Document
	--enable-as-accelerator-for and --enable-offload-targets.
gcc/fortran/
	* Make-lang.in (fortran.install-common): Do not install for the offload
	compiler.
libgcc/
	* Makefile.in (crtoffloadbegin$(objext)): New rule.
	(crtoffloadend$(objext)): Likewise.
	* configure: Regenerate.
	* configure.ac (accel_dir_suffix): Compute new variable.
	(extra_parts): Add crtoffloadbegin.o and crtoffloadend.o
	if enable_offload_targets is not empty.
	* offloadstuff.c: New file.
libgomp/
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Check for libdl, required for plugin support.
	(PLUGIN_SUPPORT): Define if plugins are supported.
	(enable_offload_targets): Support Intel MIC targets.
	(OFFLOAD_TARGETS): List of target names suitable for offloading.
lto-plugin/
	* Makefile.am (libexecsubdir): Tweak for the possibility of being
	configured for offload compiler.
	(accel_dir_suffix, real_target_noncanonical): New variables substituted
	by configure.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
	variables.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>

From-SVN: r217485
2014-11-13 13:28:56 +00:00
Joseph Myers e610393ca7 Make soft-fp symbols into compat symbols for powerpc*-*-linux*.
Continuing preparations for implementing
TARGET_ATOMIC_ASSIGN_EXPAND_FENV for powerpc*-*-linux* soft-float and
e500, this patch makes soft-fp symbols used for those targets into
compat symbols when building with glibc >= 2.19, so that they are only
in shared libgcc for existing binaries requiring them, not in static
libgcc and not available for new links using shared libgcc.  Instead,
new links will get the symbols from libc, which has exported all of
them since 2.19.  (Actually all the symbols were exported from glibc
since 2.4, but some of them were exported by glibc as compat symbols
only - because of a confusion between deliberately present soft-fp
symbols and old accidental reexports of libgcc functions from glibc
2.0 - until 2.19.)

This allows user floating-point arithmetic to interoperate properly
with the state handled by <fenv.h> functions, whether software state
(for soft-float; TLS variables that don't form a public part of
glibc's ABI, so can only be accessed directly by functions within
glibc) or hardware state (for e500 - the copies of the soft-fp
functions in glibc being built to interoperate with the hardware state
whereas those in libgcc aren't).  Previously only glibc's own
functions, and those operations done in hardware on e500, properly
worked with that state, not direct floating-point arithmetic
operations that were implemented in software.

The intended next step is the actual TARGET_ATOMIC_ASSIGN_EXPAND_FENV
implementation.

The test of glibc >= 2.19 uses the same --with-glibc-version configure
option as in the gcc/ directory (but differently implemented; in gcc/
the fallback is to examine headers to find the version, while in
libgcc/ we can use compile for the target and so use AC_COMPUTE_INT).
The TARGET_ATOMIC_ASSIGN_EXPAND_FENV implementation will also only do
anything for glibc >= 2.19, as it will depend on generating calls to
functions __atomic_feholdexcept __atomic_feclearexcept
__atomic_feupdateenv that were added in 2.19 for that purpose (even
for e500, inline code is not readily possible because of the need to
make prctl syscalls from the implementation of these functions).

In order to make symbols compat symbols, the soft-fp files need
wrapping with generated wrappers including asm .symver directives,
which need to name the symbol version in question.  This is extracted
by an awk script from an intermediate stage of generating the .map
file for linking libgcc (that .map itself depends on the objects that
go into the library, so can't be used for this purpose as that would
mean a circular dependency); the extraction is not fully general
regarding the features available in .map generation, but suffices for
the present purpose.

It would make sense for hardfp.c symbols to be compat symbols as well
(in the cases where hardfp.c gets used, the functions in question
should not be used for new links), but this isn't required for the
present purpose, which is only concerned with ensuring that where
functions that should be affected by rounding modes or exceptions get
used, those functions are actually affected by those rounding modes or
exceptions.

Tested with no regressions with cross to powerpc-linux-gnu
(soft-float); c11-atomic-exec-5.c moves from UNSUPPORTED to FAIL, as
expected, now that floating-point arithmetic in user programs uses the
same state as <fenv.h> functions, so the fenv_exceptions test passes,
but TARGET_ATOMIC_ASSIGN_EXPAND_FENV isn't yet implemented.  (For
e500, c11-atomic-exec-5.c was already FAILing, as enough operations
worked with the hardware state for the fenv_exceptions effective
target test to pass.)  Also verified that the exported symbols and
versions are unchanged, with the expected symbols becoming compat
symbols at the same versions, and that with --with-glibc-version=2.18
the symbols remain normal rather than compat symbols.

	* Makefile.in (libgcc.map.in): New target.
	(libgcc.map): Use libgcc.map.in.
	* config/t-softfp (softfp_compat): New variable to be set by
	users.
	[$(softfp_compat) = y] (softfp_map_dep, softfp_set_symver): New
	variables.
	[$(softfp_compat) = y] (softfp_file_list): Use files in the build
	directory.
	[$(softfp_compat) = y] ($(softfp_file_list)): Generate wrappers
	that use compat symbols and disable all code unless [SHARED].
	* config/t-softfp-compat: New file.
	* find-symver.awk: New file.
	* configure.ac (--with-glibc-version): New configure option.
	(ppc_fp_compat): New variable set for powerpc*-*-linux*.
	* configure: Regenerate.
	* config.host (powerpc*-*-linux*): Use ${ppc_fp_compat} for
	soft-float and e500.

From-SVN: r216942
2014-10-30 17:28:30 +00:00
Rong Xu afe0c5ee91 Makefile.in: Fix dependence.
2014-10-06  Rong Xu  <xur@google.com>

	* gcc/Makefile.in: Fix dependence.
	* gcc/gcov-counter.def (GCOV_COUNTER_ICALL_TOPNV): Add
        indirect call topn profiler.
	* gcc/gcov-io.h: Ditto.
	* libgcc/Makefile.in: Ditto.
	* libgcc/libgcov-driver.c (gcov_sort_n_vals): New utility function.
	(gcov_sort_icall_topn_counter): Ditto.
	(gcov_sort_topn_counter_arrays): Ditto.
	(dump_one_gcov): Sort indirect_call topn counters.
	* libgcc/libgcov-merge.c (__gcov_merge_icall_topn): New merge
        function.
	* libgcc/libgcov-profiler.c (__gcov_topn_value_profiler_body): New
        utility function.
	(__gcov_indirect_call_topn_profiler): New profiler function.
	* libgcc/libgcov-util.c (__gcov_icall_topn_counter_op): New.
	* libgcc/libgcov.h: New decls.

From-SVN: r215962
2014-10-07 04:02:31 +00:00
Hans-Peter Nilsson 598a158681 crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS override USE_PT_GNU_EH_FRAME.
* crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS
	override USE_PT_GNU_EH_FRAME.
	[__LIBGCC_EH_FRAME_SECTION_NAME__ && !USE_PT_GNU_EH_FRAME]: Sanity-
	check USE_EH_FRAME_REGISTRY_ALWAYS against
	__LIBGCC_EH_FRAME_SECTION_NAME__, emit error if unsane.
	* Makefile.in (FORCE_EXPLICIT_EH_REGISTRY): New
	variable for substituted force_explicit_eh_registry.
	(CRTSTUFF_CFLAGS): Add FORCE_EXPLICIT_EH_REGISTRY.
	* configure.ac (explicit-exception-frame-registration):
	New AC_ARG_ENABLE.
	* configure: Regenerate.

From-SVN: r215443
2014-09-22 00:49:01 +00:00
Nathan Sidwell cadb2b9689 Makefile.in (LIBGCOV_INTERFACE): Add _gcov_dump from ...
* Makefile.in (LIBGCOV_INTERFACE): Add _gcov_dump from ...
	(LIBGCOV_DRIVER): ... here.
	* libgcov-driver.c (gcov_master): New.
	(gcov_exit): Remove from master chain.
	(__gcov_init): Add to master chain if version compatible.  Don't
	clear the version.
	* libgcov_interface (__gcov_flust): Call gcov_dump_int.
	(gcov_reset_int): Clear master chain, if compatible.
	(gcov_dump_int): New internal interface.  Dump master chain, if
	compatible.
	(gcov_dump): Alias for gcov_dump_int.
	* libgcov.h (struct gcov_root): Add next and prev fields.
	(struct gcov_master): New struct.
	(__gcov_master): New.
	(gcov_dump_int): Declare.

From-SVN: r215337
2014-09-17 20:13:17 +00:00
Joseph Myers 53d68b9f05 Use -fbuilding-libgcc for more target macros used in libgcc.
gcc/c-family:
	* c-cppbuiltin.c (c_cpp_builtins): Also define
	__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
	__LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
	__LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
	__LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
	__LIBGCC_STACK_GROWS_DOWNWARD__,
	__LIBGCC_DONT_USE_BUILTIN_SETJMP__,
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
	__LIBGCC_DWARF_FRAME_REGISTERS__,
	__LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
	__LIBGCC_STACK_POINTER_REGNUM__ and
	__LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
	(builtin_define_with_value): Handle backslash-escaping in string
	macro values.

libgcc:
	* Makefile.in (CRTSTUFF_CFLAGS): Add -fbuilding-libgcc.
	* config/aarch64/linux-unwind.h (STACK_POINTER_REGNUM): Change all
	uses to __LIBGCC_STACK_POINTER_REGNUM__.
	(DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/alpha/vms-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN):
	Change use to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/cr16/unwind-cr16.c (STACK_GROWS_DOWNWARD): Change all
	uses to __LIBGCC_STACK_GROWS_DOWNWARD__.
	(DWARF_FRAME_REGISTERS): Change all uses to
	__LIBGCC_DWARF_FRAME_REGISTERS__.
	(EH_RETURN_STACKADJ_RTX): Change all uses to
	__LIBGCC_EH_RETURN_STACKADJ_RTX__.
	* config/cr16/unwind-dw2.h (DWARF_FRAME_REGISTERS): Change use to
	__LIBGCC_DWARF_FRAME_REGISTERS__.  Remove conditional definition.
	* config/i386/cygming-crtbegin.c (EH_FRAME_SECTION_NAME): Change
	use to __LIBGCC_EH_FRAME_SECTION_NAME__.
	(JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__.
	* config/i386/cygming-crtend.c (EH_FRAME_SECTION_NAME): Change use
	to __LIBGCC_EH_FRAME_SECTION_NAME__.
	(JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__
	* config/mips/linux-unwind.h (STACK_POINTER_REGNUM): Change use to
	__LIBGCC_STACK_POINTER_REGNUM__.
	(DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/nios2/linux-unwind.h (STACK_POINTER_REGNUM): Change use
	to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/pa/hpux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change
	all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/pa/linux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change
	all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/rs6000/aix-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN):
	Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	(STACK_POINTER_REGNUM): Change all uses to
	__LIBGCC_STACK_POINTER_REGNUM__.
	* config/rs6000/darwin-fallback.c (STACK_POINTER_REGNUM): Change
	use to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/rs6000/linux-unwind.h (STACK_POINTER_REGNUM): Change all
	uses to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/sparc/linux-unwind.h (DWARF_FRAME_REGISTERS): Change use
	to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* config/sparc/sol2-unwind.h (DWARF_FRAME_REGISTERS): Change use
	to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* config/tilepro/linux-unwind.h (STACK_POINTER_REGNUM): Change use
	to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/xtensa/unwind-dw2-xtensa.h (DWARF_FRAME_REGISTERS):
	Remove conditional definition.
	* crtstuff.c (TEXT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_TEXT_SECTION_ASM_OP__.
	(EH_FRAME_SECTION_NAME): Change all uses to
	__LIBGCC_EH_FRAME_SECTION_NAME__.
	(EH_TABLES_CAN_BE_READ_ONLY): Change all uses to
	__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__.
	(CTORS_SECTION_ASM_OP): Change all uses to
	__LIBGCC_CTORS_SECTION_ASM_OP__.
	(DTORS_SECTION_ASM_OP): Change all uses to
	__LIBGCC_DTORS_SECTION_ASM_OP__.
	(JCR_SECTION_NAME): Change all uses to
	__LIBGCC_JCR_SECTION_NAME__.
	(INIT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_SECTION_ASM_OP__.
	(INIT_ARRAY_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__.
	* generic-morestack.c (STACK_GROWS_DOWNWARD): Change all uses to
	__LIBGCC_STACK_GROWS_DOWNWARD__.
	* libgcc2.c (INIT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_SECTION_ASM_OP__.
	(INIT_ARRAY_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__.
	(EH_FRAME_SECTION_NAME): Change all uses to
	__LIBGCC_EH_FRAME_SECTION_NAME__.
	* libgcov-profiler.c (VTABLE_USES_DESCRIPTORS): Remove conditional
	definitions.  Change all uses to
	__LIBGCC_VTABLE_USES_DESCRIPTORS__.
	* unwind-dw2.c (STACK_GROWS_DOWNWARD): Change all uses to
	__LIBGCC_STACK_GROWS_DOWNWARD__.
	(DWARF_FRAME_REGISTERS): Change all uses to
	__LIBGCC_DWARF_FRAME_REGISTERS__.
	(EH_RETURN_STACKADJ_RTX): Change all uses to
	__LIBGCC_EH_RETURN_STACKADJ_RTX__.
	* unwind-dw2.h (DWARF_FRAME_REGISTERS): Remove conditional
	definition.  Change use to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* unwind-sjlj.c (DONT_USE_BUILTIN_SETJMP): Change all uses to
	__LIBGCC_DONT_USE_BUILTIN_SETJMP__.
	(JMP_BUF_SIZE): Change use to __LIBGCC_JMP_BUF_SIZE__.

From-SVN: r214954
2014-09-05 13:03:46 +01:00
Nathan Sidwell 4303c58196 Makefile.in (LIBGCOV_INTERFACE): Move _gcov_dump ...
* Makefile.in (LIBGCOV_INTERFACE): Move _gcov_dump ...
	(LIBGCOV_DRIVER): ... to here.
	* libgcov.h (gcov_do_dump): New #define.
	(struct gcov_root): New.
	(__gcov_root): New declaration.
	(__gcov_dump_one): Declare.
	* libgcov-driver.c (gcov_list, gcov_dump_complete,
	run_accounted): Delete.
	(gcov_compute_histogram): Add LIST argument, adjust.
	(compute_summary): Adjust gcov_compute_histogram call.
	(gcov_do_dump): Not hidden, static in libgcov.
	(gcov_clear): Move  to interface.c.
	(__gcov_dump_one): New, broken out of ...
	(gcov_exit): ... here.  Make static.
	(__gcov_root): New.
	(__gcov_init): Adjust.
	* libgcov-interface.c (gcov_clear, gcov_exit): Remove
	declarations.
	(__gcov_flush): Use __gcov_dump_one and __gcov_reset.
	(gcov_clear): Moved from driver.c.   Add LIST argument.
	(__gcov_reset): Adjust for changed interfaces.
	(__gcov_fork): Remove local declaration of __gcov_flush_mx.

From-SVN: r213719
2014-08-07 18:02:06 +00:00
Nathan Sidwell b98a872b22 Makefile.in (LIBGCOV_MERGE, [...]): Reformat.
* Makefile.in (LIBGCOV_MERGE, LIBGCOV_PROFILER,
	LIBGCOV_INTERFACE): Reformat.
	* libgcov-driver.c (gcov_exit, __gcov_init): Disable when
	IN_GCOV_TOOL.
	* libgcov-interface.c: Reformat some comments.
	(__gcov_flush_mx): Add declaration.  Tidy up definition.

From-SVN: r213442
2014-08-01 10:05:42 +00:00
Rong Xu 40d6b7535c gcov-io.c (gcov_var): Move from gcov-io.h.
2014-01-08  Rong Xu  <xur@google.com> 

	* gcc/gcov-io.c (gcov_var): Move from gcov-io.h.
	(gcov_position): Ditto.
	(gcov_is_error): Ditto.
	(gcov_rewrite): Ditto.
	* gcc/gcov-io.h: Refactor. Move gcov_var to gcov-io.h, and libgcov
	only part to libgcc/libgcov.h.
	* libgcc/libgcov-driver.c: Use libgcov.h.
	(buffer_fn_data): Use xmalloc instead of malloc.
	(gcov_exit_merge_gcda): Ditto.
	* libgcc/libgcov-driver-system.c (allocate_filename_struct): Ditto.
	* libgcc/libgcov.h: New common header files for libgcov-*.h.
	* libgcc/libgcov-interface.c: Use libgcov.h
	* libgcc/libgcov-merge.c: Ditto.
	* libgcc/libgcov-profiler.c: Ditto.
	* libgcc/Makefile.in: Add dependence to libgcov.h

From-SVN: r206435
2014-01-08 16:37:08 +00:00
Richard Sandiford ac1dca3cab Update copyright years in libgcc/
From-SVN: r206295
2014-01-02 22:25:22 +00:00
Rong Xu d6d3f03341 The patch re-factors libgcov.c to make it better modulelized.
2013-11-12  Rong Xu  <xur@google.com>

The patch re-factors libgcov.c to make it better modulelized.
It contains two pieces of work:
1. break gcov_exit() into the following structure:
   gcov_exit()
      --> gcov_exit_compute_summary()
      --> allocate_filename_struct()
          for gi_ptr in gcov_list
            --> gcov_exit_dump_gcov()
                   --> gcov_exit_open_gcda_file()
                   --> gcov_exit_merge_gcda ()
                   --> gcov_exit_merge_summary ()
                   --> gcov_exit_write_gcda ()
2. split libgcov.c into the following files:
     libgcov-profiler.c
     libgcov-merge.c
     libgcov-interface.c
     libgcov-driver.c
       libgcov-driver-system.c (source included into libgcov-driver.c)

	* libgcc/libgcov.c: Delete as part of re-factoring.
	* gcc/gcov-io.h (__gcov_indirect_call_profiler): Add the decl to
        avoid warning.
	* libgcc/libgcov-interface.c (init_mx): Moved from libgcov.c.
	(init_mx_once): Ditto.
	(__gcov_flush): Ditto.
	(__gcov_reset): Ditto.
	(__gcov_dump): Ditto.
	(__gcov_fork): Ditto.
	(__gcov_execl): Ditto.
	(__gcov_execlp): Ditto.
	(__gcov_execle): Ditto.
	(__gcov_execv): Ditto.
	(__gcov_execvp): Ditto.
	(__gcov_execve): Ditto.
        * libgcc/libgcov-merge.c (__gcov_merge_time_profile): Moved from
        libgcov.c.
	(__gcov_merge_add): Ditto.
	(__gcov_merge_ior): Ditto.
	(__gcov_merge_single): Ditto.
	(__gcov_merge_delta): Ditto.
	* libgcc/libgcov-profiler.c 
	(__gcov_interval_profiler): Ditto.
	(__gcov_pow2_profiler): Ditto.
	(__gcov_one_value_profiler_body): Ditto.
	(__gcov_one_value_profiler): Ditto.
	(__gcov_indirect_call_profiler): Ditto.
	(__gcov_indirect_call_profiler_v2): Ditto.
	(__gcov_time_profiler): Ditto.
	(__gcov_average_profiler): Ditto.
	(__gcov_ior_profiler): Ditto.
	* libgcc/libgcov-driver.c (set_gcov_list): New.
	(get_gcov_dump_complete): Ditto.
	(set_gcov_dump_complete):Ditto.
	(reset_gcov_dump_complete):Ditto.
	(gcov_exit_compute_summary): New function split from gcov_exit().
	(gcov_exit_merge_gcda): Ditto.
	(gcov_exit_write_gcda): Ditto.
	(gcov_exit_merge_summary): Ditto.
	(gcov_exit_dump_gcov): Ditto.
	(struct gcov_fn_buffer): Moved from libgcov.c
	(struct gcov_summary_buffer): Ditto.
	(free_fn_data): Ditto.
	(buffer_fn_data): Ditto.
	(crc32_unsigned): Ditto.
	(gcov_version): Ditto.
	(gcov_histogram_insert): Ditto.
	(gcov_compute_histogram): Ditto.
	(gcov_exit): Ditto.
	(gcov_clear): Ditto.
	(__gcov_init): Ditto.
        (this_prg): Make it file scope static variable.
        (all_prg): Ditto.
        (crc32): Ditto.
        (gi_filename): Ditto.
        (fn_buffer): Ditto.
        (sum_buffer): Ditto.
        (struct gcov_filename_aux): New types to store auxiliary information
        for gi_filename.
	* libgcc/libgcov-driver-system.c (gcov_error): New utility function.
	(allocate_filename_struct): New function split from gcov_exit().
	(gcov_exit_open_gcda_file): Ditto.
	(create_file_directory): Moved from libgcov.c
	* libgcc/Makefile.in: Change to build newly added files.

From-SVN: r204730
2013-11-13 00:24:49 +00:00
Martin Liska 86ce5d2fc1 Time profiler introduced.
Co-Authored-By: Jan Hubicka <jh@suse.cz>

From-SVN: r204690
2013-11-11 23:21:02 +00:00
Jan Hubicka 748d71f394 Workaround binutils PR14342
Workaround binutils PR14342
	* tree-profile.c (init_ic_make_global_vars): Add LTO path.
	(gimple_init_edge_profiler): Likewise.
	(gimple_gen_ic_func_profiler): Likewise.

	* Makefile.in: Add _gcov_indirect_call_profiler_v2 symbol.
	* libgcov.c (L_gcov_indirect_call_profiler): Restore original API.
	(L_gcov_indirect_call_profiler_v2): New.

From-SVN: r201648
2013-08-10 20:52:06 +00:00
Caroline Tice 2077db1be5 Commit the vtable verification feature.
Commit the vtable verification feature.  This feature is designed to
detect, at run time, if/when the vtable pointer in a C++ object has
been corrupted, before allowing virtual calls through that pointer. 
If pointer corruption is detected, execution of the program is halted.

libstdc++-v3 ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * fragment.am: Add XTEMPLATE_FLAGS.
        * configure.ac: Add definitions for --enable-vtable-verify.
        * acinclude.m4:  Add --enable-vtable-verify and
        --disable-vtable-verify; define --enable-vtable-verify; define
        VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS.
        * config/abi/pre/gnu.ver: Export symbols for vtable verification.
        * libsupc++/Makefile.am: Define vtv_sources and add it to
        libsupc___la_SOURCES and libsupc__convenience_la_SOURCES.
        * libsupc++/vtv_stubs.cc: New file.
        * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS.
        * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add
        VTV_CXXLINKFLAGS to CXXLINK.
        * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS
        to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK.
        * src/C++11/Makefile.am: Ditto.
        * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify.
        * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause
        cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS.
        * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate
        libvtv if --enable-vtable-verify was used; set cxxvtvflags; add
        cxxvtvflags to cxx_final.
        * testsuite/18_support/bad_exception/23591_thread-1.c: Add
        -fvtable-verify=none to compiler flags.
        * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none
        to compiler flags.
        * configure: Regenerated.
        * Makefile.in: Regenerated.
        * python/Makefile.in: Regenerated.
        * include/Makefile.in: Regenerated.
        * libsupc++/Makefile.in: Regenerated.
        * config.h.in: Regenerated.
        * po/Makefile.in: Regenerated.
        * src/Makefile.in: Regenerated.
        * src/c++98/Makefile.in: Regenerated.
        * src/c++11/Makefile.in: Regenerated.
        * doc/Makefile.in: Regenerated.
        * testsuite/Makefile.in: Regenerated.

top level ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * configure.ac: Add target-libvtv to target_libraries; disable libvtv
        on non-linux systems; add target-libvtv to noconfigdirs; add
        libsupc++/.libs to C++ library search paths.
        * configure: Regenerated.
        * Makefile.def: Add libvtv to target_modules; make libvtv depend on
        libstdc++ and libgcc.
        * Makefile.in: Regenerated.

include/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * vtv-change-permission.h: New file.

contrib/ChangeLog:
2013-08-06  Caroline Tice4  <cmtice@google.com>

        * gcc_update: Add libvtv files.

libgcc/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        config.host (extra_parts): Add vtv_start.o, vtv_end.o
        vtv_start_preinit.o and vtv_end_preinit.o.
        configure.ac: Add code to check/set enable_vtable_verify.
        Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is
        true.
        vtv_start_preinit.c: New file.
        vtv_end_preinit.c: New file.
        vtv_start.c: New file.
        vtv_end.c: New file.
        configure: Regenerated.

gcc/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * gcc.c (VTABLE_VERIFICATION_SPEC): New definition.
        (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC.
        * tree-pass.h: Add pass_vtable_verify.
        * varasm.c (assemble_variable): Add code to properly set the comdat
        section and name for the .vtable_map_vars section.
        (assemble_vtyv_preinit_initializer): New function.
        (default_sectin_type_flags):  Make sure .vtable_map_vars section has
        LINK_ONCE flag.
        * output.h: Add function decl for assemble_vtv_preinit_initializer.
        * vtable-verify.c: New file.
        * vtable-verify.h: New file.
        * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify
        initialiation levels.
        * timevar.def (TV_VTABLE_VERIFICATION): New definition.
        * passes.def: Insert pass_vtable_verify.
        * aclocal.m4: Reorder includes.
        * doc/invoke.texi: Add documentation for the flags -fvtable-verify=,
	-fvtv-debug and -fvtv-counts.
        * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o,
as appropriate, if -fvtable-verify=... is used.
        (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if
        -fvtable-verify=... is used.
        * Makefile.in (OBJS):  Add vtable-verify.o to list.
        (vtable-verify.o): Add new build rule.
        (GTFILES): Add vtable-verify.c to list.
        * common.opt (fvtable-verify=): New flag.
        (vtv_priority): Values for fvtable-verify= flag.
        (fvtv-counts): New flag.
(fvtv-debug): New flag.
        * tree.h (save_vtable_map_decl): New extern function decl.


gcc/cp/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
        list.
        (vtable-class-hierarchy.o): Add build rule.
        * cp-tree.h (vtv_start_verification_constructor_init_function): New
        extern function decl.
        (vtv_finish_verification_constructor_init_function): New extern
        function decl.
        (build_vtbl_address): New extern function decl.
        (get_mangled_vtable_map_var_name): New extern function decl.
        (vtv_compute_class_hierarchy_transitive_closure): New extern function
        decl.
        (vtv_generate_init_routine): New extern function decl.
        (vtv_save_class_info): New extern function decl.
        (vtv_recover_class_info): New extern function decl.
        (vtv_build_vtable_verify_fndecl): New extern function decl.
        * class.c (finish_struct_1): Add call to vtv_save_class_info if
        flag_vtable_verify is true.
        * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
        * vtable-class-hierarchy.c: New file.
        * mangle.c (get_mangled_vtable_map_var_name):  New function.
        * decl2.c (start_objects): Update function comment.
        (cp_write_global_declarations): Call vtv_recover_class_info,
        vtv_compute_class_hierarchy_transitive_closure and
        vtv_build_vtable_verify_fndecl, before calling
        finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
        flag_vtable_verify is true.
        (vtv_start_verification_constructor_init_function): New function.
        (vtv_finish_verification_constructor_init_function): New function.
        * init.c (build_vtbl_address): Remove static qualifier from function.

libvtv/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        Initial check-in of new vtable verification feature.
        * configure.ac : New file.
        * acinclude.m4 : New file.
        * Makefile.am : New file.
        * aclocal.m4 : New file.
        * configure.tgt : New file.
        * configure: New file (generated).
        * Makefile.in: New file (generated).
        * vtv_set.h : New file.
        * vtv_utils.cc : New file.
        * vtv_utils.h : New file.
        * vtv_malloc.cc : New file.
        * vtv_rts.cc : New file.
        * vtv_malloc.h : New file.
        * vtv_rts.h : New file.
        * vtv_fail.cc : New file.
        * vtv_fail.h : New file.
        * vtv_map.h : New file.
        * scripts/run-testsuite.sh : New file.
        * scripts/sum-vtv-counts.c : New file.
        * testsuite/parts-test-main.h : New file.
        * testusite/dataentry.cc : New file.
        * testsuite/temp_deriv.cc : New file.
        * testsuite/register_pair.cc : New file.
        * testsuite/virtual_inheritance.cc : New file.
        * testsuite/field-test.cc : New file.
        * testsuite/nested_vcall_test.cc : New file.
        * testsuite/template-list-iostream.cc : New file.
        * testsuite/register_pair_inserts.cc : New file.
        * testsuite/register_pair_inserts_mt.cc : New file.
        * testsuite/event.list : New file.
        * testsuite/parts-test-extra-parts-views.cc : New file.
        * testsuite/parts-test-extra-parts-views.h : New file.
        * testsuite/environment-fail-32.s : New file.
        * testsuite/parts-test-extra-parts.h : New file.
        * testsuite/temp_deriv2.cc : New file.
        * testsuite/dlopen_mt.cc : New file.
        * testsuite/event.h : New file.
        * testsuite/template-list.cc : New file.
        * testsuite/replace-fail.cc : New file.
        * testsuite/Makefile.am : New file.
        * testsuite/Makefile.in: New file (generated).
        * testsuite/mempool_negative.c : New file.
        * testsuite/parts-test-main.cc : New file.
        * testsuite/event-private.cc : New file.
        * testsuite/thunk.cc : New file.
        * testsuite/event-defintiions.cc : New file.
        * testsuite/event-private.h : New file.
        * testsuite/parts-test.list : New file.
        * testusite/register_pair_mt.cc : New file.
        * testsuite/povray-derived.cc : New file.
        * testsuite/event-main.cc : New file.
        * testsuite/environment.cc : New file.
        * testsuite/template-list2.cc : New file.
        * testsuite/thunk_vtable_map_attack.cc : New file.
        * testsuite/parts-test-extra-parts.cc : New file.
        * testsuite/environment-fail-64.s : New file.
        * testsuite/dlopen.cc : New file.
        * testsuite/so.cc : New file.
        * testsuite/temp_deriv3.cc : New file.
        * testsuite/const_vtable.cc : New file.
        * testsuite/mempool_positive.c : New file.
        * testsuite/dup_name.cc : New file.

From-SVN: r201555
2013-08-06 20:38:59 -07:00
Chung-Ju Wu 9d2cdf2500 Makefile.in (clean, distclean): Remove auto-target.h and stamp-h correctly.
libgcc/
2013-06-25  Chung-Ju Wu  <jasonwucj@gmail.com>

        * Makefile.in (clean, distclean): Remove auto-target.h and stamp-h
        correctly.

From-SVN: r200390
2013-06-25 08:02:11 +00:00
Richard Sandiford 5d5bf77569 Update copyright in libgcc.
From-SVN: r195731
2013-02-04 19:06:20 +00:00
Richard Henderson 066161a2aa re PR bootstrap/55571 (PR48076 fix broke bootstrap on armv5tel-linux-gnueabi)
PR bootstrap/55571

        * Makefile.in (libgcc_s.so): Depend on and link with libgcc.a.

From-SVN: r194159
2012-12-04 11:08:18 -08:00
Georg-Johann Lay b588ae3074 re PR target/54461 ([avr] add configure option for better AVR-Libc integration)
PR target/54461
	* configure.ac (noconfigdirs,target=avr-*-*): Add target-newlib,
	target-libgloss if not configured --with-avrlibc=no.
	* configure: Regenerate.

libgcc/
	PR target/54461
	* config.host (tmake_file,host=avr-*-*): Add avr/t-avrlibc if
	not configured --with-avrlibc=no.
	* config/avr/t-avrlibc: New file.
	* Makefile.in (FPBIT_FUNCS): filter-out LIB2FUNCS_EXCLUDE.
	(DPBIT_FUNCS): Ditto.
	(TPBIT_FUNCS): Ditto.

gcc/
	PR target/54461
	* config.gcc (tm_file,target=avr-*-*): Add avr/avrlibc.h if
	not configured --with-avrlibc=no.
	(tm_defines,target=avr-*-*): Add WITH_AVRLIBC if not configured
	--with-avrlibc=no.
	* config/avr/avrlibc.h: New file.
	* config/avr/avr-c.c: Build-in define __WITH_AVRLIBC__ if
	not configured --with-avrlibc=no.
	* doc/invoke.texi (AVR Built-in Macros): Document __WITH_AVRLIBC__

From-SVN: r190967
2012-09-05 08:47:50 +00:00
Georg-Johann Lay a147b6d28f Makefile.in (fixed-funcs,fixed-conv-funcs): filter-out LIB2FUNCS_EXCLUDE before adding them to libgcc-objects, libgcc-s-objects.
* Makefile.in (fixed-funcs,fixed-conv-funcs): filter-out
	LIB2FUNCS_EXCLUDE before adding them to libgcc-objects,
	libgcc-s-objects.
	* fixed-obj.mk: Only expand dependency if $o is not in
	LIB2FUNCS_EXCLUDE.

From-SVN: r190624
2012-08-23 15:41:03 +00:00
Joseph Myers 130e00bd24 Makefile.in (vis_hide, [...]): Do not make definitions depend on --enable-shared.
* Makefile.in (vis_hide, gen-hide-list): Do not make definitions
	depend on --enable-shared.
	($(lib1asmfuncs-o)): Use %.vis files independent of
	--enable-shared.
	* static-object.mk ($(base)$(objext), $(base).vis)
	($(base)_s$(objext)): Use same rules for visibility handling as in
	shared-object.mk.

From-SVN: r190588
2012-08-22 09:36:23 +01:00
Julian Brown a508e1a8cb Makefile.in (LIB2_DIVMOD_EXCEPTION_FLAGS): Default to -fexceptions -fnon-call-exceptions if not defined.
libgcc/
    * Makefile.in (LIB2_DIVMOD_EXCEPTION_FLAGS): Default to
    -fexceptions -fnon-call-exceptions if not defined.
    ($(lib2-divmod-o), $(lib2-divmod-s-o)): Use above.
    * config/arm/t-bpabi (LIB2_DIVMOD_EXCEPTION_FLAGS): Define.

    gcc/testsuite/
    * gcc.target/arm/div64-unwinding.c: New test.

From-SVN: r190483
2012-08-17 15:06:06 +00:00
H.J. Lu cd25dea0f4 Replace top_srcdir with srcdir
PR driver/54171
	* Makefile.in (version): Replace top_srcdir with srcdir.

From-SVN: r190140
2012-08-03 22:33:27 -07:00
Jonathan Yong a3dda30be1 * Makefile.in (version): set to BASE-VER file from gcc directory.
From-SVN: r190136
2012-08-03 23:42:20 +00:00
Olivier Hainque 7c7c339b4b Makefile.in: move dependency on install-unwind_h from "install-leaf" to "install".
libgcc/
        * Makefile.in: move dependency on install-unwind_h from
        "install-leaf" to "install".

From-SVN: r187839
2012-05-24 14:57:11 +00:00
Olivier Hainque fdc1b7d3a7 Makefile.in (clean): Remove libgcc_tm.stamp as well.
libgcc/
        * Makefile.in (clean): Remove libgcc_tm.stamp as well.
        Use a separate command for stamp removals.

From-SVN: r187838
2012-05-24 14:51:33 +00:00
Olivier Hainque 4677d2eb61 Makefile.in (install-unwind_h): Rename into ...
libgcc/
        * Makefile.in (install-unwind_h): Rename into ...
        (install-unwind_h-forbuild): New target.
        (all): Use it instead of the former install-unwind_h.
        (install-unwind_h): Reinstate, copy to user install destination
        for include files, not to the internal gcc object directory one.
        (install-leaf): Depend on it.

From-SVN: r187599
2012-05-16 15:36:08 +00:00
Rainer Orth aca06c900e Use i386-cpuinfo.c on all i386 targets
libgcc:
	* config.host (i[34567]86-*-linux*, x86_64-*-linux*)
	(i[34567]86-*-kfreebsd*-gnu, x86_64-*-kfreebsd*-gnu)
	(i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*): Move
	i386/t-cpuinfo ...
	(i[34567]86-*-*, x86_64-*-*): ... here.

	* config/i386/libgcc-bsd.ver (GCC_4.8.0): New version.
	* config/i386/libgcc-sol2.ver (GCC_4.8.0): New version.

	* config/i386/i386-cpuinfo.c: Rename to ...
	* config/i386/cpuinfo.c: ... this.
	* config/i386/t-cpuinfo (LIB2ADD): Reflect this.

	* configure.ac (AC_CONFIG_HEADER): Call for auto-target.h.
	(libgcc_cv_init_priority): New test.
	* configure: Regenerate.
	* config.in: New file.
	* Makefile.in (clean): Rename config.h to auto-target.h.
	(config.h): Likewise.
	(stamp-h): Likewise.

	* config/i386/cpuinfo.c (auto-target.h): Include.
	(CONSTRUCTOR_PRIORITY): Define.
	(__cpu_indicator_init): Use it.

	gcc
	* doc/extend.texi (X86 Built-in Functions, __builtin_cpu_init):
	Document requirement to call in constructors.

	* config/i386/i386.c: Update comments for i386-cpuinfo.c name
	change.

From-SVN: r187365
2012-05-10 08:51:39 +00:00
Teresa Johnson 4e8ee9cbf7 This patch adds functionality to libgcov to enable user applications to collect...
This patch adds functionality to libgcov to enable user applications to
collect profile data only in regions of interest. This is useful, for
example, to collect profile data from a long-running server only
during the time when it is serving requests.

Specifically, the new routines __gcov_reset will clear all profile counters
to zero and __gcov_dump will write out the profile information collected so
far. A global variable is used to prevent writing out the profile a
second time during exit.

2012-05-08   Teresa Johnson  <tejohnson@google.com>

	* libgcc/libgcov.c (gcov_clear, __gcov_reset): New functions.
	(__gcov_dump): Ditto.
	(gcov_dump_complete): New global variable.
	(gcov_exit): Export hidden to enable use in L_gcov_dump.
	(__gcov_flush): Outline functionality now in gcov_clear.
	* libgcc/Makefile.in (L_gcov_reset, L_gcov_dump): Define.
	* gcc/gcov-io.h (__gcov_reset, __gcov_dump): Declare.
	* gcc/doc/gcov.texi: Add note on using __gcov_reset and __gcov_dump.

From-SVN: r187297
2012-05-08 21:22:28 +00:00
Hans-Peter Nilsson 6685dd96b2 Makefile.in ($(srcdir)/emutls.c): Explain why it's in LIB2ADDEH et al.
* Makefile.in ($(srcdir)/emutls.c): Explain why it's in LIB2ADDEH
	et al.

From-SVN: r181608
2011-11-22 03:01:02 +00:00