[Bug c++/64940] New: Question: is it possible to build a single gcc/g++ that will work on mult. OS versions?
bill.torpey at ullink dot com
gcc-bugzilla@gcc.gnu.org
Wed Feb 4 22:46:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64940
Bug ID: 64940
Summary: Question: is it possible to build a single gcc/g++
that will work on mult. OS versions?
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bill.torpey at ullink dot com
We're trying to build a single gcc/g++ toolchain that can run from a
network-mounted filesystem, and be usable from multiple OS versions.
In our specific case, we need to support RH/CentOS 5 & 6.
Our approach has been to build on RH5 with the idea that glibc is
backward-compatible. That mostly works, but with one major problem.
When building on RH5, the gcc build creates a features.h in include-fixed that
is specific to RH5. (Specifically, __USE_XOPEN2K8 is not defined, which causes
compile errors when building on RH6).
Is there a way to build gcc/g++ in a generic fashion such that include-fixed
does not contain a features.h, but instead picks up the (OS-specific) version
from /usr/include?
FWIW, we've google'd ourselves silly trying to answer this question, and the
only solution appears to be to build a "cross" compiler, but it's not clear how
to do that.
In particular, the approach we've tried (specifying
--target=x86_64-unknown-linux-gnu to configure) doesn't seem to prevent the
creation of a system-specific features.h.
Any suggestions would be much appreciated!
More information about the Gcc-bugs
mailing list