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
40 changes: 40 additions & 0 deletions srcpkgs/edk2-ovmf/patches/fix-nasm-3-push-qword.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 9ccf8751a74f26142e584c7b7c7572a182b67997 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 3 Nov 2025 09:56:52 +0100
Subject: [PATCH] UefiCpuPkg/CpuExceptionHandlerLib: fix push instructions

Nasm 3.0 complains about 'dword' being invalid. The comment talks about
a '8-byte value' so 'qword' should be correct here.

With this change the extra comment explaining that the instruction
actually pushes an 8-byte value despite the 'dword' keyword is not
needed any more. Drop it.

Fixes: https://github.com/tianocore/edk2/issues/11635
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
.../CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm
index 3d64ac908010..671ed98f8525 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm
@@ -57,7 +57,7 @@ ALIGN 8
AsmIdtVectorBegin:
%assign Vector 0
%rep 256
- push strict dword %[Vector] ; This instruction pushes sign-extended 8-byte value on stack
+ push strict qword %[Vector]
push rax
%ifdef NO_ABSOLUTE_RELOCS_IN_TEXT
mov rax, strict qword 0 ; mov rax, ASM_PFX(CommonInterruptEntry)
@@ -70,7 +70,7 @@ AsmIdtVectorBegin:
AsmIdtVectorEnd:

HookAfterStubHeaderBegin:
- push strict dword 0 ; 0 will be fixed
+ push strict qword 0 ; 0 will be fixed
VectorNum:
push rax
%ifdef NO_ABSOLUTE_RELOCS_IN_TEXT
10 changes: 5 additions & 5 deletions srcpkgs/fonts-roboto-ttf/template
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Template file for 'fonts-roboto-ttf'
pkgname=fonts-roboto-ttf
version=3.012
revision=2
version=3.015
revision=1
depends="font-util"
short_desc="Google's signature family of fonts"
maintainer="travankor <travankor@tuta.io>"
license="Apache-2.0"
license="OFL-1.1"
homepage="https://fonts.google.com/specimen/Roboto"
distfiles="https://github.com/googlefonts/roboto-3-classic/releases/download/v${version}/Roboto_v${version}.zip
https://github.com/googlefonts/RobotoMono/archive/refs/tags/v3.001.tar.gz"
checksum="fda623da606ee230c84dab1c79e534341557510663c81b56ba57a320d36cbc2d
checksum="bee3e9334ea86dd63e184598f31fb16750881c2da1a6f097a66e0f66a95b3d54
677d8513918572700531a3115f721a416557a5c701b150abc4d118a7177c8bdc"
font_dirs="/usr/share/fonts/roboto"
provides="font:sans-serif-0_1 font:monospace-0_1"

