Skip to content
Snippets Groups Projects
  1. Feb 02, 2024
  2. Nov 30, 2023
  3. Oct 23, 2023
  4. Oct 22, 2023
    • Iain Sandoe's avatar
      Config,Darwin: Allow for configuring Darwin to use embedded runpath. · 6a6d3817
      Iain Sandoe authored
      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.
      6a6d3817
  5. Sep 12, 2023
  6. Sep 06, 2023
  7. Jul 20, 2023
  8. Jun 23, 2023
    • Ian Lance Taylor's avatar
      compiler, libgo: support bootstrapping gc compiler · 6b724427
      Ian Lance Taylor authored
      In the Go 1.21 release the package internal/profile imports
      internal/lazyregexp.  That works when bootstrapping with Go 1.17,
      because that compiler has internal/lazyregep and permits importing it.
      We also have internal/lazyregexp in libgo, but since it is not installed
      it is not available for importing.  This CL adds internal/lazyregexp
      to the list of internal packages that are installed for bootstrapping.
      
      The Go 1.21, and earlier, releases have a couple of functions in
      the internal/abi package that are always fully intrinsified.
      The gofrontend recognizes and intrinsifies those functions as well.
      However, the gofrontend was also building function descriptors
      for references to the functions without calling them, which
      failed because there was nothing to refer to.  That is OK for the
      gc compiler, which guarantees that the functions are only called,
      not referenced.  This CL arranges to not generate function descriptors
      for these functions.
      
      For golang/go#60913
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/504798
      6b724427
  9. Jun 20, 2023
    • Ian Lance Taylor's avatar
      runtime: use a C function to call mmap · efecb298
      Ian Lance Taylor authored
      The final argument to mmap, of type off_t, varies.
      In CL 445375 we changed it to always use the C off_t type,
      but that broke 32-bit big-endian Linux systems.  On those systems,
      using the C off_t type requires calling the mmap64 function.
      In C this is automatically handled by the <sys/mman.h> file.
      In Go, we would have to change the magic //extern comment to
      call mmap64 when appropriate.  Rather than try to get that right,
      we instead go through a C function that uses C implicit type
      conversions to pick the right type.
      
      Fixes PR go/110297
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/504415
      efecb298
  10. Jun 16, 2023
    • Ian Lance Taylor's avatar
      libgo/testsuite: add benchmarks and examples to list · bc6bd0d6
      Ian Lance Taylor authored
      In CL 384695 I simplified the code that built lists of benchmarks,
      examples, and fuzz tests, and managed to break it. This CL corrects
      the code to once again make the benchmarks available, and to run
      the examples with output and the fuzz targets.
      
      Doing this revealed a test failure in internal/fuzz on 32-bit x86:
      a signalling NaN is turned into a quiet NaN on the 387 floating-point
      stack that GCC uses by default. This CL skips the test.
      
      Fixes golang/go#60826
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/503798
      bc6bd0d6
  11. May 11, 2023
  12. Apr 07, 2023
    • Ian Lance Taylor's avatar
      mime: remove test ordering dependency · f22c12d7
      Ian Lance Taylor authored
      Backport CL 421442 from upstream.
      
      Original description:
      
      Arrange for tests that call setMimeInit to fully restore the old values,
      by clearing the sync.Once that controls initialization.
      
      Once we've done that, call initMime in initMimeUnixTest because
      otherwise the test types loaded there will be cleared by the call to
      initMime that previously was not being done.
      
      For golang/go#51648
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/483117
      f22c12d7
  13. Mar 06, 2023
  14. Jan 07, 2023
    • LIU Hao's avatar
      Always define `WIN32_LEAN_AND_MEAN` before <windows.h> · 902c7559
      LIU Hao authored
      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.
      902c7559
  15. Dec 21, 2022
  16. Dec 12, 2022
  17. Nov 30, 2022
  18. Oct 28, 2022
  19. Sep 27, 2022
  20. Sep 22, 2022
  21. Sep 07, 2022
  22. Jul 30, 2022
  23. Jul 22, 2022
  24. Jul 13, 2022
  25. Jun 30, 2022
  26. Jun 28, 2022
  27. Jun 21, 2022
  28. Jun 17, 2022
  29. Jun 14, 2022
  30. Apr 21, 2022
  31. Apr 19, 2022
  32. Apr 18, 2022
  33. Apr 15, 2022
    • Ian Lance Taylor's avatar
      compiler: revert `for package-scope "a = b; b = x" just set "a = x"` · d00dd52e
      Ian Lance Taylor authored
      Revert CL 245098.  It caused incorrect initialization ordering.
      
      Adjust the runtime package to work even with the CL reverted.
      
      Original description of CL 245098:
      
          This avoids requiring an init function to initialize the variable.
          This can only be done if x is a static initializer.
      
          The go1.15rc1 runtime package relies on this optimization.
          The package has a variable "var maxSearchAddr = maxOffAddr".
          The maxSearchAddr variable is used by code that runs before package
          initialization is complete.
      
      For golang/go#51913
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/395994
      d00dd52e
  34. Apr 14, 2022
  35. Mar 31, 2022
  36. Mar 16, 2022
Loading