[OE-core] [PATCH v3] binutils: Upgrade to 2.34 release

Khem Raj raj.khem at gmail.com
Thu Feb 20 17:07:11 UTC 2020



On 2/20/20 12:07 AM, Peter Kjellerstedt wrote:
>> -----Original Message-----
>> From: openembedded-core-bounces at lists.openembedded.org <openembedded-core-
>> bounces at lists.openembedded.org> On Behalf Of Khem Raj
>> Sent: den 19 februari 2020 23:43
>> To: openembedded-core at lists.openembedded.org
>> Cc: Christopher Clark <christopher.clark6 at baesystems.com>
>> Subject: [OE-core] [PATCH v3] binutils: Upgrade to 2.34 release
>>
>> Details of changelog [1]
>>
>> Removing bfd/ld patch to ebale pe targets instead use
> 
> Change "ebale" to "enable".
> 

Will be in v4

>> specific emulations via --enable-targets for x86_64
>>
>> Re-arrange/forward-port patches and upgrade libctf configure to libtool
>> 2.4 patch
>>
>> rpaths are no longer emitted into elfedit/readelf therefore no need of
>> chrpath anymore
>>
>> Instead of pre-generating configure scripts and house them in libtool
>> patch, generate them during configure. This also ensures that we do not
>> patch configure directly but rather the sources which generate it
>>
>> Package newly added libctf library
>>
>> [1] https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00000.html
>>
>> Signed-off-by: Khem Raj <mailto:raj.khem at gmail.com>
>> Cc: Christopher Clark <mailto:christopher.clark6 at baesystems.com>
>> ---
>> v2: Fix libtool patch and drop EFI patch for configure option
>> v3: Make libtool patch not generate configure, fix packaging
> 
> [cut]
> 
>> diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
>> index a4b9aa586d..b070d85e15 100644
>> --- a/meta/recipes-devtools/binutils/binutils.inc
>> +++ b/meta/recipes-devtools/binutils/binutils.inc
>> @@ -13,17 +13,12 @@ LICENSE = "GPLv3"
>>
>>   DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native"
>>
>> -#
>> -# we need chrpath > 0.14 and some distros like centos 7 still have older chrpath
>> -#
>> -DEPENDS_append_class-target = " chrpath-replacement-native"
>> -EXTRANATIVEPATH_append_class-target = " chrpath-native"
>> -
>>   inherit autotools gettext multilib_header texinfo
>>
>>   FILES_${PN} = " \
>>   	${bindir}/${TARGET_PREFIX}* \
>> -	${libdir}/lib*-*.so \
>> +	${libdir}/lib*.so.* \
>> +	${libdir}/lib*-${PV}*.so \
>>   	${prefix}/${TARGET_SYS}/bin/* \
>>           ${bindir}/embedspu"
>>
>> @@ -33,6 +28,8 @@ FILES_${PN}-dev = " \
>>   	${includedir} \
>>   	${libdir}/*.la \
>>   	${libdir}/libbfd.so \
>> +	${libdir}/libctf.so \
>> +	${libdir}/libctf-nobfd.so \
>>   	${libdir}/libopcodes.so"
>>
>>   # Rather than duplicating multiple entries for these, make one
>> @@ -80,6 +77,8 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
>>                   ${LDGOLD} \
>>                   mailto:${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
>>
>> +EXTRA_OECONF_append_x86-64 = " --enable-targets=x86_64-pe,x86_64-pep "
>> +
>>   LDGOLD_class-native = ""
>>   LDGOLD_class-crosssdk = ""
>>   LDGOLD ?= "mailto:${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
>> @@ -112,7 +111,14 @@ export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}"
>>   MULTIARCH := "mailto:${@bb.utils.contains("DISTRO_FEATURES", "multiarch", "yes", "no", d)}"
>>   do_configure[vardeps] += "MULTIARCH"
>>   do_configure () {
>> -	(cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
>> +	(for d in . bfd binutils gas gold gprof ld libctf opcodes; do
>> +            cd ${S}/$d
>> +            autoconf
>> +            rm -rf autom4te.cache
>> +        done
>> +        cd ${S}
>> +        gnu-configize)
>> +
> 
> Correct the indentation to use tabs.
> 

in v4

> There are also some patches below that still modify configure, which
> shouldn't be needed with the introduction of autoconf above.
> 

thats intentional. Ideally all patches should modify configure since 
that will be needed if they are upstreamed. However, libtool 2.4 is 
quite intrusive where it has to be regenerated almost everytime it is 
rebased on top of latest binutils.

>>   	oe_runconf
>>   #
>>   # must prime config.cache to ensure the build of libiberty
>> @@ -123,10 +129,6 @@ do_configure () {
>>   	done
>>   }
>>
>> -do_compile_append_class-target() {
>> -	chrpath -d ${B}/binutils/elfedit
>> -	chrpath -d ${B}/binutils/readelf
>> -}
>>   do_install () {
>>   	autotools_do_install
>>
>> diff --git a/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
>> index 3a9461bf4a..a36c259711 100644
>> --- a/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
>> +++ b/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
>> @@ -1,7 +1,7 @@
>> -From c9aed4cb3c02715b2ba1fc70949043849f202f46 Mon Sep 17 00:00:00 2001
>> +From 9caa0964b6f50411d1b4520a31461cd0a87810fd Mon Sep 17 00:00:00 2001
>>   From: Khem Raj <mailto:raj.khem at gmail.com>
>> -Date: Sun, 8 Dec 2019 00:31:35 -0800
>> -Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
>> +Date: Mon, 2 Mar 2015 01:58:54 +0000
>> +Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs
>>
>>   This patch will modify the ELF linker scripts so that the crosssdk
>>   linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
> 
> [cut]
> 
>> @@ -57,3 +57,6 @@ index f9f0f7d402..9e469dca86 100644
>>    fi
>>    if test -z "$PLT"; then
>>      IPLT=".iplt         ${RELOCATING-0} : { *(.iplt) }"
>> +--
>> +2.25.1
>> +
> 
> May I suggest that you continue to use --no-signature and --no-numbered as
> options to git format-patch to avoid unnecessary changes to the patches?
> 

I guess yes will be in v4

>   [cut]
> 
>> diff --git a/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch b/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
>> new file mode 100644
>> index 0000000000..82906026a9
>> --- /dev/null
>> +++ b/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
>> @@ -0,0 +1,7118 @@
>> +From c0ec70962bffb56b563475f539e8175ea97d7eb1 Mon Sep 17 00:00:00 2001
>> +From: Khem Raj <raj.khem at gmail.com>
>> +Date: Sun, 14 Feb 2016 17:04:07 +0000
>> +Subject: [PATCH 07/15] Use libtool 2.4
>> +
>> +get libtool sysroot support
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Khem Raj <raj.khem at gmail.com>
>> +---
>> + bfd/configure.ac |    2 +-
>> + libtool.m4       | 1080 +++++++++++------
>> + ltmain.sh        | 2925 +++++++++++++++++++++++++++++++---------------
>> + ltoptions.m4     |    2 +-
>> + ltversion.m4     |   12 +-
>> + lt~obsolete.m4   |    2 +-
> 
> Wouldn't it be better to run automake --add-missing --copy instead
> (or autoreconf)? That way you would get rid of all the patches to
> Makefile.in as well.

As said above, we only want to regenerate configure, nothing else, there 
are different versions of gettext etc would be needed to fully 
reconfigure it and its version specific.

> 
>> + 6 files changed, 2717 insertions(+), 1306 deletions(-)
>> +
> 
> [cut]
> 
> //Peter
> 


More information about the Openembedded-core mailing list