Re: [PATCH v2 2/4] gnu: Add arm-none-eabi-gcc-6 and patches.

2016-10-10 Thread Ricardo Wurmus

Hi Theodoros,

> * gnu/packages/embedded.scm (gcc-arm-none-eabi-6): New variable.
> * gnu/packages/patches/gcc-arm-none-eabi-multilib.patch : New file.
> * gnu/packages/patches/gcc-6-cross-environment-variables.patch : New file.

[…]

> diff --git a/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch 
> b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
> new file mode 100644
> index 000..442f52b
> --- /dev/null
> +++ b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
> @@ -0,0 +1,201 @@
> +From Anatol Pomozov 
> +Taken from Arch Linux arm-none-eabi-gcc package.
> +
> +Modified version of ARM patch 
> https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00083/enable-with-multilib-list-for-arm.patch
> +

I’m not sure I understand what this patch does.  Could you please
provide an explanation why this patch is needed?  We usually add short
explanations to the top of each patch.

(No need to resend the patch set; I can add it myself.)

Thanks!

~~ Ricardo



[PATCH v2 2/4] gnu: Add arm-none-eabi-gcc-6 and patches.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/embedded.scm (gcc-arm-none-eabi-6): New variable.
* gnu/packages/patches/gcc-arm-none-eabi-multilib.patch : New file.
* gnu/packages/patches/gcc-6-cross-environment-variables.patch : New file.
---
 gnu/packages/embedded.scm  |  12 ++
 .../patches/gcc-6-arm-none-eabi-multilib.patch | 201 +
 .../gcc-6-cross-environment-variables.patch|  65 +++
 3 files changed, 278 insertions(+)
 create mode 100644 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
 create mode 100644 gnu/packages/patches/gcc-6-cross-environment-variables.patch

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 8650817..56fbafb 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -117,3 +117,15 @@
  (search-path-specification
   (variable "CROSS_LIBRARY_PATH")
   (files '("arm-none-eabi/lib"
+
+(define-public gcc-arm-none-eabi-6
+  (package
+(inherit gcc-arm-none-eabi-4.9)
+(version (package-version gcc-6))
+(source (origin (inherit (package-source gcc-6))
+(patches
+ (append
+  (origin-patches (package-source gcc-6))
+  (cons
+   (search-patch "gcc-6-cross-environment-variables.patch")
+   (search-patches 
"gcc-6-arm-none-eabi-multilib.patch"
diff --git a/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch 
b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
new file mode 100644
index 000..442f52b
--- /dev/null
+++ b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
@@ -0,0 +1,201 @@
+From Anatol Pomozov 
+Taken from Arch Linux arm-none-eabi-gcc package.
+
+Modified version of ARM patch 
https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00083/enable-with-multilib-list-for-arm.patch
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 4ab7405..6e1ea2c 100644
+--- a/gcc/Makefile.in
 b/gcc/Makefile.in
+@@ -535,6 +535,7 @@ lang_opt_files=@lang_opt_files@ $(srcdir)/c-family/c.opt 
$(srcdir)/common.opt
+ lang_specs_files=@lang_specs_files@
+ lang_tree_files=@lang_tree_files@
+ target_cpu_default=@target_cpu_default@
++with_multilib_list=@with_multilib_list@
+ OBJC_BOEHM_GC=@objc_boehm_gc@
+ extra_modes_file=@extra_modes_file@
+ extra_opt_files=@extra_opt_files@
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index cb08a5c..7bded02 100644
+--- a/gcc/config.gcc
 b/gcc/config.gcc
+@@ -1072,7 +1072,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
+   case ${target} in
+   arm*-*-eabi*)
+ tm_file="$tm_file newlib-stdint.h"
+-tmake_file="${tmake_file} arm/t-bpabi"
++tmake_file="${tmake_file} arm/t-bpabi arm/t-mlibs"
+ use_gcc_stdint=wrap
+ ;;
+   arm*-*-rtems*)
+@@ -3684,42 +3684,6 @@ case "${target}" in
+   exit 1
+   fi
+ 
+-  # Add extra multilibs
+-  if test "x$with_multilib_list" != x; then
+-  arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ 
/g'`
+-  for arm_multilib in ${arm_multilibs}; do
+-  case ${arm_multilib} in
+-  aprofile)
+-  # Note that arm/t-aprofile is a
+-  # stand-alone make file fragment to be
+-  # used only with itself.  We do not
+-  # specifically use the
+-  # TM_MULTILIB_OPTION framework because
+-  # this shorthand is more
+-  # pragmatic. Additionally it is only
+-  # designed to work without any
+-  # with-cpu, with-arch with-mode
+-  # with-fpu or with-float options.
+-  if test "x$with_arch" != x \
+-  || test "x$with_cpu" != x \
+-  || test "x$with_float" != x \
+-  || test "x$with_fpu" != x \
+-  || test "x$with_mode" != x ; then
+-  echo "Error: You cannot use any of 
--with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile" 1>&2
+-  exit 1
+-  fi
+-  tmake_file="${tmake_file} 
arm/t-aprofile"
+-  break
+-  ;;
+-  default)
+-  ;;
+-  *)
+-  echo "Error: 
--with-multilib-list=${with_multilib_list} not supported." 1>&2
+- 

[PATCH v2 2/4] gnu: Add arm-none-eabi-gcc-6 and patches.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/embedded.scm (gcc-arm-none-eabi-6): New variable.
* gnu/packages/patches/gcc-arm-none-eabi-multilib.patch : New file.
* gnu/packages/patches/gcc-6-cross-environment-variables.patch : New file.
---
 gnu/packages/embedded.scm  |  12 ++
 .../patches/gcc-6-arm-none-eabi-multilib.patch | 201 +
 .../gcc-6-cross-environment-variables.patch|  65 +++
 3 files changed, 278 insertions(+)
 create mode 100644 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
 create mode 100644 gnu/packages/patches/gcc-6-cross-environment-variables.patch

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 8650817..56fbafb 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -117,3 +117,15 @@
  (search-path-specification
   (variable "CROSS_LIBRARY_PATH")
   (files '("arm-none-eabi/lib"
+
+(define-public gcc-arm-none-eabi-6
+  (package
+(inherit gcc-arm-none-eabi-4.9)
+(version (package-version gcc-6))
+(source (origin (inherit (package-source gcc-6))
+(patches
+ (append
+  (origin-patches (package-source gcc-6))
+  (cons
+   (search-patch "gcc-6-cross-environment-variables.patch")
+   (search-patches 
"gcc-6-arm-none-eabi-multilib.patch"
diff --git a/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch 
b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
new file mode 100644
index 000..442f52b
--- /dev/null
+++ b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
@@ -0,0 +1,201 @@
+From Anatol Pomozov 
+Taken from Arch Linux arm-none-eabi-gcc package.
+
+Modified version of ARM patch 
https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00083/enable-with-multilib-list-for-arm.patch
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 4ab7405..6e1ea2c 100644
+--- a/gcc/Makefile.in
 b/gcc/Makefile.in
+@@ -535,6 +535,7 @@ lang_opt_files=@lang_opt_files@ $(srcdir)/c-family/c.opt 
$(srcdir)/common.opt
+ lang_specs_files=@lang_specs_files@
+ lang_tree_files=@lang_tree_files@
+ target_cpu_default=@target_cpu_default@
++with_multilib_list=@with_multilib_list@
+ OBJC_BOEHM_GC=@objc_boehm_gc@
+ extra_modes_file=@extra_modes_file@
+ extra_opt_files=@extra_opt_files@
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index cb08a5c..7bded02 100644
+--- a/gcc/config.gcc
 b/gcc/config.gcc
+@@ -1072,7 +1072,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
+   case ${target} in
+   arm*-*-eabi*)
+ tm_file="$tm_file newlib-stdint.h"
+-tmake_file="${tmake_file} arm/t-bpabi"
++tmake_file="${tmake_file} arm/t-bpabi arm/t-mlibs"
+ use_gcc_stdint=wrap
+ ;;
+   arm*-*-rtems*)
+@@ -3684,42 +3684,6 @@ case "${target}" in
+   exit 1
+   fi
+ 
+-  # Add extra multilibs
+-  if test "x$with_multilib_list" != x; then
+-  arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ 
/g'`
+-  for arm_multilib in ${arm_multilibs}; do
+-  case ${arm_multilib} in
+-  aprofile)
+-  # Note that arm/t-aprofile is a
+-  # stand-alone make file fragment to be
+-  # used only with itself.  We do not
+-  # specifically use the
+-  # TM_MULTILIB_OPTION framework because
+-  # this shorthand is more
+-  # pragmatic. Additionally it is only
+-  # designed to work without any
+-  # with-cpu, with-arch with-mode
+-  # with-fpu or with-float options.
+-  if test "x$with_arch" != x \
+-  || test "x$with_cpu" != x \
+-  || test "x$with_float" != x \
+-  || test "x$with_fpu" != x \
+-  || test "x$with_mode" != x ; then
+-  echo "Error: You cannot use any of 
--with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile" 1>&2
+-  exit 1
+-  fi
+-  tmake_file="${tmake_file} 
arm/t-aprofile"
+-  break
+-  ;;
+-  default)
+-  ;;
+-  *)
+-  echo "Error: 
--with-multilib-list=${with_multilib_list} not supported." 1>&2
+-