Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 363687

Summary: [patch] sys-freebsd/boot0-8.0 fails to compile with -fPIC on Gentoo/FBSD
Product: Gentoo/Alt Reporter: Yuta SATOH <nigoro.dev>
Component: FreeBSDAssignee: Gentoo/BSD Team <bsd+disabled>
Status: RESOLVED INVALID    
Severity: minor    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: FreeBSD   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for boot0-8.0.ebuild

Description Yuta SATOH 2011-04-15 11:41:57 UTC
The following message is displayed and fails to compile on Gentoo/FBSD.

x86_64-gentoo-freebsd8.0-gcc  -O2 -pipe -fPIC -I/usr/include/libstand/ -fno-strict-aliasing  -DLOADER_NFS_SUPPORT -DCOMPORT=0x3f8 -DCOMSPEED=9600 -DSMBIOS_SERIAL_NUMBERS -DLOADER_GPT_SUPPORT -DTERM_EMU -Dalloca=__builtin_alloca -I/var/tmp/portage/sys-freebsd/boot0-8.0/work/sys/boot/i386/libi386/../../common -I/var/tmp/portage/sys-freebsd/boot0-8.0/work/sys/boot/i386/libi386/../btx/lib  -I/var/tmp/portage/sys-freebsd/boot0-8.0/work/sys/boot/i386/libi386/../../../contrib/dev/acpica/include  -I/var/tmp/portage/sys-freebsd/boot0-8.0/work/sys/boot/i386/libi386/../../.. -I. -I/var/tmp/portage/sys-freebsd/boot0-8.0/work/sys/boot/i386/libi386/../../../../lib/libstand/ -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -m32 -march=i386 -std=gnu99   -c bootinfo64.c
bootinfo64.c: In function ‘bi_load64’:
./machine/cpufunc.h:112:2: error: can't find a register in class ‘BREG’ while reloading ‘asm’
./machine/cpufunc.h:112:2: error: can't find a register in class ‘BREG’ while reloading ‘asm’
./machine/cpufunc.h:112:2: error: can't find a register in class ‘BREG’ while reloading ‘asm’
./machine/cpufunc.h:112:2: error: ‘asm’ operand has impossible constraints
./machine/cpufunc.h:112:2: error: ‘asm’ operand has impossible constraints
./machine/cpufunc.h:112:2: error: ‘asm’ operand has impossible constraints
*** Error code 1

Stop in /var/tmp/portage/sys-freebsd/boot0-8.0/work/sys/boot/i386/libi386.
*** Error code 1

Stop in /var/tmp/portage/sys-freebsd/boot0-8.0/work/sys/boot/i386.
*** Error code 1

Stop in /var/tmp/portage/sys-freebsd/boot0-8.0/work/sys/boot.


Reproducible: Always

Steps to Reproduce:
1. CFLAGS="-O2 -pipe -fPIC" CXXFLAGS="-O2 -pipe -fPIC" emerge sys-freebsd/boot0
2.
3.
Comment 1 Yuta SATOH 2011-04-15 11:44:17 UTC
Created attachment 270053 [details, diff]
patch for boot0-8.0.ebuild
Comment 2 Alexis Ballier gentoo-dev 2011-07-06 19:29:05 UTC
really, really, really, reaaaaaaaallllllyyyy, you shouldnt set PIC in your CFLAGS ;)