From 1d3cb776bb4f376eed1a97866aed58617b13900b Mon Sep 17 00:00:00 2001 From: Francisco Ramirez de Anton Date: Tue, 4 Jun 2024 10:24:22 +0200 Subject: [PATCH 1/3] Added new env variables info --- reference/tools/gnu/autotoolstoolchain.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/reference/tools/gnu/autotoolstoolchain.rst b/reference/tools/gnu/autotoolstoolchain.rst index c77e95f39d6d..28446047b3e3 100644 --- a/reference/tools/gnu/autotoolstoolchain.rst +++ b/reference/tools/gnu/autotoolstoolchain.rst @@ -53,6 +53,11 @@ corresponding build flags like ``-stdlib=libstdc++``, ``-std=gnu14``, architectu etc. It will also append the folder where the Conan generators are located to the ``PKG_CONFIG_PATH`` environment variable. +Since `Conan 2.4.0 `__, +if it's a cross-building context, ``CC_FOR_BUILD`` and ``CXX_FOR_BUILD`` are also set as environment variables if the +build profile is defining the ``c`` and ``cpp`` values in the conf variable ``tools.build:compiler_executables``. +See more info in the :ref:`conan_tools_gnu_autotoolstoolchain_conf` section. + This generator will also generate a file called ``conanbuild.conf`` containing two keys: - **configure_args**: Arguments to call the ``configure`` script. @@ -259,8 +264,9 @@ conf compiler as key and the compiler executable path as value. Those keys will be mapped as follows: - * ``c``: will set ``CC`` in *conanautotoolstoolchain.sh|bat* script. - * ``cpp``: will set ``CXX`` in *conanautotoolstoolchain.sh|bat* script. + * ``c``: will set ``CC`` (and ``CC_FOR_BUILD`` if cross-building) in *conanautotoolstoolchain.sh|bat* script. + * ``cpp``: will set ``CXX`` (and ``CXX_FOR_BUILD`` if cross-building) in *conanautotoolstoolchain.sh|bat* script. + * ``rc``: will set ``RC`` in *conanautotoolstoolchain.sh|bat* script. * ``cuda``: will set ``NVCC`` in *conanautotoolstoolchain.sh|bat* script. * ``fortran``: will set ``FC`` in *conanautotoolstoolchain.sh|bat* script. From b1a3dafe2d7c87cd4a37f2ede0bd9a4a0ed7a660 Mon Sep 17 00:00:00 2001 From: Francisco Ramirez de Anton Date: Tue, 4 Jun 2024 11:05:12 +0200 Subject: [PATCH 2/3] wip --- reference/tools/gnu/autotoolstoolchain.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reference/tools/gnu/autotoolstoolchain.rst b/reference/tools/gnu/autotoolstoolchain.rst index 28446047b3e3..697874576978 100644 --- a/reference/tools/gnu/autotoolstoolchain.rst +++ b/reference/tools/gnu/autotoolstoolchain.rst @@ -56,7 +56,7 @@ etc. It will also append the folder where the Conan generators are located to th Since `Conan 2.4.0 `__, if it's a cross-building context, ``CC_FOR_BUILD`` and ``CXX_FOR_BUILD`` are also set as environment variables if the build profile is defining the ``c`` and ``cpp`` values in the conf variable ``tools.build:compiler_executables``. -See more info in the :ref:`conan_tools_gnu_autotoolstoolchain_conf` section. +See more info in the :ref:`conf section`. This generator will also generate a file called ``conanbuild.conf`` containing two keys: @@ -246,12 +246,11 @@ Reference :members: +.. _conan_tools_gnu_autotoolstoolchain_conf: conf ^^^^ -.. _conan_tools_gnu_autotoolstoolchain_conf: - - ``tools.build:cxxflags`` list of extra C++ flags that will be used by ``CXXFLAGS``. - ``tools.build:cflags`` list of extra of pure C flags that will be used by ``CFLAGS``. - ``tools.build:sharedlinkflags`` list of extra linker flags that will be used by ``LDFLAGS``. From c57b487f7bf49036d2c20ea2513b1e42ceb8df33 Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Tue, 4 Jun 2024 14:52:35 +0200 Subject: [PATCH 3/3] Update reference/tools/gnu/autotoolstoolchain.rst --- reference/tools/gnu/autotoolstoolchain.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/tools/gnu/autotoolstoolchain.rst b/reference/tools/gnu/autotoolstoolchain.rst index 697874576978..4d344084b28e 100644 --- a/reference/tools/gnu/autotoolstoolchain.rst +++ b/reference/tools/gnu/autotoolstoolchain.rst @@ -54,8 +54,8 @@ etc. It will also append the folder where the Conan generators are located to th ``PKG_CONFIG_PATH`` environment variable. Since `Conan 2.4.0 `__, -if it's a cross-building context, ``CC_FOR_BUILD`` and ``CXX_FOR_BUILD`` are also set as environment variables if the -build profile is defining the ``c`` and ``cpp`` values in the conf variable ``tools.build:compiler_executables``. +in a cross-building context, the environment variables ``CC_FOR_BUILD`` and ``CXX_FOR_BUILD`` are also set if the +build profile defines the ``c`` and ``cpp`` values in the configuration variable ``tools.build:compiler_executables``. See more info in the :ref:`conf section`. This generator will also generate a file called ``conanbuild.conf`` containing two keys: