Commit Graph

23 Commits

Author SHA1 Message Date
Andrew Tridgell a04e8746a4 waf: removed debug code
this was in to test cygwin ar behaviour on linux. It should not have
been committed.

Thanks to Andy for letting me know it broke MacOS
2021-04-23 05:50:23 +10:00
Andrew Tridgell 878bd3f0fe waf: use /usr/bin/ar not arm-none-eabi-ar on cygwin
needed to allow for @FILE syntax for long arg lists
2021-04-20 18:43:20 +10:00
Francisco Ferreira 03ed67a996 waf: add option to override toolchain 2019-02-22 08:27:08 +11:00
Francisco Ferreira 2e3b4df47e waf: don't fail on missing pkg-config
Also remove unneeded wrapper method and use standard waf
2018-11-13 10:30:34 +11:00
Francisco Ferreira 389a9ee88b waf: add option to disable gccdeps 2018-11-13 10:30:34 +11:00
Peter Barker b94e31b21a Tools: remove warning about native clang builds
These appear to be stable now
2018-06-22 16:49:05 +10:00
Andrew Tridgell 290f050575 waf: enable gccdeps, using gcc dependencies
this is considerably faster than the way dependency system
2018-06-22 11:13:03 +10:00
Siddharth Purohit 90ca9626cc waf: use gcc/g++ by default if available else throw warning 2018-01-31 12:22:23 +11:00
Lucas De Marchi cc683c1db1 build: use gcc/g++ first
We currently are unable to build on MacOSX unless we give waf the
--check-cxx-compiler g++. Change the compiler order to search for
gcc/g++ first instead of clang/clang++.
2016-10-14 17:30:46 -03:00
Lucas De Marchi e31a06cfdb waf: fix programs searches
Here we do the following:
    1) Move the pkg-config check to boards.py so we only check of it for
       linux boards
    2) Use cfg.find_toolchain_program() if possible, for example, for AR
2016-08-24 12:15:42 -03:00
Gustavo Jose de Sousa f430ef3825 waf: toolchain: override find_g{xx,cc}() instead of wrapping configure()
That's more correct than setting Waf environment variables:

 (1) We don't need to worry about differences between OSes - the previous
 implementation was actually broken for Windows because the program names in
 the environment variables were missing the ".exe" extension.

 (2) That looks better than looping over possible compiler names and running
 the configuration transactionally multiple times.
2016-08-24 12:15:42 -03:00
Gustavo Jose de Sousa 80f03b618b waf: toolchain: add find_toolchain_program() 2016-05-25 17:47:00 -03:00
Julien Beraud 5418f71aae waf: add libiio support for bebop
check for the presence of libiio to enable the compilation of
the bebop rangefinder that needs it.
If the build remains static, there needs to be a rootfs that contains
the libiio.a file because it is not included in the debian package.
A solution can be to compile libiio and copy libiio.a in /usr/lib[/arch]
2016-05-03 16:43:39 -03:00
Francisco Ferreira 0eaf6f17c8 waf: toolchain: fix Clang toolchain detection 2016-03-29 15:02:33 -03:00
Gustavo Jose de Sousa 6e658452ec waf: toolchain: filter supported compilers for cross-compilation
We currently only support GNU and clang compilers.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 1b6a87d8b4 waf: toolchain: clang: use waf to find toolchain path
The find_realexec_path function was used for finding the toolchain path mostly
because of two reasons:

 1) We couldn't really use CXX or CC variables because the user could set those
 from the OS's environment and Waf wouldn't look for the executable file in
 that case.

 2) Our CI configuration sets up symlinks for ccache and find_realexec_path
 works around that issue.

The bad side about using find_realexec_path() is that, besides working aroung
symlinks, it does the same thing that is done by Waf. This patch removes the
dependency for such a function by addressing each of the reasons above stated:

 1) We create a local copy of os.environ and, if there's a variable with the
 same name we are using, we remove it from the local copy.

 2) As done before, we are looking for the cross ar program instead of gcc
 program, since that is not used for ccache symlinks.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 019cf3d483 waf: toolchain: clang: use configure wrapper
This is a better approach than checking command line options
--check-cxx-compiler and --check-c-compiler. Those values expect a list of
compilers to try instead of the compiler to use.

The benefits of this approach are:
 - Allowing correct use of options --check-cxx-compiler and --check-c-compiler.
 - Allowing user to pass CXX and CC environment variables, which is a common
   way of selecting the compiler.
 - Configuration is done *and committed* only for the specific compiler.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 7ede9600db waf: toolchain: gcc: use cross-compilation prefix wrapper
This is a better approach than checking command line options
--check-cxx-compiler and --check-c-compiler. Those values expect a list of
compilers to try instead of the compiler to use.

The benefits of this approach are:
 - Allowing correct use of options --check-cxx-compiler and --check-c-compiler.
 - Allowing user to pass CXX and CC environment variables, which is a common
   way of selecting the compiler.
 - Configuration is done *and committed* only for the specific compiler.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 95aeb0346e waf: load compilers tools in toolchain tool
It makes more sense the toolchain Waf tool to be responsible of loading the
compilers. Furthermore, that allows toolchain tool to have control on doing
configuration before and after loading compiler tools.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 19d6a88e84 waf: toolchain: refactor configure function
- Use early return and reduce one indentation level.
- Set AR for both GNU compilers and clang just once and reduce redundancy.
- Reduce indentation level for clang-specific setup. There's no need to nest it
  inside check if compilers are GNU or clang.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa ceda86bbd8 waf: toolchain: get rid of suffixes variable
The only variables used so far are CXX, CC and AR. Let's make it
simpler.
2016-03-23 17:05:33 -03:00
Francisco Ferreira 02af9b6ab1 waf: toolchain: support Clang in toolchain for cross-compilation
Define function to help find the toolchain path
2016-03-20 00:17:02 -03:00
Gustavo Jose de Sousa e7312a1f81 waf: add toolchain tool for cross-compiling 2016-01-11 16:31:59 -02:00