Skip to content

Commit ef802d0

Browse files
committed
build: Propagate TOOL_FOR_BUILD variables to the configure script
1 parent abe8646 commit ef802d0

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

depends/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,14 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
220220
$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
221221
@mkdir -p $(@D)
222222
sed -e 's|@HOST@|$(host)|' \
223+
-e 's|@CC_FOR_BUILD@|$(build_CC)|' \
224+
-e 's|@CXX_FOR_BUILD@|$(build_CXX)|' \
225+
-e 's|@AR_FOR_BUILD@|$(build_AR)|' \
226+
-e 's|@TAR_FOR_BUILD@|$(build_TAR)|' \
227+
-e 's|@RANLIB_FOR_BUILD@|$(build_RANLIB)|' \
228+
-e 's|@NM_FOR_BUILD@|$(build_NM)|' \
229+
-e 's|@STRIP_FOR_BUILD@|$(build_STRIP)|' \
230+
-e 's|@build_os@|$(build_os)|' \
223231
-e 's|@CC@|$(host_CC)|' \
224232
-e 's|@CXX@|$(host_CXX)|' \
225233
-e 's|@AR@|$(host_AR)|' \
@@ -229,7 +237,6 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
229237
-e 's|@OTOOL@|$(host_OTOOL)|' \
230238
-e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
231239
-e 's|@DSYMUTIL@|$(host_DSYMUTIL)|' \
232-
-e 's|@build_os@|$(build_os)|' \
233240
-e 's|@host_os@|$(host_os)|' \
234241
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
235242
-e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \

depends/config.site.in

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,28 @@ fi
9595
CPPFLAGS="-I${depends_prefix}/include/ ${CPPFLAGS}"
9696
LDFLAGS="-L${depends_prefix}/lib ${LDFLAGS}"
9797

98+
if test -n "@CC_FOR_BUILD@" -a -z "${CC_FOR_BUILD}"; then
99+
CC_FOR_BUILD="@CC_FOR_BUILD@"
100+
fi
101+
if test -n "@CXX_FOR_BUILD@" -a -z "${CXX_FOR_BUILD}"; then
102+
CXX_FOR_BUILD="@CXX_FOR_BUILD@"
103+
fi
104+
if test -n "@AR_FOR_BUILD@"; then
105+
AR_FOR_BUILD="@AR_FOR_BUILD@"
106+
fi
107+
if test -n "@TAR_FOR_BUILD@"; then
108+
TAR_FOR_BUILD="@TAR_FOR_BUILD@"
109+
fi
110+
if test -n "@RANLIB_FOR_BUILD@"; then
111+
RANLIB_FOR_BUILD="@RANLIB_FOR_BUILD@"
112+
fi
113+
if test -n "@NM_FOR_BUILD@"; then
114+
NM_FOR_BUILD="@NM_FOR_BUILD@"
115+
fi
116+
if test -n "@STRIP_FOR_BUILD@"; then
117+
STRIP_FOR_BUILD="@STRIP_FOR_BUILD@"
118+
fi
119+
98120
if test -n "@CC@" -a -z "${CC}"; then
99121
CC="@CC@"
100122
fi

0 commit comments

Comments
 (0)