From 87d6d92836be00bbf65686df9a4911768bf76461 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sun, 23 May 2021 17:36:14 +0200
Subject: [PATCH 17/N] Export CC and CXX variables explicitly

See https://github.com/msys2/MSYS2-packages/pull/2501
---
 scripts/libmakepkg/buildenv.sh.in            | 2 +-
 scripts/libmakepkg/buildenv/buildflags.sh.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/libmakepkg/buildenv.sh.in b/scripts/libmakepkg/buildenv.sh.in
index 6605788..85d5ec2 100644
--- a/scripts/libmakepkg/buildenv.sh.in
+++ b/scripts/libmakepkg/buildenv.sh.in
@@ -38,5 +38,5 @@ prepare_buildenv() {
 	done
 
 	# ensure all necessary build variables are exported
-	export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS RUSTFLAGS MAKEFLAGS CHOST
+	export CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS RUSTFLAGS MAKEFLAGS CHOST
 }
diff --git a/scripts/libmakepkg/buildenv/buildflags.sh.in b/scripts/libmakepkg/buildenv/buildflags.sh.in
index 873dd82..4ba1dbc 100644
--- a/scripts/libmakepkg/buildenv/buildflags.sh.in
+++ b/scripts/libmakepkg/buildenv/buildflags.sh.in
@@ -30,6 +30,6 @@ buildenv_functions+=('buildenv_buildflags')
 
 buildenv_buildflags() {
 	if check_option "buildflags" "n"; then
-		unset CPPFLAGS CFLAGS DEBUG_CFLAGS CXXFLAGS DEBUG_CXXFLAGS LDFLAGS RUSTFLAGS DEBUG_RUSTFLAGS
+		unset CC CXX CPPFLAGS CFLAGS DEBUG_CFLAGS CXXFLAGS DEBUG_CXXFLAGS LDFLAGS RUSTFLAGS DEBUG_RUSTFLAGS
 	fi
 }
-- 
2.33.0

