Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/mpg123: remove MMU dependency
@ 2026-09-26 13:00 Bernd Kuhls
  2026-10-04  7:07 ` Thomas Petazzoni via buildroot
  2026-10-10  9:23 ` Thomas Perale via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2026-09-26 13:00 UTC (permalink / raw)
  To: buildroot; +Cc: Hiroshi Kawashima

Buildroot commit f0862592b3caf5bc9cd347fd29634673cfbbabd7 added the
dependency to BR2_USE_MMU in 2014.
Upstream made fork() optional in 2022:
https://github.com/madebr/mpg123/commit/91f75fc026e37d88d25229b81c58bcf8d6d2a8eb

This change reveals a previously hidden build error with the toolchain
bootlin-armv7m-uclibc:

src/libmpg123/synth_arm_accurate.S: Assembler messages:
src/libmpg123/synth_arm_accurate.S:22: Error: selected processor does
 not support ARM opcodes
src/libmpg123/synth_arm_accurate.S:31: Error: attempt to use an ARM
 instruction on a Thumb-only processor --
 `stmfd sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr}'
src/libmpg123/synth_arm_accurate.S:33: Error: attempt to use an ARM
 instruction on a Thumb-only processor -- `add r0,r0,#64'
[...]

To fix the problem we limit ARM code to !BR2_ARM_INSTRUCTIONS_THUMB2.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Gitlab pipelines for mpg123 passed:
https://gitlab.com/bkuhls/buildroot/-/commits/85dfb60e8f4fbe0caa74674d91c54400c288ec10

Gitlab pipelines for squeezelite passed:
https://gitlab.com/bkuhls/buildroot/-/commits/f5549196dd9e923e3c83e809a5e170da44551c75

with the exception of an unrelated build error at
bootlin-x86-i686-musl/build/ffmpeg-6.1.5/.stamp_built

/builds/bkuhls/buildroot/br-test-pkg/bootlin-x86-i686-musl/host/opt/ext-toolchain/bin/../lib/gcc/i686-buildroot-linux-musl/15.3.0/../../../../i686-buildroot-linux-musl/bin/ld:
 read-only segment has dynamic relocations
collect2: error: ld returned 1 exit status

 package/mpg123/Config.in      | 1 -
 package/mpg123/mpg123.mk      | 2 +-
 package/squeezelite/Config.in | 2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/package/mpg123/Config.in b/package/mpg123/Config.in
index 73ca1c740c..8cbc3a4758 100644
--- a/package/mpg123/Config.in
+++ b/package/mpg123/Config.in
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_MPG123
 	bool "mpg123"
-	depends on BR2_USE_MMU # fork - in the application
 	help
 	  Fast, free and portable MPEG audio player for Unix. It
 	  supports MPEG 1.0/2.0 layers 1, 2 and 3.
diff --git a/package/mpg123/mpg123.mk b/package/mpg123/mpg123.mk
index 17445395ae..0318cb4810 100644
--- a/package/mpg123/mpg123.mk
+++ b/package/mpg123/mpg123.mk
@@ -26,7 +26,7 @@ ifeq ($(BR2_aarch64),y)
 MPG123_CPU = aarch64
 endif
 
-ifeq ($(BR2_arm),y)
+ifeq ($(BR2_arm)x$(BR2_ARM_INSTRUCTIONS_THUMB2),yx)
 ifeq ($(or $(BR2_ARM_CPU_HAS_NEON),$(BR2_ARM_CPU_HAS_VFPV2)),y)
 MPG123_CPU = arm_fpu
 else
diff --git a/package/squeezelite/Config.in b/package/squeezelite/Config.in
index a034759143..0bdc43ce6c 100644
--- a/package/squeezelite/Config.in
+++ b/package/squeezelite/Config.in
@@ -2,7 +2,6 @@ config BR2_PACKAGE_SQUEEZELITE
 	bool "squeezelite"
 	depends on BR2_USE_WCHAR # flac
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
-	depends on BR2_USE_MMU # mpg123
 	depends on !BR2_STATIC_LIBS # dlopen
 	select BR2_PACKAGE_ALSA_LIB
 	select BR2_PACKAGE_ALSA_LIB_MIXER
