Skip to content
Snippets Groups Projects
  1. Sep 12, 2023
  2. Sep 06, 2023
  3. Jul 20, 2023
  4. 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
  5. 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
  6. 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
  7. May 11, 2023
  8. 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
  9. Mar 06, 2023
  10. 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
  11. Dec 21, 2022
  12. Dec 12, 2022
  13. Nov 30, 2022
  14. Oct 28, 2022
  15. Sep 27, 2022
  16. Sep 22, 2022
  17. Sep 07, 2022
  18. Jul 30, 2022
  19. Jul 22, 2022
  20. Jul 13, 2022
  21. Jun 30, 2022
  22. Jun 28, 2022
  23. Jun 21, 2022
  24. Jun 17, 2022
  25. Jun 14, 2022
  26. Apr 21, 2022
  27. Apr 19, 2022
  28. Apr 18, 2022
  29. 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
  30. Apr 14, 2022
  31. Mar 31, 2022
  32. Mar 16, 2022
  33. Mar 04, 2022
  34. Feb 22, 2022
  35. Feb 21, 2022
Loading