Diff

Differences From Artifact [5526d031f2]:

To Artifact [6b42e787ea]:


154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
			fi

			pkgfound='1'

			for pkgchange in "${pkgchanges[@]}"; do
				case "${pkgchange}" in
					CFLAGS)
						CFLAGS="${CFLAGS} -I${pkgdir}/include"
						CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include"
						export CFLAGS CPPFLAGS
						;;
					LDFLAGS)
						LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib"
						export LDFLAGS
						;;
					PATH)







|
|







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
			fi

			pkgfound='1'

			for pkgchange in "${pkgchanges[@]}"; do
				case "${pkgchange}" in
					CFLAGS)
						CFLAGS="${CFLAGS} -isystem ${pkgdir}/include"
						CPPFLAGS="${CPPFLAGS} -isystem ${pkgdir}/include"
						export CFLAGS CPPFLAGS
						;;
					LDFLAGS)
						LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib"
						export LDFLAGS
						;;
					PATH)
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

	dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"

	if [ ! -f "${dynlinker}" ]; then
		die 'glibc directory is not available (appfs running/working?)'
	fi

	gcc_default_headers="$(echo '' | ${CPP:-cpp} -v 2>&1 | sed '/^End of search list/,$ d;0,/search starts here:$/ d' | grep '/gcc/' | sed 's@^ *@-I@' | tr $'\n' ' ')"

	CC="${CC:-gcc} -nostdinc ${gcc_default_headers} -I${glibcdir}/include"

	if ! echo " ${require[*]} " | grep ' linux-headers[/@: ]' >/dev/null; then
		CC="${CC} -I${linuxheadersdir}/include"
	fi

	BUILD_CC="${CC}"
	HOST_CC="${CC}"
	LDFLAGS="${LDFLAGS} -L${glibcdir}/lib -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"
	PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig"
	export CC BUILD_CC HOST_CC LDFLAGS PKG_CONFIG_LIBDIR







|

|


|







232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

	dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"

	if [ ! -f "${dynlinker}" ]; then
		die 'glibc directory is not available (appfs running/working?)'
	fi

	gcc_default_headers="$(echo '' | ${CPP:-cpp} -v 2>&1 | sed '/^End of search list/,$ d;0,/search starts here:$/ d' | grep '/gcc/' | sed 's@^ *@-isystem @' | tr $'\n' ' ')"

	CC="${CC:-gcc} -nostdinc ${gcc_default_headers} -isystem ${glibcdir}/include"

	if ! echo " ${require[*]} " | grep ' linux-headers[/@: ]' >/dev/null; then
		CC="${CC} -isystem ${linuxheadersdir}/include"
	fi

	BUILD_CC="${CC}"
	HOST_CC="${CC}"
	LDFLAGS="${LDFLAGS} -L${glibcdir}/lib -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"
	PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig"
	export CC BUILD_CC HOST_CC LDFLAGS PKG_CONFIG_LIBDIR