@@ -44,6 +43,5 @@ config BR2_PACKAGE_SQUEEZELITE_VISEXPORT
 endif
 
 comment "squeezelite needs a toolchain w/ wchar, NPTL, dynamic library"
-	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS_NPTL \
 		|| BR2_STATIC_LIBS
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/mpg123: remove MMU dependency
  2026-09-26 13:00 [Buildroot] [PATCH 1/1] package/mpg123: remove MMU dependency Bernd Kuhls
@ 2026-10-04  7:07 ` Thomas Petazzoni via buildroot
  2026-10-10  9:23 ` Thomas Perale via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-04  7:07 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot, Hiroshi Kawashima

On Sat, Sep 26, 2026 at 03:00:06PM +0200, Bernd Kuhls wrote:
> Buildroot commit f0862592b3caf5bc9cd347fd29634673cfbbabd7 added the
> dependency to BR2_USE_MMU in 2014.
> Upstream made fork() optional in 2022:
> https://github.com/madebr/mpg123/commit/91f75fc026e37d88d25229b81c58bcf8d6d2a8eb
> 
> This change reveals a previously hidden build error with the toolchain
> bootlin-armv7m-uclibc:
> 
> src/libmpg123/synth_arm_accurate.S: Assembler messages:
> src/libmpg123/synth_arm_accurate.S:22: Error: selected processor does
>  not support ARM opcodes
> src/libmpg123/synth_arm_accurate.S:31: Error: attempt to use an ARM
>  instruction on a Thumb-only processor --
>  `stmfd sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr}'
> src/libmpg123/synth_arm_accurate.S:33: Error: attempt to use an ARM
>  instruction on a Thumb-only processor -- `add r0,r0,#64'
> [...]

So the ARM support needs support for ARM instructions.

> To fix the problem we limit ARM code to !BR2_ARM_INSTRUCTIONS_THUMB2.

Therefore it is most logical to require BR2_ARM_CPU_HAS_ARM than
!BR2_ARM_INSTRUCTIONS_THUMB2.

So I've changed:

> +ifeq ($(BR2_arm)x$(BR2_ARM_INSTRUCTIONS_THUMB2),yx)

to:

ifeq ($(BR2_arm)$(BR2_ARM_CPU_HAS_ARM),yy)

and applied. Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/mpg123: remove MMU dependency
  2026-09-26 13:00 [Buildroot] [PATCH 1/1] package/mpg123: remove MMU dependency Bernd Kuhls
  2026-10-04  7:07 ` Thomas Petazzoni via buildroot
@ 2026-10-10  9:23 ` Thomas Perale via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Perale via buildroot @ 2026-10-10  9:23 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: Thomas Perale, buildroot

In reply of:
> Buildroot commit f0862592b3caf5bc9cd347fd29634673cfbbabd7 added the
> dependency to BR2_USE_MMU in 2014.
> Upstream made fork() optional in 2022:
> https://github.com/madebr/mpg123/commit/91f75fc026e37d88d25229b81c58bcf8d6d2a8eb
> 
> This change reveals a previously hidden build error with the toolchain
> bootlin-armv7m-uclibc:
> 
> src/libmpg123/synth_arm_accurate.S: Assembler messages:
> src/libmpg123/synth_arm_accurate.S:22: Error: selected processor does
>  not support ARM opcodes
> src/libmpg123/synth_arm_accurate.S:31: Error: attempt to use an ARM
>  instruction on a Thumb-only processor --
>  `stmfd sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr}'
> src/libmpg123/synth_arm_accurate.S:33: Error: attempt to use an ARM
>  instruction on a Thumb-only processor -- `add r0,r0,#64'
> [...]
> 
> To fix the problem we limit ARM code to !BR2_ARM_INSTRUCTIONS_THUMB2.
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Applied to 2025.02.x & 2026.08.x. Thanks

