Created attachment 413678 [details]
On my hardened ~amd64 machine with gcc-5.2.0 I see the following failure for cinelerra.
ibtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../libmpeg3 -D__STDC_CONSTANT_MACROS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_MMX -DUSE_MMX -DX86_CPU -I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex -DENCORE_INCLUDE=\"encore50/encore.h\" -I/usr/include/libavcodec -I/usr/include/libswscale -DHAVE_SWSCALER -O2 -pipe -march=native -ggdb -floop-interchange -floop-strip-mine -floop-block -finline-functions -Wformat -Werror=format-security -c libdv.c -fPIC -DPIC -o .libs/libdv.o
In file included from libdv.c:13:0:
mmx.h: In function ‘mm_support’:
mmx.h:118:2: error: ‘asm’ operand has impossible constraints
__asm__ __volatile__ (
Created attachment 413680 [details]
it'd be worth to report a minimal test case upstream.
clobber list is: "eax", "ebx", "ecx", "edx"
which seems plenty enough to be able to solve it; but since, basically, inline asm is defined by what gcc supports, they might reply some of these registers are reserved, which means it'd have to be patched here, but before that I'd like to have a clear statement on what's wrong.
* Drop mm_support() and mmx_ok() as these do not build with clang and
* are unused by Cinelerra CV. Inspired by change found in
* <URL: http://hg.libsdl.org/SDL/file/32f0f603a0c8/src/video/mmx.h >
So, it might be even simpler by ifdefing that stuff out (but maybe still worth reporting to gcc upstream so that they can have a look at it)
You may be hit by -fstack-check it need one registers to work
and it is default on hardened.
check if it works if you pass -fstack-check=no
(In reply to Magnus Granberg from comment #4)
> You may be hit by -fstack-check it need one registers to work
> and it is default on hardened.
> check if it works if you pass -fstack-check=no
no, that's not it, I have it without hardened too, and clobbering only "eax" makes it fail the same way. anyway, this asm seems very wrong, and I'm not even sure "eax" is valid on amd64.
Author: Alexis Ballier <firstname.lastname@example.org>
Date: Sat Oct 10 11:04:52 2015 +0200
media-video/cinelerra: Fix build with gcc 5.2 by disabling old useless code. Bug #562208.
this code was definitely buggy and useless, so I went the simple way :)