[bootlin/training-materials updates] master: sysdev: labs: thirdparty: drop 'CC=...' after adding '--host' in ./configure (d0f01d2b)
Luca Ceresoli
luca.ceresoli at bootlin.com
Tue Feb 21 10:56:43 CET 2023
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/d0f01d2b832d72f5adc713253b5ef3780c595476
>---------------------------------------------------------------
commit d0f01d2b832d72f5adc713253b5ef3780c595476
Author: Luca Ceresoli <luca.ceresoli at bootlin.com>
Date: Tue Feb 21 10:56:43 2023 +0100
sysdev: labs: thirdparty: drop 'CC=...' after adding '--host' in ./configure
Setting the CC variable in the environment is not required after adding the
--host flag to configure. Drop it and add a line at the first occurrence to
clarify the reason.
Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
>---------------------------------------------------------------
d0f01d2b832d72f5adc713253b5ef3780c595476
labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex | 18 +++++++++---------
labs/sysdev-thirdparty-qemu/sysdev-thirdparty-qemu.tex | 14 +++++++-------
.../sysdev-thirdparty-stm32.tex | 18 +++++++++---------
3 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex b/labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex
index 3458a917..cde18ed0 100644
--- a/labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex
+++ b/labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex
@@ -172,7 +172,10 @@ for more details on these options.
So, let's override the value of the \code{--host} option:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux}
+\bashcmd{$ ./configure --host=arm-linux}
+
+Note that \code{CC} is not required anymore. It is implied
+by \code{--host}.
The \code{configure} script should end properly now, and create a
Makefile.
@@ -186,7 +189,7 @@ build fine, but it will not work properly at runtime\footnote{See
for all the details}. So you should configure {\em alsa-lib} as
follows:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux --without-versioned}
+\bashcmd{$ ./configure --host=arm-linux --without-versioned}
Run the \code{make} command, which should run just fine.
@@ -261,7 +264,7 @@ the libraries to be installed in the \code{/usr} prefix, so let's tell
the \code{configure} script about this:
\begin{bashinput}
-$ CC=arm-linux-gcc ./configure --host=arm-linux --without-versioned --prefix=/usr
+$ ./configure --host=arm-linux --without-versioned --prefix=/usr
$ make
\end{bashinput}
@@ -355,7 +358,7 @@ with a regular \code{configure} script.
As we've seen previously, we will have to provide the prefix and host
options and the CC variable:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr}
+\bashcmd{$ ./configure --host=arm-linux --prefix=/usr}
Now, we should quiclky get an error in the execution of the
\code{configure} script:
@@ -391,7 +394,6 @@ Let's use it:
\begin{bashinput}
$ CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \%\linebreak
-CC=arm-linux-gcc %\% \linebreak
./configure --host=arm-linux --prefix=/usr
\end{bashinput}
@@ -423,7 +425,6 @@ Let's use this \code{LDFLAGS} variable:
\begin{bashinput}
$ LDFLAGS=-L$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/lib \
CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \
- CC=arm-linux-gcc \
./configure --host=arm-linux --prefix=/usr
\end{bashinput}
@@ -440,7 +441,6 @@ just like we built {\em alsa-lib}.
\begin{bashinput}
$ LDFLAGS=-L$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/lib \
CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \
- CC=arm-linux-gcc \
./configure --host=arm-linux --prefix=/usr \
--disable-alsamixer
\end{bashinput}
@@ -638,7 +638,7 @@ As this project doesn't have any external library dependency, let's
configure {\em libgpiod} in a similar way as {\em alsa-utils}:
\begin{bashinput}
-$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools
+$ ./configure --host=arm-linux --prefix=/usr --enable-tools
\end{bashinput}
Now, compile the software:
@@ -652,7 +652,7 @@ cross-compiling. We can preseed the result of this test by passing
\code{ac_cv_func_malloc_0_nonnull=yes}:
\begin{bashinput}
-$ ac_cv_func_malloc_0_nonnull=yes CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools
+$ ac_cv_func_malloc_0_nonnull=yes ./configure --host=arm-linux --prefix=/usr --enable-tools
\end{bashinput}
Installation to the {\em staging} space can be done using the
diff --git a/labs/sysdev-thirdparty-qemu/sysdev-thirdparty-qemu.tex b/labs/sysdev-thirdparty-qemu/sysdev-thirdparty-qemu.tex
index 9da62dfd..b9e9c75c 100644
--- a/labs/sysdev-thirdparty-qemu/sysdev-thirdparty-qemu.tex
+++ b/labs/sysdev-thirdparty-qemu/sysdev-thirdparty-qemu.tex
@@ -171,7 +171,10 @@ for more details on these options.
So, let's override the value of the \code{--host} option:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux}
+\bashcmd{$ ./configure --host=arm-linux}
+
+Note that \code{CC} is not required anymore. It is implied
+by \code{--host}.
The \code{configure} script should end properly now, and create a
Makefile.
@@ -185,7 +188,7 @@ build fine, but it will not work properly at runtime\footnote{See
for all the details}. So you should configure {\em alsa-lib} as
follows:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux --without-versioned}
+\bashcmd{$ ./configure --host=arm-linux --without-versioned}
Run the \code{make} command, which should run just fine.
@@ -260,7 +263,7 @@ the libraries to be installed in the \code{/usr} prefix, so let's tell
the \code{configure} script about this:
\begin{bashinput}
-$ CC=arm-linux-gcc ./configure --host=arm-linux --without-versioned --prefix=/usr
+$ ./configure --host=arm-linux --without-versioned --prefix=/usr
$ make
\end{bashinput}
@@ -354,7 +357,7 @@ with a regular \code{configure} script.
As we've seen previously, we will have to provide the prefix and host
options and the CC variable:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr}
+\bashcmd{$ ./configure --host=arm-linux --prefix=/usr}
Now, we should quiclky get an error in the execution of the
\code{configure} script:
@@ -390,7 +393,6 @@ Let's use it:
\begin{bashinput}
$ CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \%\linebreak
-CC=arm-linux-gcc %\% \linebreak
./configure --host=arm-linux --prefix=/usr
\end{bashinput}
@@ -422,7 +424,6 @@ Let's use this \code{LDFLAGS} variable:
\begin{bashinput}
$ LDFLAGS=-L$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/lib \
CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \
- CC=arm-linux-gcc \
./configure --host=arm-linux --prefix=/usr
\end{bashinput}
@@ -439,7 +440,6 @@ just like we built {\em alsa-lib}.
\begin{bashinput}
$ LDFLAGS=-L$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/lib \
CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \
- CC=arm-linux-gcc \
./configure --host=arm-linux --prefix=/usr \
--disable-alsamixer
\end{bashinput}
diff --git a/labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex b/labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex
index 24807ea9..2219ba4c 100644
--- a/labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex
+++ b/labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex
@@ -172,7 +172,10 @@ for more details on these options.
So, let's override the value of the \code{--host} option:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux}
+\bashcmd{$ ./configure --host=arm-linux}
+
+Note that \code{CC} is not required anymore. It is implied
+by \code{--host}.
The \code{configure} script should end properly now, and create a
Makefile.
@@ -186,7 +189,7 @@ build fine, but it will not work properly at runtime\footnote{See
for all the details}. So you should configure {\em alsa-lib} as
follows:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux --without-versioned}
+\bashcmd{$ ./configure --host=arm-linux --without-versioned}
Run the \code{make} command, which should run just fine.
@@ -261,7 +264,7 @@ the libraries to be installed in the \code{/usr} prefix, so let's tell
the \code{configure} script about this:
\begin{bashinput}
-$ CC=arm-linux-gcc ./configure --host=arm-linux --without-versioned --prefix=/usr
+$ ./configure --host=arm-linux --without-versioned --prefix=/usr
$ make
\end{bashinput}
@@ -355,7 +358,7 @@ with a regular \code{configure} script.
As we've seen previously, we will have to provide the prefix and host
options and the CC variable:
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr}
+\bashcmd{$ ./configure --host=arm-linux --prefix=/usr}
Now, we should quiclky get an error in the execution of the
\code{configure} script:
@@ -391,7 +394,6 @@ Let's use it:
\begin{bashinput}
$ CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \%\linebreak
-CC=arm-linux-gcc %\% \linebreak
./configure --host=arm-linux --prefix=/usr
\end{bashinput}
@@ -423,7 +425,6 @@ Let's use this \code{LDFLAGS} variable:
\begin{bashinput}
$ LDFLAGS=-L$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/lib \
CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \
- CC=arm-linux-gcc \
./configure --host=arm-linux --prefix=/usr
\end{bashinput}
@@ -440,7 +441,6 @@ just like we built {\em alsa-lib}.
\begin{bashinput}
$ LDFLAGS=-L$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/lib \
CPPFLAGS=-I$HOME/__SESSION_NAME__-labs/thirdparty/staging/usr/include \
- CC=arm-linux-gcc \
./configure --host=arm-linux --prefix=/usr \
--disable-alsamixer
\end{bashinput}
@@ -638,7 +638,7 @@ As this project doesn't have any external library dependency, let's
configure {\em libgpiod} in a similar way as {\em alsa-utils}:
\begin{bashinput}
-$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools
+$ ./configure --host=arm-linux --prefix=/usr --enable-tools
\end{bashinput}
Now, compile the software:
@@ -652,7 +652,7 @@ cross-compiling. We can preseed the result of this test by passing
\code{ac_cv_func_malloc_0_nonnull=yes}:
\begin{bashinput}
-$ ac_cv_func_malloc_0_nonnull=yes CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools
+$ ac_cv_func_malloc_0_nonnull=yes ./configure --host=arm-linux --prefix=/usr --enable-tools
\end{bashinput}
Installation to the {\em staging} space can be done using the
More information about the training-materials-updates
mailing list