NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/50008: netbsd-7 doesn't build with MKPIE=yes



>Number:         50008
>Category:       toolchain
>Synopsis:       netbsd-7 doesn't build with MKPIE=yes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 28 19:40:00 +0000 2015
>Originator:     Piotr Meyer
>Release:        netbsd-7 from Jul 28 2015
>Organization:
>Environment:
NetBSD dodo.smutek.pl 7.99.9 NetBSD 7.99.9 (GENERIC) #0: Sun Apr  5 19:45:47 CEST 2015  aniou%dodo.smutek.pl@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
With MKPIE=yes system build fails with:

/usr/obj.7/tooldir.NetBSD-7.99.9-amd64/bin/x86_64--netbsd-gcc -O2   -std=gnu99   -Werror  -m32 -fPIC -m32 -fstack-protector -Wstack-protector   --param ssp-buffer-size=1   --sysroot=/usr/obj.7/destdir.amd64 -I/usr/src.7/sys/external/bsd/sljit/dist/sljit_src  -D_FORTIFY_SOURCE=2 -c    /usr/src.7/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c -o sljitLir.o
In file included from /usr/src.7/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c:1382:0:
/usr/src.7/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c: In function 'sljit_emit_op1':
/usr/src.7/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c:298:2: error: PIC register clobbered by '%rbx' in 'asm'
  __asm__ (
  ^


>How-To-Repeat:

>Fix:
I don't know, however problematic fragment of code contains call to 
cpuid and - as far I can understood - identical case is explained: 
http://www.programdevelop.com/3578604/


code snippet:

        /* AT&T syntax. */
        __asm__ (
                "movl $0x1, %%eax\n"
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
                /* On x86-32, there is no red zone, so this
                   should work (no need for a local variable). */
                "push %%ebx\n"
#endif
                "cpuid\n"
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
                "pop %%ebx\n"
#endif
                "movl %%edx, %0\n"
                : "=g" (features)
                :
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
                : "%eax", "%ecx", "%edx"
#else
                : "%rax", "%rbx", "%rcx", "%rdx"
#endif
);




Home | Main Index | Thread Index | Old Index