Skip to contentSkip to conversation

cdrtools-native: Fix build with GCC 14

PATCH New Zoltán Böszörményi 1 participant 1 message May 2, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cdrtools-native: Fix build with GCC 14

Add a patch to fix do_configure with GCC 14.
Disable building cdda2wav because it doesn't build with GCC 14.

---
 .../cdrtools/cdrtools-native_3.01.bb                |  6 +++++-
 .../cdrtools/cdrtools/gcc14-fix.patch               | 13 +++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/cdrtools/cdrtools/gcc14-fix.patch
meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb +5 -1
index bf8be1ad0c..b9cb59032a 100644
@@ -13,7 +13,8 @@ DEPENDS += "gnu-config-native"
 SRC_URI = " \
 	${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${PV}.tar.bz2 \
 	file://0001-Don-t-set-uid-gid-during-install.patch \
-        file://riscv64-linux-gcc.rul \
+	file://riscv64-linux-gcc.rul \
+	file://gcc14-fix.patch \
 	"
 
 SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
@@ -27,6 +28,9 @@ export ac_cv_prog_CC = "${CC}"
 inherit native
 
 do_configure() {
+        # cdda2wav does not build with GCC 14
+        rm -f ${S}/TARGETS/55cdda2wav
+
         install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/autoconf
         install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/autoconf
         install -m 0644 ${WORKDIR}/riscv64-linux-gcc.rul ${S}/RULES/
meta/recipes-devtools/cdrtools/cdrtools/gcc14-fix.patch new file +13 -0
new file mode 100644
index 0000000000..ce02bb8bcf
@@ -0,0 +1,13 @@
+Signed-off-by: Zoltán Böszörményi <[email protected]>
+Upstream-Status: Inappropriate [native]
+--- cdrtools-3.01/autoconf/configure~	2015-07-06 23:41:27.000000000 +0200
++++ cdrtools-3.01/autoconf/configure	2024-05-01 09:37:40.897253690 +0200
+@@ -1205,7 +1205,7 @@
+ #line 1206 "configure"
+ #include "confdefs.h"
+ 
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:1211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
Signature · 1 line
2.44.0