Bug 658236
Summary: | RFE: cross-arch build for i686 on x86_64 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | John Reiser <jreiser> |
Component: | glibc | Assignee: | Andreas Schwab <schwab> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | fweimer, jakub, pahan, schwab |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-12-02 13:44:45 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
John Reiser
2010-11-29 18:47:09 UTC
You need to install all build requirements. At least in theory for "-bc" it should work in the other direction, too: compile for x86_64 using a i686 system. That fails: -----rpmbuild -bc --target x86_64 glibc.spec # on i686 gawk -f ../scripts/gen-as-const.awk ../sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym \ | gcc -S <<snipped>> BUILD/glibc-2.12-216-g3540d66/build-x86_64-linuxnptl/ucontext_i.h <stdin>: In function 'dummy': <stdin>:11:61: error: 'REG_RBP' undeclared (first use in this function) <stdin>:11:61: note: each undeclared identifier is reported only once for each function it appears in <stdin>:12:61: error: 'REG_RSP' undeclared (first use in this function) ... ----- and the first required fix is adding "-m64" to the .spec: ----- %build %ifarch %{ix86} GCC="gcc -m32" GXX="g++ -m32" %else GCC="gcc -m64" GXX="g++ -m64" %endif ----- but that goes almost nowhere because typical gcc for i686 does not support 64-bit mode: ----- configure:2775: gcc -m64 -c -mtune=generic -fasynchronous-unwind-tables -g -O3 -fno-asynchronous-unwind-tables conftest.c >&5 conftest.c:1:0: sorry, unimplemented: 64-bit mode not compiled in ----- So that infelicity is not due to glibc.spec. Yet the GCC="gcc -m32" does belong in the .spec for producing i686 using x86_64. |