libqb: Fix build with gold
PATCH 1/2 libqb: Fix build with gold
* since the upgrade to 1.0.3 more specifically since this commit:
https://github.com/ClusterLabs/libqb/commit/20246f544f74866885f4d9491f74152bd95e7786#diff-67e997bcfdac55191033d57a16d1408a
it was failing to build with gold
* add --enable-nosection-fallback to work around the issue
Signed-off-by Martin Jansa <[email protected]>
--- meta-oe/recipes-extended/libqb/libqb_1.0.3.bb | 8 ++++++++ 1 file changed, 8 insertions(+)
meta-oe/recipes-extended/libqb/libqb_1.0.3.bb +8 -0
@@ -18,6 +18,14 @@ SRC_URI = "git://github.com/ClusterLabs/${BPN}.git \ " S = "${WORKDIR}/git" +# otherwise do_configure fails +# configure:21609: checking whether linker workaround for orphan sections usable +# configure:21639: i586-oe-linux-gcc -m32 -march=i586 --sysroot=WORKDIR/libqb/1.0.3+gitAUTOINC+c235284b5f-r0/recipe-sysroot -o conftest -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -fdebug-prefix-map=WORKDIR/libqb/1.0.3+gitAUTOINC+c235284b5f-r0=/usr/src/debug/libqb/1.0.3+gitAUTOINC+c235284b5f-r0 -fdebug-prefix-map=WORKDIR/libqb/1.0.3+gitAUTOINC+c235284b5f-r0/recipe-sysroot= -fdebug-prefix-map=WORKDIR/libqb/1.0.3+gitAUTOINC+c235284b5f-r0/recipe-sysroot-native= -pipe -pthread -D_REENTRANT -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,conftest.ld conftest.c >&5 +# WORKDIR/libqb/1.0.3+gitAUTOINC+c235284b5f-r0/recipe-sysroot-native/usr/bin/i586-oe-linux/../../libexec/i586-oe-linux/gcc/i586-oe-linux/8.1.0/ld: error: conftest.ld: SECTIONS seen after other input files; try -T/--script +# WORKDIR/libqb/1.0.3+gitAUTOINC+c235284b5f-r0/recipe-sysroot-native/usr/bin/i586-oe-linux/../../libexec/i586-oe-linux/gcc/i586-oe-linux/8.1.0/ld: internal error in write_sections, at ../../gold/reloc.cc:791 +# collect2: error: ld returned 1 exit status +EXTRA_OECONF_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' --enable-nosection-fallback', '', d)}" + CFLAGS += "-pthread -D_REENTRANT" do_configure_prepend() { ( cd ${S}
Signature · 1 line
2.17.1
PATCH 2/2 openocd: prevent fetching git submodules during do_configure
* I've tried just disabling them with:
--disable-internal-jimtcl --disable-internal-libjaylink but that still tries to use missing jim.h:
| ./src/helper/jim-nvp.h:47:10: fatal error: jim.h: No such file or directory | #include <jim.h> | ^~~~~~~ | compilation terminated. | Makefile:3619: recipe for target 'src/libopenocd_la-openocd.lo' failed | make[2]: *** [src/libopenocd_la-openocd.lo] Error 1
Signed-off-by Martin Jansa <[email protected]>
--- .../recipes-devtools/openocd/openocd_git.bb | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-)
meta-oe/recipes-devtools/openocd/openocd_git.bb +17 -9
@@ -4,14 +4,22 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS = "libusb-compat libftdi" RDEPENDS_${PN} = "libusb1" -SRC_URI = "git://repo.or.cz/openocd.git \ - file://0001-Add-fallthrough-comments.patch \ - file://0002-Workaround-new-warnings-generated-by-GCC-7.patch \ - file://0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch \ - file://0004-Fix-overflow-warning.patch \ - file://0005-command-Move-the-fall-through-comment-to-right-scope.patch \ +SRC_URI = " \ + git://repo.or.cz/openocd.git;protocol=http;name=openocd \ + git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl \ + git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl \ + git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink \ + file://0001-Add-fallthrough-comments.patch \ + file://0002-Workaround-new-warnings-generated-by-GCC-7.patch \ + file://0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch \ + file://0004-Fix-overflow-warning.patch \ + file://0005-command-Move-the-fall-through-comment-to-right-scope.patch \ " -SRCREV = "1025be363e2bf42f1613083223a2322cc3a9bd4c" +SRCREV_FORMAT = "openocd" +SRCREV_openocd = "1025be363e2bf42f1613083223a2322cc3a9bd4c" +SRCREV_git2cl = "8373c9f74993e218a08819cbcdbab3f3564bbeba" +SRCREV_jimtcl = "a9bf5975fd0f89974d689a2d9ebd0873c8d64787" +SRCREV_libjaylink = "699b7001d34a79c8e7064503dde1bede786fd7f0" PV = "0.10+gitr${SRCPV}" S = "${WORKDIR}/git"
@@ -20,10 +28,10 @@ inherit pkgconfig autotools-brokensep gettext BBCLASSEXTEND += "nativesdk" -EXTRA_OECONF = "--enable-ftdi --disable-doxygen-html " +EXTRA_OECONF = "--enable-ftdi --disable-doxygen-html" do_configure() { - ./bootstrap + ./bootstrap nosubmodule oe_runconf ${EXTRA_OECONF} }
Signature · 1 line
2.17.1