Skip to contentSkip to conversation

Makefile: unexport O

PATCH New Guido Martínez 4 participants 4 messages Jul 25, 2015 – Jul 26, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: unexport O

After bee5745ccc2 ("Makefile: don't depend on the umask"), any use of "make O=<dir>" would leak $O into the enviroment for submakes, and it's inherited by package makefiles. Some package makefiles have protections to make sure they don't use the value of $O if it comes from the enviroment (Linux), but some don't (uClibc).

This caused build failures when using a different output dir.

Fix this by unconditionally unexporting the O variable, since we never need to have it set in the environment for packages, it should be only internally used by BR.

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index 8b9c5d9..9059884 100644
@@ -329,6 +329,7 @@ unexport CONFIG_SITE
 unexport QMAKESPEC
 unexport TERMINFO
 unexport MACHINE
+unexport O
 
 GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 Makefile: unexport O

Guido, All,

On 2015-07-25 16:07 -0300, Guido Mart?nez spake thusly:

Quoted 6 lines

After bee5745ccc2 ("Makefile: don't depend on the umask"), any use of "make O=<dir>" would leak $O into the enviroment for submakes, and it's inherited by package makefiles. Some package makefiles have protections to make sure they don't use the value of $O if it comes from the enviroment (Linux), but some don't (uClibc).

Quoted 7 lines

This caused build failures when using a different output dir.

Fix this by unconditionally unexporting the O variable, since we never need to have it set in the environment for packages, it should be only internally used by BR.

Regards,
Yann E. MORIN.

Quoted 19 lines
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index 8b9c5d9..9059884 100644
@@ -329,6 +329,7 @@ unexport CONFIG_SITE
 unexport QMAKESPEC
 unexport TERMINFO
 unexport MACHINE
+unexport O
 
 GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 
Signature · 1 line
2.1.4
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 Makefile: unexport O

In reply to Guido Martínez

Hi Guido,

Le 25/07/2015 21:07, Guido Mart?nez a ?crit :

Quoted 6 lines

After bee5745ccc2 ("Makefile: don't depend on the umask"), any use of "make O=<dir>" would leak $O into the enviroment for submakes, and it's inherited by package makefiles. Some package makefiles have protections to make sure they don't use the value of $O if it comes from the enviroment (Linux), but some don't (uClibc).

Quoted 7 lines

This caused build failures when using a different output dir.

Fix this by unconditionally unexporting the O variable, since we never need to have it set in the environment for packages, it should be only internally used by BR.

Best regards,
Romain Naour

Quoted 17 lines
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index 8b9c5d9..9059884 100644
@@ -329,6 +329,7 @@ unexport CONFIG_SITE
 unexport QMAKESPEC
 unexport TERMINFO
 unexport MACHINE
+unexport O
 
 GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 
#3 lore raw

PATCH 1/1 Makefile: unexport O

In reply to Guido Martínez

Dear Guido Mart?nez,

Quoted 8 lines · Guido Mart?nez

After bee5745ccc2 ("Makefile: don't depend on the umask"), any use of "make O=<dir>" would leak $O into the enviroment for submakes, and it's inherited by package makefiles. Some package makefiles have protections to make sure they don't use the value of $O if it comes from the enviroment (Linux), but some don't (uClibc).

This caused build failures when using a different output dir.

Quoted 8 lines

Fix this by unconditionally unexporting the O variable, since we never need to have it set in the environment for packages, it should be only internally used by BR.

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com