public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64940] New: Question:  is it possible to build a single gcc/g++ that will work on mult. OS versions?
@ 2015-02-04 22:46 bill.torpey at ullink dot com
  2015-02-04 22:52 ` [Bug c++/64940] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bill.torpey at ullink dot com @ 2015-02-04 22:46 UTC (permalink / raw)
  To: gcc-bugs

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!


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/64940] Question:  is it possible to build a single gcc/g++ that will work on mult. OS versions?
  2015-02-04 22:46 [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
@ 2015-02-04 22:52 ` pinskia at gcc dot gnu.org
  2015-02-04 23:33 ` bill.torpey at ullink dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-04 22:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64940

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You can call fix-includes after installing the toolchain if needed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/64940] Question:  is it possible to build a single gcc/g++ that will work on mult. OS versions?
  2015-02-04 22:46 [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
  2015-02-04 22:52 ` [Bug c++/64940] " pinskia at gcc dot gnu.org
@ 2015-02-04 23:33 ` bill.torpey at ullink dot com
  2015-02-05  0:03 ` pinskia at gcc dot gnu.org
  2015-02-05 13:50 ` bill.torpey at ullink dot com
  3 siblings, 0 replies; 5+ messages in thread
From: bill.torpey at ullink dot com @ 2015-02-04 23:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64940

--- Comment #2 from Bill Torpey <bill.torpey at ullink dot com> ---
Thanks for the quick reply!

Unfortunately, the approach you suggest won't work for what we want to do,
which is to have a *single* network-mounted gcc that can be used from both.

That means we need a "generic" gcc, and it's not clear how to produce one (or
if that is even possible).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/64940] Question:  is it possible to build a single gcc/g++ that will work on mult. OS versions?
  2015-02-04 22:46 [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
  2015-02-04 22:52 ` [Bug c++/64940] " pinskia at gcc dot gnu.org
  2015-02-04 23:33 ` bill.torpey at ullink dot com
@ 2015-02-05  0:03 ` pinskia at gcc dot gnu.org
  2015-02-05 13:50 ` bill.torpey at ullink dot com
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-05  0:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64940

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Bill Torpey from comment #2)
> Thanks for the quick reply!
> 
> Unfortunately, the approach you suggest won't work for what we want to do,
> which is to have a *single* network-mounted gcc that can be used from both.
> 
> That means we need a "generic" gcc, and it's not clear how to produce one
> (or if that is even possible).

You could try removing the include-fixed directory and try that.
But really there is no way otherwise.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/64940] Question:  is it possible to build a single gcc/g++ that will work on mult. OS versions?
  2015-02-04 22:46 [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
                   ` (2 preceding siblings ...)
  2015-02-05  0:03 ` pinskia at gcc dot gnu.org
@ 2015-02-05 13:50 ` bill.torpey at ullink dot com
  3 siblings, 0 replies; 5+ messages in thread
From: bill.torpey at ullink dot com @ 2015-02-05 13:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64940

--- Comment #4 from Bill Torpey <bill.torpey at ullink dot com> ---
That was the first thing I tried, but the system limits.h does an include_next
which fails, and the system features.h doesnt include compiler-specific
definitions, so that also fails.

So, there is absolutely no way to build a generic gcc that can run from a
network filesystem?  That seems hard to believe -- I imagine that is a fairly
common use case.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-05 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 22:46 [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
2015-02-04 22:52 ` [Bug c++/64940] " pinskia at gcc dot gnu.org
2015-02-04 23:33 ` bill.torpey at ullink dot com
2015-02-05  0:03 ` pinskia at gcc dot gnu.org
2015-02-05 13:50 ` bill.torpey at ullink dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).