diff options
author | Martin Liska <mliska@suse.cz> | 2022-10-04 12:04:54 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-10-04 12:04:54 +0200 |
commit | da0970e441345f8349522ff1abac5c223044ebb1 (patch) | |
tree | 17c2091a83c584a1eae4f8e219a460f85c5d3fd8 /libgcc | |
parent | 54f3cfaf3a6f50958c71d79c85206a6c722e1a22 (diff) | |
parent | e886ebd17965d78f609b62479f4f48085108389c (diff) | |
download | gcc-da0970e441345f8349522ff1abac5c223044ebb1.zip gcc-da0970e441345f8349522ff1abac5c223044ebb1.tar.gz gcc-da0970e441345f8349522ff1abac5c223044ebb1.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 17 | ||||
-rw-r--r-- | libgcc/config/gthr-vxworks.h | 5 | ||||
-rw-r--r-- | libgcc/config/t-vxworks | 36 | ||||
-rw-r--r-- | libgcc/config/vxcrtstuff.c | 24 |
4 files changed, 65 insertions, 17 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 24296185..8660fb3 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,20 @@ +2022-10-02 Olivier Hainque <hainque@adacore.com> + + * config/t-vxworks (LIBGCC2_INCLUDE): Augment comment. Move + -I options for gcc/include and gcc/include-fixed at the end + and make them -isystem. + +2022-10-02 Olivier Hainque <hainque@adacore.com> + + * config/gthr-vxworks.h: Prevent Wpragma warning for the + pragma diagnostics on Wstrict-prototypes. + +2022-09-29 Olivier Hainque <hainque@adacore.com> + + * config/vxcrtstuff.c: Improve the comment attached to the use + of auto-host.h and of __dso_handle. Remove redundant guard on + HAVE_INITFINI_ARRAY_SUPPORT within a USE_INITFINI_ARRAY section. + 2022-09-26 Thomas Neumann <tneumann@users.sourceforge.net> * unwind-dw2-fde.c: Introduce a constant for in_shutdown diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h index 9861a11..31c4b9f 100644 --- a/libgcc/config/gthr-vxworks.h +++ b/libgcc/config/gthr-vxworks.h @@ -38,8 +38,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include <_vxworks-versions.h> /* Some VxWorks headers profusely use typedefs of a pointer to a function with - undefined number of arguments. */ + undefined number of arguments. Arrange to ignore declaration errors in C++, + which is achievable by ignoring Wstrict-prototypes diagnostics even when the + option is registered as only valid for c/objc. */ #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpragmas" #pragma GCC diagnostic ignored "-Wstrict-prototypes" #include <semLib.h> #pragma GCC diagnostic pop diff --git a/libgcc/config/t-vxworks b/libgcc/config/t-vxworks index 18a0b1e..81a4dea 100644 --- a/libgcc/config/t-vxworks +++ b/libgcc/config/t-vxworks @@ -5,17 +5,37 @@ LIBGCC2_DEBUG_CFLAGS = # VxWorks specific entry point. LIB2FUNCS_EXCLUDE += _clear_cache -# This ensures that the correct target headers are used; some VxWorks -# system headers have names that collide with GCC's internal (host) -# headers, e.g. regs.h. Make sure the local libgcc headers still -# prevail (e.g. unwind.h), and that gcc provided header files intended -# to be user visible eventually are visible as well. +# Arrange to have the correct target headers used when compiling +# libgcc. We specifically need to handle VxWorks system headers +# having names that collide with GCC's internal headers. +# +# For example, compiling gthr-vxworks.c #includes <taskLib.h> +# which in turn #includes <regs.h>, which exists both in the gcc +# source tree and as a VxWorks system header. We need that +# #include to get the VxWorks version, not the compiler one. +# +# We still need to make sure that the local libgcc headers prevail +# (e.g. ./unwind.h), and that gcc provided header files intended +# to be user visible eventually are visible as well (gcc/include +# and gcc/include-fixed). +# +# The latter are added unconditionally as -isystem during regular +# cross builds via the %I spec processing and search paths introduced +# by -B options. These take priority over whatever we can add here, +# even with -nostdinc, and end up at the tail of the search chain. +# +# We keep explicit options nevertheless, to accommodate canadian +# setups where the libraries are built with an installed cross compiler, +# without -B. Also note, incidentally, that the detection of duplicate +# paths differs between Windows and Linux hosts as the latter can perform +# inode based checks while the former may only rely on name comparisons. + LIBGCC2_INCLUDES = -nostdinc -I. \ - -I$(MULTIBUILDTOP)../../gcc/include-fixed$(MULTISUBDIR) \ - -I$(MULTIBUILDTOP)../../gcc/include \ $(if $(findstring vxworks7, $(target_noncanonical)), \ -I$(VSB_DIR)/h -I$(VSB_DIR)/share/h -I=/system -I=/public, \ - -I=/ -I=/wrn/coreip) + -I=/ -I=/wrn/coreip) \ + -isystem $(MULTIBUILDTOP)../../gcc/include-fixed$(MULTISUBDIR) \ + -isystem $(MULTIBUILDTOP)../../gcc/include # Use these also for the vxcrstuff objects (.e.g for version.h), on top of # the options possibly already set specifically for the target: diff --git a/libgcc/config/vxcrtstuff.c b/libgcc/config/vxcrtstuff.c index 80f51f7..5045acf 100644 --- a/libgcc/config/vxcrtstuff.c +++ b/libgcc/config/vxcrtstuff.c @@ -26,15 +26,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define IN_LIBGCC2 -/* FIXME: Including auto-host is incorrect, but until we have - identified the set of defines that need to go into auto-target.h, - this will have to do. */ +/* FIXME: Including auto-host is incorrect here (target library implementation + file), but we still need it for DEFAULT_USE_CXA_ATEXIT and most importantly + USE_INITFINI_ARRAY, guarded by HAVE_INITFINI_ARRAY_SUPPORT, not yet handled + by auto-target.h. Proceed as crtstuff.c, with the inclusion followed by a + few #undefs preventing build failures in configurations setup for Windows + hosts, including canadian builds. #define USED_FOR_TARGET would circumvent + this but would unfortunately also inhibit some of the definitions we + need. */ #include "auto-host.h" #undef caddr_t #undef pid_t #undef rlim_t #undef ssize_t #undef vfork + #include "tconfig.h" #include "tsystem.h" #include "coretypes.h" @@ -58,17 +64,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifdef CRT_BEGIN +/* Provide __dso_handle in RTP objects, which might be included in contexts + involving shared objects. This mimics the crtstuff.c behavior: dso_handle + should be NULL for the main program (in vx_crtbegin.o) and a unique value + for the shared libraries (in vx_crtbeginS.o). */ + #if DEFAULT_USE_CXA_ATEXIT && defined(__RTP__) -/* This mimics the crtstuff.c behavior. dso_handle should be NULL for the - main program (in vx_crtbegin.o) and a unique value for the shared libraries - (in vx_crtbeginS.o). */ extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); #ifdef CRTSTUFFS_O void *__dso_handle = &__dso_handle; #else void *__dso_handle = 0; #endif -#endif /* DEFAULT_USE_CXA_ATEXIT */ +#endif /* Determine what names to use for the constructor/destructor functions. */ @@ -103,7 +111,7 @@ void *__dso_handle = 0; where we don't want to drag libc_internal contents blindly and which provides functions with a slightly different name anyway. */ -#if HAVE_INITFINI_ARRAY_SUPPORT && defined(CRTSTUFFS_O) +#if defined(CRTSTUFFS_O) /* Run through the .init_array, .fini_array sections. The linker script *must* provide __init_array_start, __init_array_end, __fini_array_start, |