571f588a | 21-Oct-2014 |
John Marino <draco@marino.st> |
customcc: Improve wrapper script efficiency and capabilities
The wrapper script had some deficies, such as: * awk called every invocation * cc and gcc treated the same * c++ and g++ treated the s
customcc: Improve wrapper script efficiency and capabilities
The wrapper script had some deficies, such as: * awk called every invocation * cc and gcc treated the same * c++ and g++ treated the same * evals for variables not used * every invocation of c++ or g++ called cc -dumpmachine * g++ hardcoded to dports include scheme * no support for "CC" or "gcov" (both defined by base compilers)
The update addresses these by: * awk eliminated by pushing INCOPT definition to defaults/compilers.conf * cc -dumpmachine eliminated during creation of defaults/compilers.conf It was only used for dports gcc, so with the assumption that the dports compiler matches the uname information (a decent assumption), this was predefined, yet overridable by /etc/compilers.conf * cc is treated separately from gcc * CC and c++ are treated the same but separately from g++ * by wrapper default, gcc and g++ refer to base gcc4.7, but the default compilers.conf sets them to the same as the specified dports gcc * Support for clang, clang++, clang-cpp, CC, and gcov was added * Support for base clang, clang++, and clang-cpp was added in anticipation of bringing clang into base. * variables are only evaluated if used. * supports the ability to have gcc, g++, clang, clang++ point to base compilers while cc, c++, CC point to custom compiler. However, the custom compiler can also point to any combination of cc, gcc, c++, and g++ and that's controllable by compilers.conf.
The /etc/defaults/compilers.conf file was augmented and support for clang35 from dports added. man 5 compilers.conf was edited accordingly with placeholders for <version>_CLANG, <version>_CLANGCXX and <version>_CLANGCPP which aren't applicable until clang comes into base.
show more ...
|