do_install() {
vmkdir usr/share/fonts/roboto
vcopy hinted/*.ttf usr/share/fonts/roboto
vcopy hinted/static/*.ttf usr/share/fonts/roboto
vcopy RobotoMono*/fonts/otf/*.otf usr/share/fonts/roboto
}
1 change: 1 addition & 0 deletions srcpkgs/libretro-mupen64plus/template
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ license="GPL-3.0-or-later"
homepage="http://www.libretro.com/"
distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
broken="Template currently broken"

case "$XBPS_TARGET_MACHINE" in
i686*) hostmakedepends+=" nasm";;
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/libx86emu/template
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ pkgname=libx86emu
version=3.7
revision=1
build_style=gnu-makefile
make_check_target=test
make_install_args="LIBDIR=/usr/lib${XBPS_TARGET_WORDSIZE}"
checkdepends="perl nasm"
short_desc="X86 emulation library"
maintainer="meator <meator.dev@gmail.com>"
license="MIT" # Old Style with legal disclaimer
homepage="https://github.com/wfeldt/libx86emu"
distfiles="https://github.com/wfeldt/libx86emu/archive/refs/tags/${version}.tar.gz"
checksum=03754aede79530baa0e862e1aad5527e9c1bd3371736b1ab5a2bc769e4a3d680
# Some tests fail due to strict golden output comparison.
make_check=no

do_configure() {
rm git2log
Expand Down
77 changes: 77 additions & 0 deletions srcpkgs/nasm/patches/00-musl-bool-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
From 44e89ba9b650b5e1533bca43682e167f51a3511f Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
Date: Sun, 12 Oct 2025 12:48:32 -0700
Subject: [PATCH] compiler.h: drop the stupid C++-style cast-to-bool hack

The C++-style cast-to-bool hack was broken in concept that it doesn't help the
fundamental problem -- implicit conversions are broken for the
backwards compatibility enum definition -- as well as in
implementation, as it misspelled __STDC_VERSION__ as __STDC_VERSION.

The #ifdef bool test *should* have prevented this problem, but
apparently several compilers do define "bool" in <stdbool.h> even when
it is a keyword, in violation of the C23 spec.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
---
include/compiler.h | 27 +++++++--------------------
1 file changed, 7 insertions(+), 20 deletions(-)

diff --git a/include/compiler.h b/include/compiler.h
index 0ecd4e8d..53a9b5c1 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -181,19 +181,10 @@ size_t strlcpy(char *, const char *, size_t);
char * pure_func strrchrnul(const char *, int);
#endif

-#if !defined(__cplusplus) || (__STDC_VERSION >= 202311L)
/* C++ and C23 have bool, false, and true as proper keywords */
+#if !defined(__cplusplus) || (__STDC_VERSION__ >= 202311L)
# ifdef HAVE_STDBOOL_H
-/* If <stdbool.h> exists, include it explicitly to prevent it from
- begin included later, causing the "bool" macro to be defined. */
# include <stdbool.h>
-# ifdef bool
-/* Force bool to be a typedef instead of a macro. What a "clever" hack
- this is... */
- typedef bool /* The macro definition of bool */
-# undef bool
- bool; /* No longer the macro definition */
-# endif
# elif defined(HAVE___BOOL)
typedef _Bool bool;
# define false 0
@@ -201,14 +192,10 @@ char * pure_func strrchrnul(const char *, int);
# else
/* This is a bit dangerous, because casting to this ersatz bool
will not produce the same result as the standard (bool) cast.
- Instead, use the bool() constructor-style macro defined below. */
+ Instead, use the explicit construct !!x instead of relying on
+ implicit conversions or casts. */
typedef enum bool { false, true } bool;
# endif
-/* This amounts to a C++-style conversion cast to bool. This works
- because C ignores an argument-taking macro when used without an
- argument and because bool was redefined as a typedef if it previously
- was defined as a macro (see above.) */
-# define bool(x) ((bool)!!(x))
#endif

/* Create a NULL pointer of the same type as the address of
@@ -321,11 +308,11 @@ static inline void *mempset(void *dst, int c, size_t n)
* less likely to be taken.
*/
#ifdef HAVE___BUILTIN_EXPECT
-# define likely(x) __builtin_expect(bool(x), true)
-# define unlikely(x) __builtin_expect(bool(x), false)
+# define likely(x) __builtin_expect(!!(x), true)
+# define unlikely(x) __builtin_expect(!!(x), false)
#else
-# define likely(x) bool(x)
-# define unlikely(x) bool(x)
+# define likely(x) (!!(x))
+# define unlikely(x) (!!(x))
#endif

#ifdef HAVE___BUILTIN_PREFETCH
26 changes: 26 additions & 0 deletions srcpkgs/nasm/patches/01-musl-c23-test-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 746e7c9efa37cec9a44d84a1e96b8c38f385cc1f Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
Date: Sun, 12 Oct 2025 13:05:55 -0700
Subject: [PATCH] compiler.h: the test for "neither C++ nor C23" still wrong

The test needs to test for neither nor; as it was it tested "(not C++)
or C23" which was not at all what was intended...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
---
include/compiler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/compiler.h b/include/compiler.h
index 53a9b5c1..d4cb7161 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -182,7 +182,7 @@ char * pure_func strrchrnul(const char *, int);
#endif

/* C++ and C23 have bool, false, and true as proper keywords */
-#if !defined(__cplusplus) || (__STDC_VERSION__ >= 202311L)
+#if !defined(__cplusplus) && (__STDC_VERSION__ < 202311L)
# ifdef HAVE_STDBOOL_H
# include <stdbool.h>
# elif defined(HAVE___BOOL)
40 changes: 8 additions & 32 deletions srcpkgs/nasm/template
Original file line number Diff line number Diff line change
@@ -1,55 +1,31 @@
# Template file for 'nasm'
pkgname=nasm
version=2.16.03
version=3.01
revision=1
build_style=gnu-configure
make_build_target="all"
make_check_target="golden test"
checkdepends="perl"
hostmakedepends="groff perl perl-Font-TTF perl-IO-String perl-Sort-Versions
ghostscript fonts-roboto-ttf"
short_desc="80x86 assembler designed for portability and modularity"
maintainer="Rutpiv <roger_freitas@live.com>"
license="BSD-2-Clause"
homepage="https://www.nasm.us"
changelog="https://nasm.us/doc/nasmdocc.html"
distfiles="https://www.nasm.us/pub/nasm/releasebuilds/${version}/nasm-${version}.tar.xz"
checksum=1412a1c760bbd05db026b6c0d1657affd6631cd0a63cddb6f73cc6d4aa616148

build_options="doc"
desc_option_doc="Enable building documentation"
build_options_default="doc"

disable_parallel_check=yes

subpackages=" "

if [ "$build_option_doc" ]; then
subpackages="nasm-doc"
hostmakedepends="groff perl perl-Font-TTF perl-IO-String perl-Sort-Versions
ghostscript source-sans-pro liberation-fonts-ttf"
fi

pre_configure() {
if [ "$build_option_doc" ]; then
vsed -i doc/psfonts.ph -e "s;SourceSansPro;SourceSans3;g"
fi
}
checksum=b7324cbe86e767b65f26f467ed8b12ad80e124e3ccb89076855c98e43a9eddd4
# Tests require files not included in release tarballs.
make_check=no

post_build() {
if [ "$build_option_doc" ]; then
make doc
fi
make doc
}

post_install() {
if [ "$build_option_doc" ]; then
make -C doc DESTDIR="${DESTDIR}" docdir=/usr/share/doc/nasm install
fi
make -C doc DESTDIR="${DESTDIR}" docdir=/usr/share/doc/nasm install
vlicense LICENSE
}

nasm-doc_package() {
short_desc+=" - documentation"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
vmove usr/share/doc/nasm
vlicense LICENSE
Expand Down
1 change: 1 addition & 0 deletions srcpkgs/pcsxr/template
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ homepage="http://pcsxr.codeplex.com/"
distfiles="${DEBIAN_SITE}/main/p/pcsxr/pcsxr_${version}.orig.tar.xz"
checksum=8a366b68a7c236443aa75b422bea84b5115f8d8c23e5a78fd6951e643e90f660
lib32disabled=yes
broken="Template currently broken"

CFLAGS="-fcommon"

Expand Down
1 change: 1 addition & 0 deletions srcpkgs/stepmania/template
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ distfiles="https://github.com/stepmania/stepmania/archive/v${version}.tar.gz
checksum="df79bcadd69d4ed60cf560d45386ec275181343495ffd744c3ff8f73c83d4755
cfafef9c9fb2581ac234fc11da97c677e5a911db4e16b341ab724b7e6aa03b62"
patch_args="-Np1 --directory=${build_wrksrc}"
broken="Template currently broken"

# Upstream has stated that only x86 hardware can meed the performance
# constraints and that musl is not supported due to interop issues
Expand Down