Commit Graph

10 Commits

Author SHA1 Message Date
Dan McGregor
6a82852dc2 Allow toolchain suffix without leading dash
FreeBSD installs both LLVM and gcc with tools named after the
major version, in the form "clang<major>", such as "clang16".

Detect compilers named this way, and find the related toolchain
tools.
2023-05-08 18:09:27 -06:00
Cristian Adam
fc1f733cc7 BinUtils: Avoid searching CMAKE_PREFIX_PATH
Our `find_program` calls specify `HINTS` to look in the toolchain's
directory first, and then in `PATH`.  `CMAKE_PREFIX_PATH` may be
specified by the user to help find packages for project dependencies,
but this should not override the binutils.

Fixes: #22512
2021-08-09 09:59:29 -04:00
Brad King
b2857514b0 FindBinUtils: Revert "Use the compiler to get the path to compiler tools"
Revert commit b2fd479df5 (FindBinUtils: Use the compiler to get the path
to compiler tools, 2019-09-22, v3.16.0-rc1~51^2).  The compiler's answer
may incorrectly come from the `PATH`.  Another approach will be needed.

Fixes: #19934
2019-11-07 10:31:02 -05:00
Isuru Fernando
b2fd479df5 FindBinUtils: Use the compiler to get the path to compiler tools
Fixes: #19728
2019-09-26 19:11:00 -05:00
Regina Pfeifer
42825fc220 MinGW: Fix locating BinUtils when compiler has a suffix
While all executables from a mingw toolchain share a common prefix,
only the ones provided with the compiler have a suffix, the binutils
do not.

Fixes: #18879
2019-02-06 17:43:55 +01:00
Brad King
04b2fc08b4 GCC,Clang: Mark CMAKE_<LANG>_COMPILER_{AR,RANLIB} as advanced 2017-06-22 11:33:54 -04:00
Ruslan Baratov
75accaae8b GCC: more patterns for ar/ranlib 2017-05-14 12:31:26 +03:00
Ruslan Baratov
7393418844 Rename CMAKE_GCC_{AR,RANLIB} to CMAKE_LANG_COMPILER_{AR,RANLIB}
The variables recently added by commit b9d36826 (Add 'CMAKE_GCC_AR' and
'CMAKE_GCC_RANLIB' variables, 2017-03-08) are more appropriately managed
with language-specific names rather than toolchain-specific names.
2017-04-03 14:10:50 -04:00
Brad King
8fc934de0e GNU-FindBinUtils: Avoid setting policy CMP0054
The `cmake_policy(SET)` call triggers `CMP0011` warnings when this
module is used in a project that does not set `CMP0011` to NEW.  We
could avoid these with a `cmake_policy` PUSH/POP pair, but it is simpler
to adjust our code to not trigger `CMP0054` in the first place.
2017-03-10 10:46:11 -05:00
Ruslan Baratov
b9d36826c5 Add 'CMAKE_GCC_AR' and 'CMAKE_GCC_RANLIB' variables 2017-03-09 04:28:01 +08:00