Search code examples
c++gccgnustripbinutils

Does building strip/binutils with a different(higher) version of gcc than the one used to compile the actual code cause any issue?


I am trying to use strip binary to strip my object files. I have built latest binutils on gcc-7, but my codebase uses gcc-4.9.2. Binutils have been built for 64-bit architecture, and so is my codebase, which generates 64 bit code. Will the binutils built on top of gcc-7 cause any issue to strip the compiled code from gcc-4.9.2 given the architecture is x86_64?


Solution

  • The binutils package is not built "on top of" gcc. It is compiled using a compiler (gcc) like many other software packages.

    There should be no problem whatsoever.

    To clarify more : The input files shall be in the form of strippable files successfully produced by any compiler defined by this volume of POSIX.1-2017 So I think the compiler does not matter. Because strip directly acts on the result.

    Strip documentation