All Projects β†’ xyproto β†’ cdetect

xyproto / cdetect

Licence: MIT license
πŸ”¬ Detect which compiler and compiler version a Linux executable (in the ELF format) was compiled with

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to cdetect

rooki
A stupid simple script runner supporting c, c++, rust, haskell and virtually anything
Stars: ✭ 26 (+13.04%)
Mutual labels:  gcc, clang, tcc
C
Compile and execute C "scripts" in one go!
Stars: ✭ 1,920 (+8247.83%)
Mutual labels:  gcc, clang, tcc
ci playground
Playground for Cloud CI development for C++
Stars: ✭ 23 (+0%)
Mutual labels:  gcc, clang
Cmake Scripts
A selection of useful scripts for use in CMake projects, include code coverage, sanitizers, and dependency graph generation.
Stars: ✭ 202 (+778.26%)
Mutual labels:  gcc, clang
xcross
"Zero Setup" cross-compilation for C/C++. Supports numerous architectures, build systems, C standard libraries, vcpkg, and Conan.
Stars: ✭ 29 (+26.09%)
Mutual labels:  gcc, clang
Libosmscout
Libosmscout is a C++ library for offline map rendering, routing and location lookup based on OpenStreetMap data
Stars: ✭ 159 (+591.3%)
Mutual labels:  gcc, clang
Polymcu
An open framework for micro-controller software
Stars: ✭ 173 (+652.17%)
Mutual labels:  gcc, clang
Detect It Easy
Program for determining types of files for Windows, Linux and MacOS.
Stars: ✭ 2,982 (+12865.22%)
Mutual labels:  detect, elf
Vector
➿ A supercharged std::vector implementation (minus Allocator)
Stars: ✭ 118 (+413.04%)
Mutual labels:  gcc, clang
C-Cpp-Coverage-for-CLion
Get coverage data in CLion using gcov or llvm-cov
Stars: ✭ 37 (+60.87%)
Mutual labels:  gcc, clang
perses
Language-agnostic program reducer.
Stars: ✭ 57 (+147.83%)
Mutual labels:  gcc, clang
minilib
A c standard system library with a focus on size, headeronly, "singlefile", intended for static linking. 187 Bytes for "Hello World"(regular elf), compiled with the standard gcc toolchain.
Stars: ✭ 29 (+26.09%)
Mutual labels:  gcc, clang
Arm Cmake Toolchains
CMake toolchain configurations for ARM
Stars: ✭ 148 (+543.48%)
Mutual labels:  gcc, clang
Fixed point
C++ Binary Fixed-Point Arithmetic
Stars: ✭ 199 (+765.22%)
Mutual labels:  gcc, clang
Embedded Ide
IDE for C embedded development centered on bare-metal ARM systems
Stars: ✭ 127 (+452.17%)
Mutual labels:  gcc, clang
Sol2
Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
Stars: ✭ 2,791 (+12034.78%)
Mutual labels:  gcc, clang
c-compiler-security
Security-related flags and options for C compilers
Stars: ✭ 125 (+443.48%)
Mutual labels:  gcc, clang
Cmakepchcompiler
CMake precompiled header support via custom PCH compiler extension
Stars: ✭ 105 (+356.52%)
Mutual labels:  gcc, clang
Moderncppci
This is an example of doing a Modern C++ project with CI
Stars: ✭ 109 (+373.91%)
Mutual labels:  gcc, clang
FrameOfReference
C++ library to pack and unpack vectors of integers having a small range of values using a technique called Frame of Reference
Stars: ✭ 36 (+56.52%)
Mutual labels:  gcc, clang

πŸ”¬ CDetect

Utility for figuring out which compiler and compiler version was used for compiling an executable file for Linux (in the ELF format).

Installation

This requires Go 1.12 or later and will install the development version of cdetect:

go get -u github.com/xyproto/cdetect

Example usage

$ cdetect /bin/sh
GCC 8.1.1

$ cdetect /usr/bin/ls
GCC 8.2.0

$ cdetect testdata/rust_hello
Rust 1.27.0-nightly

$ cdetect go
Go 1.11.2

Features and limitations

  • Supports detection of compiler name and version if an executable was built with one of these compilers:
    • GCC
    • Clang
    • FPC
    • OCaml
    • Go
    • TCC (compiler name only, TCC does not store the version number in the executables)
    • Rust (for stripped executables, only the compiler name and GCC version used for linking)
    • GHC
  • Works even with stripped executables.
  • Should work for recent versions of all of the above compilers. Executables produced with old versions of the compilers may need more testing.

Distro Packages

Packaging status

Changelog

0.5.3 to 0.5.4

  • Add support for executables built with GCC 8 for 32-bit PowerPC.

0.5.2 to 0.5.3

  • Add detection of compiler name and version from executables built with ghc (Haskell).

0.5.1 to 0.5.2

  • Refactor out code to the ainur module.
  • Better support for 32-bit PowerPC ELF files.

0.5 to 0.5.1

  • Fix an issue with version detection for Rust.

0.4 to 0.5

  • Add support for detecting executables compiled with Rust.
  • Will now look for the given filename in PATH, if not found.

0.3 to 0.4

  • Add support for detecting executables compiled with Clang or TCC.

0.2 to 0.3

  • Fix issue #1, detection of executables compiled with GCC on Void Linux.

0.1 to 0.2

  • Rename the utility to cdetect.

0.1

  • Support for detecting various compilers and compiler version numbers.

General info

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].