This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to compile a lower gcc/glibc version compatible binary?


* Derek Ch:

> the workaround is to use a lower debian version (same as the target)
> as the development system, but what if I want the better generated
> code by gcc-5.2 ?

Then you have to compile GCC on your own.  This may need changes to
GCC to avoid dependencies on newer libgcc versions in generated
executables.  More changes may be needed if you need C++ support.

> So does gcc support such requirement to build a binary without
> linking symbols higher than a specific lib version?

This is predominantly a library issue.  For glibc, there are no plans
to support targeting older glibc versions from newer glibc build
environments.

Beyond glibc, few libraries pay careful attention to backwards
compatibility, so it is generally recommended to recompile
applications with the distribution toolchain and ship multiple builds,
one for each distribution.

Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]