-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asm impossible constraint #3
Comments
Ok, I figured it out.
The gcc compiler should be tested for -fno-PIE option and if it does support it then should be passed as an extra CFLAG option. |
That is an upstream change to the syslinux code base that is used for the biospba. I haven't looked at the sysllinux repo in a while so it may already be there. It might be a good thing to send this to them they are at www.syslinux.org. |
Yes, I did that. My suggestion is to fix the Makefile with code that looks something like that:
I'm attaching my patch here in case someone else face the same hurdle while building syslinux. Be aware this patch is for their git repository not for this one - i.e. the patch may need to be applied manually. |
Great, thanks. |
@juliandroid Great thanks, this patch really help me a lot. |
Add no-PIE CFLAG to fix build error "impossible constraint in 'asm'" in int13.c. Refered Drive-Trust-Alliance/syslinux#3 Signed-off-by: Brandon Hong <[email protected]>
I get the following error, while running:
$ make
...
make[4]: Entering directory '/home/july/msed/syslinux/gpxe/src' [BUILD] bin/int13.o arch/i386/interface/pcbios/int13.c: In function ‘register_int13_drive’: arch/i386/interface/pcbios/int13.c:469:2: warning: asm operand 0 probably doesn’t match constraints __asm__ __volatile__ ( ^ arch/i386/interface/pcbios/int13.c:469:2: error: impossible constraint in ‘asm’ bin/deps/arch/i386/interface/pcbios/int13.c.d:86: recipe for target 'bin/int13.o' failed make[4]: *** [bin/int13.o] Error 1
My build env is:
$ nasm -v
NASM version 2.11.08 compiled on Mar 24 2015
$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-5.3.0/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 5.3.0 (GCC)
$ make -v
GNU Make 4.1
Built for x86_64-unknown-linux-gnu
$ uname -a
Linux stoffle 4.3.3-3-ARCH #1 SMP PREEMPT Wed Jan 20 08:12:23 CET 2016 x86_64 GNU/Linux
I'm running Arch Linux, so all the tools are the latest versions of respective tools.
I'm not an expert of asm constraints, but I did a couple of changes in order to complete the make process (see the patch file). I assume, those changes might be wrong (EDIT: are wrong - see my next comment).
asm_constraints.patch.zip
Regards,
Julian
The text was updated successfully, but these errors were encountered: