[OpenWrt-Devel] [PATCH] toolchain/nasm: Do not build for pentium targets

Rosen Penev rosenp at gmail.com
Wed Jan 8 17:38:22 EST 2020


On Wed, Jan 8, 2020 at 2:35 PM Rosen Penev <rosenp at gmail.com> wrote:
>
> NASM builds completely broken files with pentium targets. This causes
> ffmpeg to fail compilation. Instead of working around the problem in the
> ffmpeg Makefile, it's easier to just not build for broken platforms.
>
> Not even objdump can figure out what the generated files are.
Another way to fix this is the following patch:

--- a/include/target.mk
+++ b/include/target.mk
@@ -177,8 +177,8 @@ ifeq ($(DUMP),1)
     CPU_CFLAGS_octeonplus = -march=octeon+ -mabi=64
   endif
   ifeq ($(ARCH),i386)
-    CPU_TYPE ?= pentium
-    CPU_CFLAGS_pentium = -march=pentium-mmx
+    CPU_TYPE ?= pentium2
+    CPU_CFLAGS_pentium2 = -march=pentium-mmx
     CPU_CFLAGS_pentium4 = -march=pentium4
   endif
   ifneq ($(findstring arm,$(ARCH)),)

The problem with that one is that I have no hardware to test it on. In
theory it should work as mtune is identical.
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  toolchain/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index 762f4e10d7..f55e756877 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -226,7 +226,7 @@ source "toolchain/gcc/Config.in"
>
>  config NASM
>         bool
> -       depends on ( i386 || x86_64 )
> +       depends on (x86_64 || (i386 && !(TARGET_x86_geode || TARGET_x86_legacy)))
>         prompt "Build nasm" if TOOLCHAINOPTS
>         default y
>         help
> --
> 2.24.1
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list