181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
-
+
+
+
+
+
-
-
+
+
+
+
+
|
:
}
function postconfigure() {
:
}
function configure() {
function configure_gcc() {
glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest"
glibcdir="$(readlink -f "${glibcdir}")"
dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"
if [ ! -f "${dynlinker}" ]; then
die 'glibc directory is not available (appfs running/working?)'
fi
CC="${CC:-gcc} -nostdinc -I${glibcdir}/include"
BUILD_CC="${CC}"
HOST_CC="${CC}"
LDFLAGS="${LDFLAGS} -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"
PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig"
export LDFLAGS PKG_CONFIG_LIBDIR
export CC BUILD_CC HOST_CC LDFLAGS PKG_CONFIG_LIBDIR
}
function configure() {
configure_gcc
./configure --prefix="${prefix}" --sysconfdir="${prefix}/etc" --libdir="${prefix}/lib" --localstatedir=/var "${configure_extra[@]}"
}
function prebuild() {
:
}
|
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
-
-
|
message="$1"
if [ -n "${message}" ]; then
echo "error: ${message}" >&2
fi
cleanup
exit 1
}
scriptdir="$(cd "$(dirname "$(which "$0")")" && pwd)"
if [ -z "${scriptdir}" ]; then
echo "Unable to locate script directory" >&2
|