Friday, March 03, 2023

Update devel/arm-none-eabi/binutils

I'm trying to update the aarch64 cross-compile binutils port to
something a bit more recent as I'm running into some issues building
upstream u-boot. I picked version 2.40 since that is what we use for
devel/binutils and devel/risc-elf/binutils. Diff below seems to do
the trick, except that it leads to conflicts regarding the new entries
in the PLIST file (they conflict with the risc-elf version).

What is the solution there? Just leave them out of the PLIST? Should
they be removed from the risc-elf PLIST as well?


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/arm-none-eabi/binutils/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile 11 Mar 2022 18:49:35 -0000 1.8
+++ Makefile 3 Mar 2023 11:24:25 -0000
@@ -1,6 +1,6 @@
COMMENT= binutils for ${CONFIG} cross-development

-VERSION= 2.31.1
+VERSION= 2.40
DISTNAME= binutils-${VERSION}

FLAVORS= aarch64 arm
@@ -16,16 +16,19 @@ ERRORS+= "either aarch64 or arm FLAVOR s

HOMEPAGE= https://www.gnu.org/software/binutils/

-WANTLIB= c z
+WANTLIB= c

MASTER_SITES= ${MASTER_SITE_GNU:=binutils/}
DIST_SUBDIR= binutils
+EXTRACT_SUFX= .tar.xz

+USE_GMAKE= Yes
USE_LIBTOOL= No

CONFIGURE_ARGS+=--enable-commonbfdlib=no \
--enable-interwork \
- --enable-multilib
+ --enable-multilib \
+ --without-zstd

SUBST_VARS += CONFIG

Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/arm-none-eabi/binutils/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 31 Jan 2021 11:26:40 -0000 1.4
+++ distinfo 3 Mar 2023 11:24:25 -0000
@@ -1,2 +1,2 @@
-SHA256 (binutils/binutils-2.31.1.tar.bz2) = /8w4JpW/lH2mE150NrjtUtmRzycNuJcZDxnW+YOFZNA=
-SIZE (binutils/binutils-2.31.1.tar.bz2) = 30110779
+SHA256 (binutils/binutils-2.40.tar.xz) = D4pMJy1/F/Np3tEKSsoouOMEgo6VUm2kgrDMxN/J2OE=
+SIZE (binutils/binutils-2.40.tar.xz) = 25241484
Index: patches/patch-bfd_Makefile_in
===================================================================
RCS file: patches/patch-bfd_Makefile_in
diff -N patches/patch-bfd_Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-bfd_Makefile_in 3 Mar 2023 11:24:25 -0000
@@ -0,0 +1,12 @@
+Index: bfd/Makefile.in
+--- bfd/Makefile.in.orig
++++ bfd/Makefile.in
+@@ -266,7 +266,7 @@ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 =
+ am__dirstamp = $(am__leading_dot)dirstamp
+-INFO_DEPS = doc/bfd.info
++INFO_DEPS =
+ am__TEXINFO_TEX_DIR = $(srcdir)
+ DVIS = doc/bfd.dvi
+ PDFS = doc/bfd.pdf
Index: patches/patch-binutils_Makefile_in
===================================================================
RCS file: patches/patch-binutils_Makefile_in
diff -N patches/patch-binutils_Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-binutils_Makefile_in 3 Mar 2023 11:24:25 -0000
@@ -0,0 +1,12 @@
+Index: binutils/Makefile.in
+--- binutils/Makefile.in.orig
++++ binutils/Makefile.in
+@@ -404,7 +404,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 =
+-INFO_DEPS = doc/binutils.info
++INFO_DEPS =
+ am__TEXINFO_TEX_DIR = $(srcdir)
+ DVIS = doc/binutils.dvi
+ PDFS = doc/binutils.pdf
Index: patches/patch-gas_Makefile_in
===================================================================
RCS file: patches/patch-gas_Makefile_in
diff -N patches/patch-gas_Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-gas_Makefile_in 3 Mar 2023 11:24:25 -0000
@@ -0,0 +1,12 @@
+Index: gas/Makefile.in
+--- gas/Makefile.in.orig
++++ gas/Makefile.in
+@@ -270,7 +270,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 =
+-INFO_DEPS = doc/as.info
++INFO_DEPS =
+ TEXINFO_TEX = $(top_srcdir)/../texinfo.tex
+ am__TEXINFO_TEX_DIR = $(top_srcdir)/..
+ DVIS = doc/as.dvi
Index: patches/patch-gprof_Makefile_in
===================================================================
RCS file: /cvs/ports/devel/arm-none-eabi/binutils/patches/patch-gprof_Makefile_in,v
retrieving revision 1.4
diff -u -p -r1.4 patch-gprof_Makefile_in
--- patches/patch-gprof_Makefile_in 11 Mar 2022 18:49:35 -0000 1.4
+++ patches/patch-gprof_Makefile_in 3 Mar 2023 11:24:25 -0000
@@ -1,7 +1,7 @@
Index: gprof/Makefile.in
--- gprof/Makefile.in.orig
+++ gprof/Makefile.in
-@@ -216,7 +216,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+@@ -217,7 +217,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
am__v_texidevnull_0 = > /dev/null
am__v_texidevnull_1 =
Index: patches/patch-ld_Makefile_in
===================================================================
RCS file: /cvs/ports/devel/arm-none-eabi/binutils/patches/patch-ld_Makefile_in,v
retrieving revision 1.4
diff -u -p -r1.4 patch-ld_Makefile_in
--- patches/patch-ld_Makefile_in 11 Mar 2022 18:49:35 -0000 1.4
+++ patches/patch-ld_Makefile_in 3 Mar 2023 11:24:25 -0000
@@ -1,7 +1,7 @@
Index: ld/Makefile.in
--- ld/Makefile.in.orig
+++ ld/Makefile.in
-@@ -273,7 +273,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+@@ -301,7 +301,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
am__v_texidevnull_0 = > /dev/null
am__v_texidevnull_1 =
Index: patches/patch-libiberty_Makefile_in
===================================================================
RCS file: /cvs/ports/devel/arm-none-eabi/binutils/patches/patch-libiberty_Makefile_in,v
retrieving revision 1.3
diff -u -p -r1.3 patch-libiberty_Makefile_in
--- patches/patch-libiberty_Makefile_in 11 Mar 2022 18:49:35 -0000 1.3
+++ patches/patch-libiberty_Makefile_in 3 Mar 2023 11:24:25 -0000
@@ -1,7 +1,7 @@
Index: libiberty/Makefile.in
--- libiberty/Makefile.in.orig
+++ libiberty/Makefile.in
-@@ -355,7 +355,7 @@ libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
+@@ -376,7 +376,7 @@ libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
@MAINT@ echo stamp > stamp-functions

INSTALL_DEST = @INSTALL_DEST@
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/arm-none-eabi/binutils/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- pkg/PLIST 11 Mar 2022 18:49:35 -0000 1.5
+++ pkg/PLIST 3 Mar 2023 11:24:25 -0000
@@ -28,6 +28,10 @@ ${CONFIG}/bin/
@bin bin/${CONFIG}-size
@bin bin/${CONFIG}-strings
@bin bin/${CONFIG}-strip
+@info info/ctf-spec.info
+@info info/sframe-spec.info
+lib/bfd-plugins/
+@static-lib lib/bfd-plugins/libdep.a
@man man/man1/${CONFIG}-addr2line.1
@man man/man1/${CONFIG}-ar.1
@man man/man1/${CONFIG}-as.1

No comments:

Post a Comment