guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

108/160: gnu: Add gcc-mesboot 4.7.4. WIP


From: Jan Nieuwenhuizen
Subject: 108/160: gnu: Add gcc-mesboot 4.7.4. WIP
Date: Tue, 28 Aug 2018 15:56:30 -0400 (EDT)

janneke pushed a commit to branch wip-bootstrap
in repository guix.

commit 2daa20578f2a41172eaa4c9670f1409c576e4330
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Jun 24 20:30:08 2018 +0200

    gnu: Add gcc-mesboot 4.7.4.  WIP
    
    * gnu/packages/mes.scm (gcc-mesboot-4.1.0): Rename from gcc-mesboot.
      (gcc-mesboot): New package.
    * gnu/packages/patches/gcc-boot-4.7.4.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/packages/mes.scm                      | 40 +++++++++++++++++++++++++++-
 gnu/packages/patches/gcc-boot-4.7.4.patch | 43 +++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index e6a35d3..744b10d 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -1100,7 +1100,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
               (sha256 (base32
                        
"0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94"))))))
 
-(define-public gcc-mesboot
+(define-public gcc-mesboot-4.1.0
   (package-with-bootstrap-guile
    (package
      (inherit gcc-mesboot0)
@@ -1240,6 +1240,44 @@ ac_cv_c_float_format='IEEE (little-endian)'
                (zero?
                 (apply system* "./configure" configure-flags)))))))))))
 
+(define-public gcc-mesboot
+  (package-with-bootstrap-guile
+   (package
+     (inherit gcc-mesboot-4.1.0)
+     (name "gcc-mesboot")
+     (version "4.7.4")
+     (source (origin
+               (method url-fetch)
+               (uri (string-append "mirror://gnu/gcc/gcc-4.7.4/gcc-"
+                                   version
+                                   ".tar.gz"))
+               (patches (search-patches "gcc-boot-4.7.4.patch"))
+               (sha256
+                (base32
+                 "06bqygv17f71f7g7pi7ddvhljcr8dimrypgiif9g1r6lqn1sbfnx"))))
+     (native-inputs `(("binutils-boot" ,binutils-mesboot)
+                      ("gcc-boot" ,gcc-mesboot-4.1.0)
+                      ("glibc-boot" ,glibc-mesboot)
+                      ("kernel-headers" ,(linux-libre-headers-boot0))))
+     ;; (inputs `(("gmp-source" ,(package-source gmp))
+     ;;           ("mpfr-source" ,(package-source mpfr-boot))
+     ;;           ("mpc-source" ,(package-source mpc))))
+     (arguments
+      `(
+        ;;#:make-flags (list "LIBGCC2_CFLAGS=-D IN_LIBGCC2" )
+        ,@(substitute-keyword-arguments (package-arguments gcc-mesboot-4.1.0)
+            ((#:configure-flags configure-flags)
+             `(let ((flags (filter (lambda (flag)
+                                     (not (string-prefix? 
"--enable-languages=" flag)))
+                                   ,configure-flags)))
+                (cons*
+                                        ; with gmp-2.4.3 Configuring in
+                 ; host-i386-unknown-linux/gmp configure: error: invalid
+                 ; feature name: libstdc++-v3
+                 ;; "--disable-libstdc++-v3"
+                 ;;"--enable-languages=c,c++"
+                 "--enable-languages=c"
+                 flags)))))))))
 ;;;
 
 (define-public nyacc
diff --git a/gnu/packages/patches/gcc-boot-4.7.4.patch 
b/gnu/packages/patches/gcc-boot-4.7.4.patch
new file mode 100644
index 0000000..76c8c4d
--- /dev/null
+++ b/gnu/packages/patches/gcc-boot-4.7.4.patch
@@ -0,0 +1,43 @@
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index f3cc49fdb18..bc5718fc9a6 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -458,7 +458,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
+ LTO_SYMTAB_H = $(srcdir)/../include/lto-symtab.h
+ 
+ # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
+-NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
++# NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
+ # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
+ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+ 
+diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c
+index 94b7a0b89a7..ab2baab55ca 100644
+--- a/gcc/config/host-linux.c
++++ b/gcc/config/host-linux.c
+@@ -23,6 +23,12 @@
+ #include "hosthooks.h"
+ #include "hosthooks-def.h"
+ 
++// ../.././gcc/config/host-linux.c:213: `SSIZE_MAX' undeclared (first
++// use in this function)
++#include <limits.h>
++#ifndef       SSIZE_MAX
++# define SSIZE_MAX    LONG_MAX
++#endif
+ 
+ /* Linux has a feature called exec-shield-randomize that perturbs the
+    address of non-fixed mapped segments by a (relatively) small amount.
+diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
+index c301ff03cae..f86318c3bd5 100644
+--- a/libgcc/Makefile.in
++++ b/libgcc/Makefile.in
+@@ -225,7 +225,7 @@ endif
+ LIBGCC2_DEBUG_CFLAGS = -g
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) 
\
+                $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
+-               -fbuilding-libgcc -fno-stack-protector \
++               -fno-stack-protector \
+                $(INHIBIT_LIBC_CFLAGS)
+ 
+ # Additional options to use when compiling libgcc2.a.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]