diff mbox series

Makefile: unexport 'PLATFORM' and 'OS' environment variables

Message ID 20190205110342.29725-1-patrickdepinguin@gmail.com
State Accepted
Commit d3e535a839a893d4721240278fada4652544b60c
Headers show
Series Makefile: unexport 'PLATFORM' and 'OS' environment variables | expand

Commit Message

Thomas De Schampheleire Feb. 5, 2019, 11:03 a.m. UTC
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

Some package builds may fail when environment variables are present with the
same names as make variables in a package. This is a bigger problem for
environment variables with generic names, like 'PLATFORM' and 'OS'.

'PLATFORM' is for example a problem for host-acl.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Peter Korsgaard Feb. 5, 2019, 1:25 p.m. UTC | #1
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:

 > From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
 > Some package builds may fail when environment variables are present with the
 > same names as make variables in a package. This is a bigger problem for
 > environment variables with generic names, like 'PLATFORM' and 'OS'.

 > 'PLATFORM' is for example a problem for host-acl.

I'm OK with the patch, but what is the error exactly for host-acl? I
don't seem to see any reference to the string 'PLATFORM' in host-acl:

make host-acl-patch
grep -rs PLATFORM build/host-acl-2.2.53
build/host-acl-2.2.53/build-aux/ltmain.sh:         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
build/host-acl-2.2.53/build-aux/ltmain.sh.orig:         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
Peter Korsgaard Feb. 5, 2019, 2:22 p.m. UTC | #2
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:

 > From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
 > Some package builds may fail when environment variables are present with the
 > same names as make variables in a package. This is a bigger problem for
 > environment variables with generic names, like 'PLATFORM' and 'OS'.

 > 'PLATFORM' is for example a problem for host-acl.

 > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

Committed, thanks.
Peter Korsgaard Feb. 18, 2019, 4:15 p.m. UTC | #3
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:

 > From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
 > Some package builds may fail when environment variables are present with the
 > same names as make variables in a package. This is a bigger problem for
 > environment variables with generic names, like 'PLATFORM' and 'OS'.

 > 'PLATFORM' is for example a problem for host-acl.

 > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

Committed to 2018.02.x and 2018.11.x, thanks.
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 355a404e04..50a9f623b2 100644
--- a/Makefile
+++ b/Makefile
@@ -419,6 +419,8 @@  unexport TERMINFO
 unexport MACHINE
 unexport O
 unexport GCC_COLORS
+unexport PLATFORM
+unexport OS
 
 GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)