Skip to content

Commit

Permalink
libmakepkg: do not unset CHOST with !buildflags
Browse files Browse the repository at this point in the history
Also ensure CHOST and MAKEFLAGS are exported.

Signed-off-by: Allan McRae <[email protected]>
  • Loading branch information
allanmcrae authored and lazka committed May 6, 2024
1 parent 4c289fa commit c6ffd04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/libmakepkg/buildenv.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LIBMAKEPKG_BUILDENV_SH=1
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}

declare -a buildenv_functions build_options
buildenv_vars=('CPPFLAGS' 'CFLAGS' 'CXXFLAGS' 'LDFLAGS' 'CHOST')
buildenv_vars=('CPPFLAGS' 'CFLAGS' 'CXXFLAGS' 'LDFLAGS')

for lib in "$MAKEPKG_LIBRARY/buildenv/"*.sh; do
source "$lib"
Expand All @@ -42,5 +42,5 @@ prepare_buildenv() {
done

# ensure all necessary build variables are exported
export ${buildenv_vars[@]} CC CXX
export ${buildenv_vars[@]} CC CXX CHOST MAKEFLAGS
}

0 comments on commit c6ffd04

Please sign in to comment.