> ---
> Gitlab pipelines for mpg123 passed:
> https://gitlab.com/bkuhls/buildroot/-/commits/85dfb60e8f4fbe0caa74674d91c54400c288ec10
> 
> Gitlab pipelines for squeezelite passed:
> https://gitlab.com/bkuhls/buildroot/-/commits/f5549196dd9e923e3c83e809a5e170da44551c75
> 
> with the exception of an unrelated build error at
> bootlin-x86-i686-musl/build/ffmpeg-6.1.5/.stamp_built
> 
> /builds/bkuhls/buildroot/br-test-pkg/bootlin-x86-i686-musl/host/opt/ext-toolchain/bin/../lib/gcc/i686-buildroot-linux-musl/15.3.0/../../../../i686-buildroot-linux-musl/bin/ld:
>  read-only segment has dynamic relocations
> collect2: error: ld returned 1 exit status
> 
>  package/mpg123/Config.in      | 1 -
>  package/mpg123/mpg123.mk      | 2 +-
>  package/squeezelite/Config.in | 2 --
>  3 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/package/mpg123/Config.in b/package/mpg123/Config.in
> index 73ca1c740c..8cbc3a4758 100644
> --- a/package/mpg123/Config.in
> +++ b/package/mpg123/Config.in
> @@ -1,6 +1,5 @@
>  config BR2_PACKAGE_MPG123
>  	bool "mpg123"
> -	depends on BR2_USE_MMU # fork - in the application
>  	help
>  	  Fast, free and portable MPEG audio player for Unix. It
>  	  supports MPEG 1.0/2.0 layers 1, 2 and 3.
> diff --git a/package/mpg123/mpg123.mk b/package/mpg123/mpg123.mk
> index 17445395ae..0318cb4810 100644
> --- a/package/mpg123/mpg123.mk
> +++ b/package/mpg123/mpg123.mk
> @@ -26,7 +26,7 @@ ifeq ($(BR2_aarch64),y)
>  MPG123_CPU = aarch64
>  endif
>  
> -ifeq ($(BR2_arm),y)
> +ifeq ($(BR2_arm)x$(BR2_ARM_INSTRUCTIONS_THUMB2),yx)
>  ifeq ($(or $(BR2_ARM_CPU_HAS_NEON),$(BR2_ARM_CPU_HAS_VFPV2)),y)
>  MPG123_CPU = arm_fpu
>  else
> diff --git a/package/squeezelite/Config.in b/package/squeezelite/Config.in
> index a034759143..0bdc43ce6c 100644
> --- a/package/squeezelite/Config.in
> +++ b/package/squeezelite/Config.in
> @@ -2,7 +2,6 @@ config BR2_PACKAGE_SQUEEZELITE
>  	bool "squeezelite"
>  	depends on BR2_USE_WCHAR # flac
>  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
> -	depends on BR2_USE_MMU # mpg123
>  	depends on !BR2_STATIC_LIBS # dlopen
>  	select BR2_PACKAGE_ALSA_LIB
>  	select BR2_PACKAGE_ALSA_LIB_MIXER
> @@ -44,6 +43,5 @@ config BR2_PACKAGE_SQUEEZELITE_VISEXPORT
>  endif
>  
>  comment "squeezelite needs a toolchain w/ wchar, NPTL, dynamic library"
> -	depends on BR2_USE_MMU
>  	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS_NPTL \
>  		|| BR2_STATIC_LIBS
> -- 
> 2.47.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-10  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 13:00 [Buildroot] [PATCH 1/1] package/mpg123: remove MMU dependency Bernd Kuhls
2026-10-04  7:07 ` Thomas Petazzoni via buildroot
2026-10-10  9:23 ` Thomas Perale via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox