summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-08-19 10:28:41 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-08-21 13:56:21 +0100
commit657075f9fa5993602d7b881c0e1247e143c50302 (patch)
tree3bc1de64192ef61f8035c823d76adccd3b231a16 /pkgs/development/compilers
parent84b6c998fdc83721689e60ade59a675c2ffcc2bf (diff)
downloadnixpkgs-657075f9fa5993602d7b881c0e1247e143c50302.tar
nixpkgs-657075f9fa5993602d7b881c0e1247e143c50302.tar.gz
nixpkgs-657075f9fa5993602d7b881c0e1247e143c50302.tar.bz2
nixpkgs-657075f9fa5993602d7b881c0e1247e143c50302.tar.lz
nixpkgs-657075f9fa5993602d7b881c0e1247e143c50302.tar.xz
nixpkgs-657075f9fa5993602d7b881c0e1247e143c50302.tar.zst
nixpkgs-657075f9fa5993602d7b881c0e1247e143c50302.zip
gcc12: 12.1.0 -> 12.2.0
Co-authored-by: Robert Scott <github@humanleg.org.uk>
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/gcc/12/PR106102-musl-poison-cpp.patch52
-rw-r--r--pkgs/development/compilers/gcc/12/PR106102-musl-poison-jit.patch67
-rw-r--r--pkgs/development/compilers/gcc/12/default.nix14
3 files changed, 7 insertions, 126 deletions
diff --git a/pkgs/development/compilers/gcc/12/PR106102-musl-poison-cpp.patch b/pkgs/development/compilers/gcc/12/PR106102-musl-poison-cpp.patch
deleted file mode 100644
index 05677f5cf85..00000000000
--- a/pkgs/development/compilers/gcc/12/PR106102-musl-poison-cpp.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=3b21c21f3f5726823e19728fdd1571a14aae0fb3
-https://gcc.gnu.org/PR106102
---- a/gcc/cp/mapper-client.cc
-+++ b/gcc/cp/mapper-client.cc
-@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3.  If not see
- #define INCLUDE_STRING
- #define INCLUDE_VECTOR
- #define INCLUDE_MAP
-+#define INCLUDE_MEMORY
- #include "system.h"
- 
- #include "line-map.h"
---- a/gcc/cp/mapper-resolver.cc
-+++ b/gcc/cp/mapper-resolver.cc
-@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3.  If not see
- #define INCLUDE_VECTOR
- #define INCLUDE_ALGORITHM
- #define INCLUDE_MAP
-+#define INCLUDE_MEMORY
- #include "system.h"
- 
- // We don't want or need to be aware of networking
---- a/gcc/cp/module.cc
-+++ b/gcc/cp/module.cc
-@@ -206,6 +206,7 @@ Classes used:
- 
- #define _DEFAULT_SOURCE 1 /* To get TZ field of struct tm, if available.  */
- #include "config.h"
-+#define INCLUDE_MEMORY
- #define INCLUDE_STRING
- #define INCLUDE_VECTOR
- #include "system.h"
---- a/libcc1/libcc1plugin.cc
-+++ b/libcc1/libcc1plugin.cc
-@@ -31,6 +31,7 @@
- #undef PACKAGE_TARNAME
- #undef PACKAGE_VERSION
- 
-+#define INCLUDE_MEMORY
- #include "gcc-plugin.h"
- #include "system.h"
- #include "coretypes.h"
---- a/libcc1/libcp1plugin.cc
-+++ b/libcc1/libcp1plugin.cc
-@@ -32,6 +32,7 @@
- #undef PACKAGE_TARNAME
- #undef PACKAGE_VERSION
- 
-+#define INCLUDE_MEMORY
- #include "gcc-plugin.h"
- #include "system.h"
- #include "coretypes.h"
diff --git a/pkgs/development/compilers/gcc/12/PR106102-musl-poison-jit.patch b/pkgs/development/compilers/gcc/12/PR106102-musl-poison-jit.patch
deleted file mode 100644
index e4ff25be512..00000000000
--- a/pkgs/development/compilers/gcc/12/PR106102-musl-poison-jit.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=49d508065bdd36fb1a9b6aad9666b1edb5e06474
-https://gcc.gnu.org/PR106102
---- a/gcc/jit/jit-playback.cc
-+++ b/gcc/jit/jit-playback.cc
-@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3.  If not see
- <http://www.gnu.org/licenses/>.  */
- 
- #include "config.h"
-+#define INCLUDE_PTHREAD_H
- #include "system.h"
- #include "coretypes.h"
- #include "target.h"
-@@ -41,8 +42,6 @@ along with GCC; see the file COPYING3.  If not see
- #include "diagnostic.h"
- #include "stmt.h"
- 
--#include <pthread.h>
--
- #include "jit-playback.h"
- #include "jit-result.h"
- #include "jit-builtins.h"
---- a/gcc/jit/jit-recording.cc
-+++ b/gcc/jit/jit-recording.cc
-@@ -19,13 +19,13 @@ along with GCC; see the file COPYING3.  If not see
- <http://www.gnu.org/licenses/>.  */
- 
- #include "config.h"
-+#define INCLUDE_PTHREAD_H
- #include "system.h"
- #include "coretypes.h"
- #include "tm.h"
- #include "pretty-print.h"
- #include "toplev.h"
- 
--#include <pthread.h>
- 
- #include "jit-builtins.h"
- #include "jit-recording.h"
---- a/gcc/jit/libgccjit.cc
-+++ b/gcc/jit/libgccjit.cc
-@@ -19,12 +19,12 @@ along with GCC; see the file COPYING3.  If not see
- <http://www.gnu.org/licenses/>.  */
- 
- #include "config.h"
-+#define INCLUDE_PTHREAD_H
- #include "system.h"
- #include "coretypes.h"
- #include "timevar.h"
- #include "typed-splay-tree.h"
- #include "cppbuiltin.h"
--#include <pthread.h>
- 
- #include "libgccjit.h"
- #include "jit-recording.h"
---- a/gcc/system.h
-+++ b/gcc/system.h
-@@ -753,6 +753,10 @@ extern int vsnprintf (char *, size_t, const char *, va_list);
- #endif
- #endif
- 
-+#ifdef INCLUDE_PTHREAD_H
-+#include <pthread.h>
-+#endif
-+
- #ifdef INCLUDE_ISL
- #ifdef HAVE_isl
- #include <isl/options.h>
diff --git a/pkgs/development/compilers/gcc/12/default.nix b/pkgs/development/compilers/gcc/12/default.nix
index 7e87b4ff57a..7838d870d5d 100644
--- a/pkgs/development/compilers/gcc/12/default.nix
+++ b/pkgs/development/compilers/gcc/12/default.nix
@@ -54,7 +54,7 @@ with lib;
 with builtins;
 
 let majorVersion = "12";
-    version = "${majorVersion}.1.0";
+    version = "${majorVersion}.2.0";
 
     inherit (stdenv) buildPlatform hostPlatform targetPlatform;
 
@@ -66,12 +66,12 @@ let majorVersion = "12";
         ../gnat-cflags-11.patch
         ../gcc-12-gfortran-driving.patch
         ../ppc-musl.patch
-        # Backports. Should be removed with 12.2.0 release:
-        ./PR106102-musl-poison-cpp.patch
-        ./PR106102-musl-poison-jit.patch
       ] ++ optional (stdenv.isDarwin && stdenv.isAarch64) (fetchpatch {
-        url = "https://github.com/Homebrew/formula-patches/raw/76677f2b/gcc/gcc-12.1.0-arm.diff";
-        sha256 = "sha256-IcCYHSCAElJqTAZELJnRRWo0/SlkgQzSvoMjYr3pgD0=";
+        # TODO: switch back to Homebrew patches:
+        #   was "https://github.com/Homebrew/formula-patches/raw/76677f2b/gcc/gcc-12.1.0-arm.diff"
+        name = "gcc-12-darwin-aarch64-support.patch";
+        url = "https://github.com/tjni/gcc-12-branch/compare/releases/gcc-12.2...gcc-12-2-darwin.diff";
+        sha256 = "sha256-hjM9q6tsdzoGOQWJ7v3BaeVxdWQGTaEnep2ZSwX5+74=";
       })
       ++ optional langD ../libphobos.patch
 
@@ -93,7 +93,7 @@ stdenv.mkDerivation ({
 
   src = fetchurl {
     url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
-    sha256 = "sha256-Yv1jSInzHAK2SvLEaPBktHrRynhBHEWr5qxLX43RnHs=";
+    sha256 = "sha256-5UnPnPNZSgDie2WJ1DItcOByDN0hPzm+tBgeBpJiMP8=";
   };
 
   inherit patches;