Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions fcode-utils/0001-fixes-compiling-with-gcc-15.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
From 2ce5a550cb998ce63ed049ed1fcb9106ecadf234 Mon Sep 17 00:00:00 2001
From: Yonggang Luo <luoyonggang@gmail.com>
Date: Mon, 5 Jan 2026 12:14:31 +0800
Subject: [PATCH] fixes compiling with gcc 15

---
detok/detok.c | 2 +-
toke/conditl.c | 2 +-
toke/nextfcode.c | 2 +-
toke/scanner.c | 2 +-
toke/ticvocab.h | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/detok/detok.c b/detok/detok.c
index c3b5fb6..01fdfbf 100644
--- a/detok/detok.c
+++ b/detok/detok.c
@@ -60,7 +60,7 @@ bool show_offsets = false;
* TRUE preceding error-exit */
static void print_copyright(bool is_error)
{
- typedef void (*vfunct) (); /* Pointer to function returning void */
+ typedef void (*vfunct) (char *); /* Pointer to function returning void */
vfunct pfunct;
char buffr[512];

diff --git a/toke/conditl.c b/toke/conditl.c
index b491310..842a8f6 100644
--- a/toke/conditl.c
+++ b/toke/conditl.c
@@ -594,7 +594,7 @@ static void conditionally_tokenize( bool cond, bool alr_ign )

static void conditional_word_in_line( bool alr_ign,
bool exist_test,
- bool (*exist_funct)() )
+ bool (*exist_funct)(char *) )
{
if ( get_word_in_line( statbuf) )
{
diff --git a/toke/nextfcode.c b/toke/nextfcode.c
index d0bbacb..7c01fcf 100644
--- a/toke/nextfcode.c
+++ b/toke/nextfcode.c
@@ -369,7 +369,7 @@ void list_fcode_ranges( bool final_tally)
}else{ /* List the collection of Ranges */

/* Pionter to function returning void */
- typedef void (*vfunct)();
+ typedef void (*vfunct)(char *, unsigned int);

/* Function for the started_at() part of the message */
vfunct start_at_funct =
diff --git a/toke/scanner.c b/toke/scanner.c
index 2bc1047..46d327d 100644
--- a/toke/scanner.c
+++ b/toke/scanner.c
@@ -343,7 +343,7 @@ typedef struct source_state
unsigned int old_lineno;
bool pause_before_pop;
bool sav_rep_multlin;
- void (*resump_func)();
+ void (*resump_func)(_PTR);
_PTR resump_param;
} source_state_t ;

diff --git a/toke/ticvocab.h b/toke/ticvocab.h
index a53e092..d9a6ec5 100644
--- a/toke/ticvocab.h
+++ b/toke/ticvocab.h
@@ -179,7 +179,7 @@ typedef struct tic_hdr
{
char *name;
struct tic_hdr *next;
- void (*funct)(); /* Function for active processing */
+ void (*funct)(tic_param_t); /* Function for active processing */
tic_param_t pfield;
fwtoken fword_defr; /* FWord Token of entry's Definer */
bool is_token; /* Is entry a single-token FCode? */
@@ -278,7 +278,7 @@ typedef struct tic_bool_hdr
tic_bool_param_t pfield;
fwtoken fword_defr;
bool is_token; /* Is entry a single-token FCode? */
- void (*ign_func)();
+ void (*ign_func)(tic_bool_param_t);
int pfld_size;
bool tracing; /* TRUE if Invoc'n Msg required */
} tic_bool_hdr_t ;
--
2.52.0.windows.1

39 changes: 30 additions & 9 deletions fcode-utils/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,47 @@

pkgname="fcode-utils"
pkgver=1.0.3
pkgrel=1
pkgrel=2
pkgdesc="The OpenBIOS FCODE suite"
arch=('i686' 'x86_64')
url="https://www.openbios.org/"
msys2_repository_url="https://github.com/openbios/fcode-utils"
license=('GPL2')
makedepends=('make' 'gcc')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/openbios/fcode-utils/archive/v${pkgver}.tar.gz")
sha256sums=('9a37771b0547f7b5110069f1653aacca60335daae1dba2a7a9edc99a54227a0b')
makedepends=('make' 'gcc' 'git')
_commit='545fdf1faedc5fb5342a3ea44a043edde501c3eb'

source=("fcode-utils"::"git+https://github.com/openbios/fcode-utils.git#commit=$_commit"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the git version needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, because it's did not released for a long while.

and needs patches for building with gcc 15.x

0001-fixes-compiling-with-gcc-15.patch)

sha256sums=('ec3802d00b81361a73a1dff8baa4bad75f20ce8f4b25c31de5cb70385f75d40e'
'c1c7b17df18d49741884c3c37cb1192ad86a04e90e08443d408016cc00c50ed3')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _fname in "$@"
do
msg2 "Applying ${_fname}"
patch -Nbp1 -i "${srcdir}"/${_fname}
done
}

prepare() {
cd ${srcdir}/${pkgname}
apply_patch_with_msg \
0001-fixes-compiling-with-gcc-15.patch
}

build() {
cd ${srcdir}/${pkgname}-${pkgver}
cd ${srcdir}/${pkgname}
CFLAGS="-O2 -Wall -Wno-incompatible-pointer-types" \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't override CFLAGS, just add something if needed

make -j1
}

package() {
cd ${srcdir}/${pkgname}-${pkgver}
cd ${srcdir}/${pkgname}
mkdir -p ${pkgdir}/usr/bin

cp -rf ${srcdir}/${pkgname}-${pkgver}/toke/toke.exe ${pkgdir}/usr/bin/
cp -rf ${srcdir}/${pkgname}-${pkgver}/detok/detok.exe ${pkgdir}/usr/bin/
cp -rf ${srcdir}/${pkgname}-${pkgver}/romheaders/romheaders.exe ${pkgdir}/usr/bin/
cp -rf ${srcdir}/${pkgname}/toke/toke.exe ${pkgdir}/usr/bin/
cp -rf ${srcdir}/${pkgname}/detok/detok.exe ${pkgdir}/usr/bin/
cp -rf ${srcdir}/${pkgname}/romheaders/romheaders.exe ${pkgdir}/usr/bin/
}