ALT Linux Bugzilla
– Attachment 13394 Details for
Bug 46405
potrace: ошибка сборки на не-x86 архитектурах
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
таки исправление проблемы
0001-Fixed-i386-misdetection-on-non-x86-architectures.patch (text/plain), 2.70 KB, created by
Alexey Sheplyakov
on 2023-06-06 17:41:46 MSK
(
hide
)
Description:
таки исправление проблемы
Filename:
MIME Type:
Creator:
Alexey Sheplyakov
Created:
2023-06-06 17:41:46 MSK
Size:
2.70 KB
patch
obsolete
>From 85e4d6427a6bece9fbae1a691a21a04a7b0163f2 Mon Sep 17 00:00:00 2001 >From: Alexey Sheplyakov <asheplyakov@basealt.ru> >Date: Tue, 6 Jun 2023 13:29:54 +0000 >Subject: [PATCH] Fixed i386 misdetection on non-x86 architectures > >libtool: compile: loongarch64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I.. -pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -c trace.c -fPIC -DPIC -o .libs/trace.o >make[2]: Leaving directory '/usr/src/RPM/BUILD/potrace-1.16/src' >make[2]: Entering directory '/usr/src/RPM/BUILD/potrace-1.16/src' >/bin/sh ../libtool --tag=CC --mode=link loongarch64-alt-linux-gcc -pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -o mkbitmap mkbitmap.o bitmap_io.o greymap.o -lm >libtool: link: loongarch64-alt-linux-gcc -pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -o mkbitmap mkbitmap.o bitmap_io.o greymap.o -lm >{standard input}: Assembler messages: >{standard input}:3817: Error: no match insn: bsf $r12,$r14 >{standard input}:3818: Error: no match insn: jnz 0f >{standard input}:3819: Error: no match insn: movl $32,$r14 >{standard input}:3839: Error: no match insn: bsf $r12,$r13 >{standard input}:3840: Error: no match insn: jnz 0f >{standard input}:3841: Error: no match insn: movl $32,$r13 >{standard input}:3852: Error: no match insn: bsf $r12,$r12 >{standard input}:3853: Error: no match insn: jnz 0f >{standard input}:3854: Error: no match insn: movl $32,$r12 >make[3]: *** [/usr/src/tmp/cckhtRVf.mk:2: /usr/src/tmp/ccI17jqP.ltrans0.ltrans.o] Error 1 >lto-wrapper: fatal error: make returned 2 exit status >compilation terminated. >ld: error: lto-wrapper failed >collect2: error: ld returned 1 exit status > >To solve the problem avoid the UB in the test program which checks >if x86 asm can be used. > >Closes: #46405 >--- > potrace/configure.ac | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/potrace/configure.ac b/potrace/configure.ac >index 26cfc91..e0de0d9 100644 >--- a/potrace/configure.ac >+++ b/potrace/configure.ac >@@ -251,9 +251,10 @@ AC_CHECK_FUNC(strncasecmp, , > dnl ---------------------------------------------------------------------- > dnl Check whether we have i386 features > AC_MSG_CHECKING([for Intel 386]) >-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int x; >- asm("bsf %1,%0\njnz 0f\nmovl $32,%0\n0:":"=r"(x):"r"(x)); >- return x; /* need this so that -O2 does not optimize the asm away */ >+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int x=1; >+ volatile asm("bsf %1,%0\njnz 0f\nmovl $32,%0\n0:":"=r"(x):"r"(x):"memory"); >+ /* volatile and "memory" clobber ensures '-O2 -flto' does not optimize the asm away */ >+ return x; > ]])],[AC_MSG_RESULT(yes) > AC_DEFINE(HAVE_I386,, Can we use Intel 386 optimizations?) > ],[AC_MSG_RESULT(no)]) >-- >2.33.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46405
:
13393
| 13394