aboutsummaryrefslogtreecommitdiff
path: root/libffi
AgeCommit message (Collapse)AuthorFilesLines
2023-10-27Daily bump.GCC Administrator1-0/+15
2023-10-26libffi: Consider '--with-build-sysroot=[...]' for target libraries' ↵Thomas Schwinge7-6/+20
build-tree testing (instead of build-time 'CC' etc.) [PR109951] Similar to commit fb5d27be272b71fb9026224535fc73f125ce3be7 "libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951]", this is commit a0b48358cb1e70e161a87ec5deb7a4b25defba6b "libffi/test: Fix compilation for build sysroot" done differently, avoiding build-tree testing use of any random gunk that may appear in build-time 'CC', 'CXX'. PR testsuite/109951 libffi/ * configure.ac: 'AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)'. <local.exp>: Don't set 'CC_FOR_TARGET', 'CXX_FOR_TARGET', instead set 'SYSROOT_CFLAGS_FOR_TARGET'. * Makefile.in: Regenerate. * configure: Likewise. * include/Makefile.in: Likewise. * man/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. * testsuite/lib/libffi.exp (libffi_target_compile): If '--with-build-sysroot=[...]' was specified, use it for build-tree testing.
2023-10-23Daily bump.GCC Administrator1-0/+10
2023-10-22Testsuite: allow non-installed testing on darwinIain Sandoe1-3/+8
DYLD_LIBRARY_PATH is now removed from the environment for all system tools, including the shell. Adapt the testsuite and pass the right options to allow testing, even when the compiler and libraries have not been installed. gcc/ChangeLog: * Makefile.in: set ENABLE_DARWIN_AT_RPATH in site.tmp. gcc/testsuite/ChangeLog: * gfortran.dg/coarray/caf.exp: Correctly set libatomic flags. * gfortran.dg/dg.exp: Likewise. * lib/asan-dg.exp: Set correct -B flags. * lib/atomic-dg.exp: Likewise. * lib/target-libpath.exp: Handle ENABLE_DARWIN_AT_RPATH. libatomic/ChangeLog: * testsuite/lib/libatomic.exp: Pass correct flags on darwin. libffi/ChangeLog: * testsuite/lib/libffi.exp: Likewise. libitm/ChangeLog: * testsuite/lib/libitm.exp: Likewise. * testsuite/libitm.c++/c++.exp: Likewise.
2023-10-22Config,Darwin: Allow for configuring Darwin to use embedded runpath.Iain Sandoe5-12/+138
Recent Darwin versions place contraints on the use of run paths specified in environment variables. This breaks some assumptions in the GCC build. This change allows the user to configure a Darwin build to use '@rpath/libraryname.dylib' in library names and then to add an embedded runpath to executables (and libraries with dependents). The embedded runpath is added by default unless the user adds '-nodefaultrpaths' to the link line. For an installed compiler, it means that any executable built with that compiler will reference the runtimes installed with the compiler (equivalent to hard-coding the library path into the name of the library). During build-time configurations any "-B" entries will be added to the runpath thus the newly-built libraries will be found by exes. Since the install name is set in libtool, that decision needs to be available here (but might also cause dependent ones in Makefiles, so we need to export a conditional). This facility is not available for Darwin 8 or earlier, however the existing environment variable runpath does work there. We default this on for systems where the external DYLD_LIBRARY_PATH does not work and off for Darwin 8 or earlier. For systems that can use either method, if the value is unset, we use the default (which is currently DYLD_LIBRARY_PATH). ChangeLog: * configure: Regenerate. * configure.ac: Do not add default runpaths to GCC exes when we are building -static-libstdc++/-static-libgcc (the default). * libtool.m4: Add 'enable-darwin-at-runpath'. Act on the enable flag to alter Darwin libraries to use @rpath names. gcc/ChangeLog: * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * config/darwin.h: Handle Darwin rpaths. * config/darwin.opt: Handle Darwin rpaths. * Makefile.in: Handle Darwin rpaths. gcc/ada/ChangeLog: * gcc-interface/Makefile.in: Handle Darwin rpaths. gcc/jit/ChangeLog: * Make-lang.in: Handle Darwin rpaths. libatomic/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libbacktrace/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. libgcc/ChangeLog: * config/t-slibgcc-darwin: Generate libgcc_s with an @rpath name. * config.host: Handle Darwin rpaths. libgfortran/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths libgm2/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * libm2cor/Makefile.am: Handle Darwin rpaths. * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.am: Handle Darwin rpaths. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.am: Handle Darwin rpaths. * libm2log/Makefile.in: Regenerate. * libm2min/Makefile.am: Handle Darwin rpaths. * libm2min/Makefile.in: Regenerate. * libm2pim/Makefile.am: Handle Darwin rpaths. * libm2pim/Makefile.in: Regenerate. libgomp/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths libitm/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libobjc/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * libdruntime/Makefile.am: Handle Darwin rpaths. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am: Handle Darwin rpaths. * src/Makefile.in: Regenerate. libquadmath/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libsanitizer/ChangeLog: * asan/Makefile.am: Handle Darwin rpaths. * asan/Makefile.in: Regenerate. * configure: Regenerate. * hwasan/Makefile.am: Handle Darwin rpaths. * hwasan/Makefile.in: Regenerate. * lsan/Makefile.am: Handle Darwin rpaths. * lsan/Makefile.in: Regenerate. * tsan/Makefile.am: Handle Darwin rpaths. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.am: Handle Darwin rpaths. * ubsan/Makefile.in: Regenerate. libssp/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libstdc++-v3/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * src/Makefile.am: Handle Darwin rpaths. * src/Makefile.in: Regenerate. libvtv/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. lto-plugin/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. zlib/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths.
2023-08-24Daily bump.GCC Administrator1-0/+10
2023-08-23libffi: Backport of LoongArch support for libffi.Lulu Cheng6-6/+1058
This is a backport of <https://github.com/libffi/libffi/commit/f259a6f6de>, and contains modifications to commit 5a4774cd4d, as well as the LoongArch schema portion of commit ee22ecbd11. This is needed for libgo. libffi/ChangeLog: PR libffi/108682 * configure.host: Add LoongArch support. * Makefile.am: Likewise. * Makefile.in: Regenerate. * src/loongarch64/ffi.c: New file. * src/loongarch64/ffitarget.h: New file. * src/loongarch64/sysv.S: New file.
2023-08-08Daily bump.GCC Administrator1-0/+24
2023-08-07libtool.m4: augment symcode for Solaris 11Nick Alcock1-1/+1
This reports common symbols like GNU nm, via a type code of 'C'. ChangeLog: * libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for Solaris 11. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07Add support for the haiku operating systemAlexander von Gluck IV1-2/+2
These are the os support patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time. ChangeLog: * configure: Regenerate. * configure.ac: Add Haiku to list of ELF OSes * libtool.m4: Update sys_lib_dlsearch_path_spec on Haiku. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07libtool.m4: fix the NM="/nm/over/here -B/option/with/path" caseNick Alcock1-7/+13
My previous nm patch handled all cases but one -- if the user set NM in the environment to a path which contained an option, libtool's nm detection tries to run nm against a copy of nm with the options in it: e.g. if NM was set to "nm --blargle", and nm was found in /usr/bin, the test would try to run "/usr/bin/nm --blargle /usr/bin/nm --blargle". This is unlikely to be desirable: in this case we should run "/usr/bin/nm --blargle /usr/bin/nm". Furthermore, as part of this nm has to detect when the passed-in $NM contains a path, and in that case avoid doing a path search itself. This too was thrown off if an option contained something that looked like a path, e.g. NM="nm -B../prev-gcc"; libtool then tries to run "nm -B../prev-gcc nm" which rarely works well (and indeed it looks to see whether that nm exists, finds it doesn't, and wrongly concludes that nm -p or whatever does not work). Fix all of these by clipping all options (defined as everything including and after the first " -") before deciding whether nm contains a path (but not using the clipped value for anything else), and then removing all options from the path-modified nm before looking to see whether that nm existed. NM=my-nm now does a path search and runs e.g. /usr/bin/my-nm -B /usr/bin/my-nm NM=/usr/bin/my-nm now avoids a path search and runs e.g. /usr/bin/my-nm -B /usr/bin/my-nm NM="my-nm -p../wombat" now does a path search and runs e.g. /usr/bin/my-nm -p../wombat -B /usr/bin/my-nm NM="../prev-binutils/new-nm -B../prev-gcc" now avoids a path search: ../prev-binutils/my-nm -B../prev-gcc -B ../prev-binutils/my-nm This seems to be all combinations, including those used by GCC bootstrap (which, before this commit, fails to bootstrap when configured --with-build-config=bootstrap-lto, because the lto plugin is now using --export-symbols-regex, which requires libtool to find a working nm, while also using -B../prev-gcc to point at the lto plugin associated with the GCC just built.) Regenerate all affected configure scripts. ChangeLog: * libtool.m4 (LT_PATH_NM): Handle user-specified NM with options, including options containing paths. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07libtool.m4: fix nm BSD flag detectionNick Alcock1-44/+45
Libtool needs to get BSD-format (or MS-format) output out of the system nm, so that it can scan generated object files for symbol names for -export-symbols-regex support. Some nms need specific flags to turn on BSD-formatted output, so libtool checks for this in its AC_PATH_NM. Unfortunately the code to do this has a pair of interlocking flaws: - it runs the test by doing an nm of /dev/null. Some platforms reasonably refuse to do an nm on a device file, but before now this has only been worked around by assuming that the error message has a specific textual form emitted by Tru64 nm, and that getting this error means this is Tru64 nm and that nm -B would work to produce BSD-format output, even though the test never actually got anything but an error message out of nm -B. This is fixable by nm'ing *nm itself* (since we necessarily have a path to it). - the test is entirely skipped if NM is set in the environment, on the grounds that the user has overridden the test: but the user cannot reasonably be expected to know that libtool wants not only nm but also flags forcing BSD-format output. Worse yet, one such "user" is the top-level Cygnus configure script, which neither tests for nor specifies any BSD-format flags. So platforms needing BSD-format flags always fail to set them when run in a Cygnus tree, breaking -export-symbols-regex on such platforms. Libtool also needs to augment $LD on some platforms, but this is done unconditionally, augmenting whatever the user specified: the nm check should do the same. One wrinkle: if the user has overridden $NM, a path might have been provided: so we use the user-specified path if there was one, and otherwise do the path search as usual. (If the nm specified doesn't work, this might lead to a few extra pointless path searches -- but the test is going to fail anyway, so that's not a problem.) (Tested with NM unset, and set to nm, /usr/bin/nm, my-nm where my-nm is a symlink to /usr/bin/nm on the PATH, and /not-on-the-path/my-nm where *that* is a symlink to /usr/bin/nm.) ChangeLog: * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided NM, if there is one. Run nm on itself, not on /dev/null, to avoid errors from nms that refuse to work on non-regular files. Remove other workarounds for this problem. Strip out blank lines from the nm output. fixincludes/ChangeLog: * configure: Regenerate. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07GCC: Check if AR works with --plugin and rcH.J. Lu1-3/+11
AR from older binutils doesn't work with --plugin and rc: [hjl@gnu-cfl-2 bin]$ touch foo.c [hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c [hjl@gnu-cfl-2 bin]$ ./ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c ./ar: no operation specified [hjl@gnu-cfl-2 bin]$ ./ar --version GNU ar (Linux/GNU Binutils) 2.29.51.0.1.20180112 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. [hjl@gnu-cfl-2 bin]$ Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. ChangeLog: * configure: Regenerated. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with --plugin and rc before enabling --plugin. config/ChangeLog: * gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with --plugin and rc before enabling --plugin. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libiberty/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07Sync with binutils: GCC: Pass --plugin to AR and RANLIBH.J. Lu1-2/+25
Sync with binutils for building binutils with LTO: 50ad1254d50 GCC: Pass --plugin to AR and RANLIB Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. ChangeLog: * Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. * configure.ac: Include config/gcc-plugin.m4. AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and RANLIB if possible. * Makefile.in: Regenerated. * configure: Likewise. config/ChangeLog: * gcc-plugin.m4 (GCC_PLUGIN_OPTION): New. libiberty/ChangeLog: * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. (configure_deps): Depend on ../config/gcc-plugin.m4. * configure.ac: AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * aclocal.m4: Regenerated. * configure: Likewise. zlib/ChangeLog: * configure: Regenerated. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate.
2023-05-07Daily bump.GCC Administrator1-0/+5
2023-05-06libffi: fix handling of homogeneous float128 structs (#689)Dan Horák1-1/+1
If there is a homogeneous struct with float128 members, they should be copied to vector register save area. The current code incorrectly copies only the value of the first member, not increasing the pointer with each iteration. Fix this. Merged from upstream libffi commit: 464b4b66e3cf3b5489e730c1466ee1bf825560e0 2023-05-03 Dan Horák <dan@danny.cz> libffi/ PR libffi/109447 * src/powerpc/ffi_linux64.c (ffi_prep_args64): Update arg.f128 pointer.
2023-01-23Daily bump.GCC Administrator1-0/+5
2023-01-22Darwin, libffi, testsuite: Ensure we pick up the convenience lib.Iain Sandoe1-0/+1
For several Darwin linker versions, the link paths are first traversed looking for shared libraries, and then again looking for archives. We want the paths to be searched for both shared and archives in order so that we will find the non-shared libffi in the testsuite (otherwise the installed version in the system will be found instead). Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libffi/ChangeLog: * testsuite/lib/libffi.exp: Search for both shared and archive in each path in turn.
2023-01-08Daily bump.GCC Administrator1-0/+6
2023-01-07Always define `WIN32_LEAN_AND_MEAN` before <windows.h>LIU Hao1-0/+1
Recently, mingw-w64 has got updated <msxml.h> from Wine which is included indirectly by <windows.h> if `WIN32_LEAN_AND_MEAN` is not defined. The `IXMLDOMDocument` class has a member function named `abort()`, which gets affected by our `abort()` macro in "system.h". `WIN32_LEAN_AND_MEAN` should, nevertheless, always be defined. This can exclude 'APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets' [1], and speed up compilation of these files a bit. [1] https://learn.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers gcc/ PR middle-end/108300 * config/xtensa/xtensa-dynconfig.c: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. * diagnostic-color.cc: Likewise. * plugin.cc: Likewise. * prefix.cc: Likewise. gcc/ada/ PR middle-end/108300 * adaint.c: Define `WIN32_LEAN_AND_MEAN` before `#include <windows.h>`. * cio.c: Likewise. * ctrl_c.c: Likewise. * expect.c: Likewise. * gsocket.h: Likewise. * mingw32.h: Likewise. * mkdir.c: Likewise. * rtfinal.c: Likewise. * rtinit.c: Likewise. * seh_init.c: Likewise. * sysdep.c: Likewise. * terminals.c: Likewise. * tracebak.c: Likewise. gcc/jit/ PR middle-end/108300 * jit-w32.h: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. libatomic/ PR middle-end/108300 * config/mingw/lock.c: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. libffi/ PR middle-end/108300 * src/aarch64/ffi.c: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. libgcc/ PR middle-end/108300 * config/i386/enable-execute-stack-mingw32.c: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. * libgcc2.c: Likewise. * unwind-generic.h: Likewise. libgfortran/ PR middle-end/108300 * intrinsics/sleep.c: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. libgomp/ PR middle-end/108300 * config/mingw32/proc.c: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. libiberty/ PR middle-end/108300 * make-temp-file.c: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. * pex-win32.c: Likewise. libssp/ PR middle-end/108300 * ssp.c: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. libstdc++-v3/ PR middle-end/108300 * src/c++11/system_error.cc: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. * src/c++11/thread.cc: Likewise. * src/c++17/fs_ops.cc: Likewise. * src/filesystem/ops.cc: Likewise. libvtv/ PR middle-end/108300 * vtv_malloc.cc: Define `WIN32_LEAN_AND_MEAN` before <windows.h>. * vtv_rts.cc: Likewise. * vtv_utils.cc: Likewise.
2022-12-22Daily bump.GCC Administrator1-0/+11
2022-12-21libffi: Update LOCAL_PATCHES.Iain Sandoe1-0/+1
Add the patch that fixes i686 Darwin build. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libffi/ChangeLog: * LOCAL_PATCHES: Add patch to fix i686 darwin build.
2022-12-21libffi: Fix X86 32b Darwin build and EH frames.Iain Sandoe1-38/+83
This addresses a number of issues in the X86 Darwin 32b port for libffi. 1. The pic symbol stubs are weak definitions; the correct section placement for these depends on the linker version in use. We do not have access to that information, but we can use the target OS version (assumes that the user has installed the latest version of xcode available). When a coalesced section is in use (OS versions earlier than Darwin12 / OSX 10.8), its name must differ from __TEXT,__text since otherwise that would correspond to altering the attributes of the .text section (which produces a diagnostic from the assembler). Here we use __TEXT, __textcoal_nt for this which is what GCC emits for these stubs. For later versions than Darwin 12 (OS X 10.8) we can place the stubs in the .text section (if we do not we get a diagnostic from clang -cc1as saying that the use of coalesced sections for this is deprecated). 2. The EH frame is specified manually, since there is no support for .cfi_ directives in 'cctools' assemblers. The implementation needs to provide offsets for CFA advance, code size and to the CIE as signed values rather than relocations. However the cctools assembler will produce a relocation for expressions like ' .long Lxx-Lyy' which then leads to a link-time error. We correct this by forming the offset values using ' .set' directives and then assigning the results of them. 3. The register numbering used by m32 X86 Darwin EH frames is not the same as the DWARF debug numbering (the Frame and Stack pointer numbers are swapped). 4. The FDE address encoding used by the system tools is '0x10' (PCrel + abs) where the value provided was PCrel + sdata4. 5. GCC does not use compact unwind at present, and it was not implemented until Darwin10 / OSX 10.6. There were some issues with function location in 10.6 so that the solution here suppresses emitting the compact unwind section until Darwin11 / OSX 10.7. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libffi/ChangeLog: * src/x86/sysv.S (COMDAT): Amend section use for Darwin, accounting cases where coalesced is needed. (eh_frame): Rework to avoid relocs that cause builf fails on earlier Darwin. Adjust register numbers to account for X86 m32 Darwin differences between EH and debug.
2022-11-21changelog: Fix extra space after tab.Martin Liska1-28/+28
2022-10-13Daily bump.GCC Administrator1-0/+4
2022-10-12regenerate configure filesMartin Liska1-2/+2
Needed after a recent change. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. liboffloadmic/ChangeLog: * configure: Regenerate. * plugin/configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2022-10-12Daily bump.GCC Administrator1-0/+5
2022-10-11Generic configury support for shared libs on VxWorksOlivier Hainque1-2/+46
This change adds the configury bits to activate the build of shared libs on VxWorks ports configured with --enable-shared, for libraries variants where this is generally supported (rtp, code model !large - currently not compatible with -fPIC). Set lt_cv_deplibs_check_method in libtool.m4, so the build of libraries know how to establish dependencies. This is useful in configurations such as aarch64 where proper support of LSE relies on accurate dependency information between libstdc++ and libgcc_s to begin with. Regenerate configure scripts to reflect libtool.m4 change. 2022-10-09 Olivier Hainque <hainque@adacore.com> * libtool.m4 (*vxworks*): When enable_shared, set dynamic_linker and friends for rtp !large. Assume the linker has the required abilities and set lt_cv_deplibs_check_method. gcc/ * config.gcc (*vxworks*): Add t-slibgcc fragment if enable_shared. libgcc/ * config.host (*vxworks*): When enable_shared, add libgcc and crtstuff "shared" fragments for rtp except large code model. (aarch64*-wrs-vxworks7*): Remove t-slibgcc-libgcc from the list of fragments. 2022-10-09 Olivier Hainque <hainque@adacore.com> gcc/ * configure: Regenerate. libatomic/ * configure: Regenerate. libbacktrace/ * configure: Regenerate. libcc1/ * configure: Regenerate. libffi/ * configure: Regenerate. libgfortran/ * configure: Regenerate. libgomp/ * configure: Regenerate. libitm/ * configure: Regenerate. libobjc/ * configure: Regenerate. liboffloadmic/ * configure: Regenerate. liboffloadmic/ * plugin/configure: Regenerate. libphobos/ * configure: Regenerate. libquadmath/ * configure: Regenerate. libsanitizer/ * configure: Regenerate. libssp/ * configure: Regenerate. libstdc++-v3/ * configure: Regenerate. libvtv/ * configure: Regenerate. lto-plugin/ * configure: Regenerate. zlib/ * configure: Regenerate.
2021-11-16Daily bump.GCC Administrator1-0/+9
2021-11-15libffi: Update LOCAL_PATCHESH.J. Lu1-0/+1
Add commit a91f844ef449d0dd1cf2e0e47b0ade0d8a6304e1 Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Date: Mon Nov 15 10:24:27 2021 +0100 libffi: Use #define instead of .macro in src/x86/win64.S [PR102874] to LOCAL_PATCHES. * LOCAL_PATCHES: Add commit a91f844ef44.
2021-11-15libffi: Use #define instead of .macro in src/x86/win64.S [PR102874]Rainer Orth1-7/+6
The libffi 3.4.2 import badly broke Solaris/x86 bootstrap with the native assembler: Assembler: "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 88 : Illegal mnemonic Near line: ".macro epilogue" "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 88 : Syntax error Near line: ".macro epilogue" "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 95 : Illegal mnemonic Near line: ".endm" "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 95 : Syntax error Near line: ".endm" "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 100 : Illegal mnemonic Near line: " epilogue" "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 100 : Syntax error Near line: "epilogue" Solaris as doesn't support .macro/.endm. Fixed by using #define instead of the unportable .macro. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. The bug has been reported upstream (https://github.com/libffi/libffi/issues/665); a corresponding pull request is also pending (https://github.com/libffi/libffi/pull/669). 2021-10-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> libffi: PR libffi/102874 * src/x86/win64.S (epilogue): Use #define instead of .macro.
2021-11-05Daily bump.GCC Administrator1-0/+12
2021-11-04libffi: Add --enable-cet to configureH.J. Lu8-7/+116
When --enable-cet is used to configure GCC, enable Intel CET in libffi. * Makefile.am (AM_CFLAGS): Add $(CET_FLAGS). (AM_CCASFLAGS): Likewise. * configure.ac (CET_FLAGS): Add GCC_CET_FLAGS and AC_SUBST. * Makefile.in: Regenerate. * aclocal.m4: Likewise. * configure: Likewise. * include/Makefile.in: Likewise. * man/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise.
2021-10-28Daily bump.GCC Administrator1-0/+4
2021-10-27libffi: Update LOCAL_PATCHESH.J. Lu1-0/+1
Add commit 90205f67e465ae7dfcf733c2b2b177ca7ff68da0 Author: Segher Boessenkool <segher@kernel.crashing.org> Date: Mon Oct 25 23:29:26 2021 +0000 rs6000: Fix bootstrap (libffi) This fixes bootstrap for the current problems building libffi. to LOCAL_PATCHES. * LOCAL_PATCHES: Add commit 90454a90082.
2021-10-26Daily bump.GCC Administrator1-0/+5
2021-10-25rs6000: Fix bootstrap (libffi)Segher Boessenkool2-0/+4
This fixes bootstrap for the current problems building libffi. 2021-10-25 Segher Boessenkool <segher@kernel.crashing.org> libffi/ * src/powerpc/linux64.S: Enable AltiVec insns. * src/powerpc/linux64_closure.S: Ditto.
2021-10-21Daily bump.GCC Administrator1-0/+85
2021-10-20libffi: Update ChangeLog.libffi for libffi 3.4.2H.J. Lu1-2/+6825
* ChangeLog.libffi: Copied from ChangeLog.old in libffi 3.4.2.
2021-10-20libffi: Add LOCAL_PATCHESH.J. Lu1-0/+2
* LOCAL_PATCHES: New file.
2021-10-20libffi: Integrate testsuite with GCC testsuiteH.J. Lu1-9/+15
* testsuite/lib/libffi.exp (load_gcc_lib): Load library from GCC testsuite. Load target-supports.exp and target-supports-dg.exp. (libffi-init): Use libraries in GCC build tree. (libffi_target_compile): Link with -shared-libgcc -lstdc++ for C++ sources.
2021-10-20libffi: Integrate build with GCCH.J. Lu11-86/+25054
1. Integrate with GCC build. 2. Disable static trampolines by default. 3. Support multilib. * Makefile.am (AUTOMAKE_OPTIONS): Add info-in-builddir. (ACLOCAL_AMFLAGS): Set to -I .. -I ../config. (SUBDIRS): Don't add doc. (TEXINFO_TEX): New. (MAKEINFOFLAGS): Likewise. (info_TEXINFOS): Likewise. (STAMP_GENINSRC): Likewise. (STAMP_BUILD_INFO): Likewise. (all-local): Likewise. (stamp-geninsrc): Likewise. (doc/libffi.info): Likewise. (stamp-build-info:): Likewise. (CLEANFILES): Likewise. (MAINTAINERCLEANFILES): Likewise. (AM_MAKEFLAGS): Likewise. (all-recursive): Likewise. (install-recursive): Likewise. (mostlyclean-recursive): Likewise. (clean-recursive): Likewise. (distclean-recursive): Likewise. (maintainer-clean-recursive): Likewise. (LTLDFLAGS): Replace libtool-ldflags with ../libtool-ldflags. (AM_CFLAGS): Add -g -fexceptions. (libffi.map-sun): Replace make_sunver.pl with ../contrib/make_sunver.pl. (dist-hook): Removed. Include $(top_srcdir)/../multilib.am. * configure.ac: Add AM_ENABLE_MULTILIB. Remove the frv*-elf check. (AX_ENABLE_BUILDDIR): Removed. (AM_INIT_AUTOMAKE): Add [no-dist]. Add --enable-generated-files-in-srcdir. (C_CONFIG_MACRO_DIR): Removed. (AX_COMPILER_VENDOR): Likewise. (AX_CC_MAXOPT): Likewise. (AX_CFLAGS_WARN_ALL): Likewise. Remove the GCC check. (SYMBOL_UNDERSCORE): Removed. (AX_CHECK_COMPILE_FLAG): Likewise. Remove --disable-docs. (ACX_CHECK_PROG_VER): Check makeinfo. (BUILD_DOCS): Updated. (exec-static-tramp): Don't enable use of static exec trampolines by default. Remove --disable-multi-os-directory. (GCC_WITH_TOOLEXECLIBDIR): New. Support cross host. Support --enable-multilib. * include/Makefile.am (nodist_include_HEADERS): Removed. (gcc_version): New. (toollibffidir): Likewise. (toollibffi_HEADERS): Likewise. * Makefile.in: Regenerate. (GCC_BASE_VER): New. (AC_CONFIG_FILES): Remove doc/Makefile. (AC_CONFIG_LINKS): New. * aclocal.m4: Likewise. * configure: Likewise. * fficonfig.h.in: Likewise. * mdate-sh: Likewise. * include/Makefile.in: Likewise. * man/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise.
2021-10-20libffi: Sync with libffi 3.4.2H.J. Lu236-30147/+17051
Merged commit: f9ea41683444ebe11cfa45b05223899764df28fb
2021-10-20libffi: Add HOWTO_MERGE, autogen.sh and merge.shH.J. Lu3-0/+75
Add scripts for syncing with libffi upstream: 1. Clone libffi repo. 2. Checkout the specific commit. 3. Remove the unused files. 4. Add new files and remove old files if needed. * HOWTO_MERGE: New file. * autogen.sh: Likewise. * merge.sh: Likewise.
2021-08-31Daily bump.GCC Administrator1-0/+6
2021-08-30libffi: Fix MIPS r6 supportYunQiang Su2-0/+10
for some instructions, MIPS r6 uses different encoding other than the previous releases. 1. mips/n32.S disable .set mips4: since it casuses old insn encoding is used. https://github.com/libffi/libffi/pull/396 has been accepted as: 94c102aa69b04337f63498e0e6551fcdce549ae5 2. mips/ffi.c: the encoding for JR is hardcoded: we need to use different value for r6 and pre-r6. https://github.com/libffi/libffi/pull/401 has been accpeted as: 746dbe3a6a79a41931c03b51df2972be4d5e5028 libffi/ PR libffi/83636 * src/mips/n32.S: disable .set mips4 * src/mips/ffi.c: use different JR encoding for r6.
2021-07-10Daily bump.GCC Administrator1-0/+5
2021-07-09libffi/x86: Always check __x86_64__ for x86 hostsH.J. Lu1-14/+7
The upstream libffi has commit cb8474368cdef3207638d047bd6c707ad8fcb339 Author: hjl-tools <hjl.tools@gmail.com> Date: Wed Dec 2 12:52:12 2020 -0800 libffi/x86: Always check __x86_64__ for x32 hosts (#601) (#602) Since for x86_64-*x32 and x86_64-x32-* hosts, -m32 generates ia32 codes. We should always check __x86_64__ for x32 hosts. Since for gnux32 hosts, -m32 generates i386 codes, always check __x86_64__ for x86 hosts. PR libffi/101336 * configure.host: Always check __x86_64__ for x86 hosts.
2021-06-17Daily bump.GCC Administrator1-0/+8
2021-06-16libffi: Fix up x86_64 classify_argumentJakub Jelinek2-4/+112
As the following testcase shows, libffi didn't handle properly classify_arguments of structures at byte offsets not divisible by UNITS_PER_WORD. The following patch adjusts it to match what config/i386/ classify_argument does for that and also ports the PR38781 fix there (the second chunk). This has been committed to upstream libffi already: https://github.com/libffi/libffi/commit/5651bea284ad0822eafe768e3443c2f4d7da2c8f 2021-06-16 Jakub Jelinek <jakub@redhat.com> * src/x86/ffi64.c (classify_argument): For FFI_TYPE_STRUCT set words to number of words needed for type->size + byte_offset bytes rather than just type->size bytes. Compute pos before the loop and check total size of the structure. * testsuite/libffi.call/nested_struct12.c: New test.