Skip to contentSkip to conversation

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

PATCH New Thomas De Schampheleire 2 participants 4 messages Feb 5, 2019 – Feb 18, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: unexport 'PLATFORM' and 'OS' environment variables

From: Thomas De Schampheleire <[email protected]>

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.

---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)
Makefile +2 -0
index 355a404e04..50a9f623b2 100644
@@ -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)
 
Signature · 1 line
2.19.2
#1 lore raw

PATCH 1/1 Makefile: unexport 'PLATFORM' and 'OS' environment variables

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

From: Thomas De Schampheleire <[email protected]> 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;

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 Makefile: unexport 'PLATFORM' and 'OS' environment variables

In reply to Thomas De Schampheleire
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

From: Thomas De Schampheleire <[email protected]> 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.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 Makefile: unexport 'PLATFORM' and 'OS' environment variables

In reply to Thomas De Schampheleire
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

From: Thomas De Schampheleire <[email protected]> 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.

Committed to 2018.02.x and 2018.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard