sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.87k stars 130 forks source link

Move all CC checks after setting CC/CXX vars #470

Closed kdm9 closed 3 years ago

kdm9 commented 3 years ago

Hello,

While trying to package rmlint for the conda package manager, I came across the following issue: compiler paths and flags from os.environ are incorporated into the build environment after some checks (namely CheckCC()) execute. Therefore, if the default values of scons' CC etc. are non-functional (as in a cross-build environment where CC is named by host arch etc.), then these tests fail, aborting the build before paths to CC and CXX are read from environment variables. This simply shifts the block of code that overwrites scons' CC/CXX etc up before any checks are performed. The attached patch seems to allow successful compilation & install at least in Conda's build environment.

Best, Kevin

SeeSpotRun commented 3 years ago

Thanks @kdm9