1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #!/bin/bash
- set +h
- source "$basedir/build-helpers.sh"
- patch_commands() {
- patchfile="$pkgver"-upstream_i386_fix-1.patch
- patch_md5=$(md5sum "$patchfile" | cut -d' ' -f1)
- check_md5=$(awk "/[[:space:]]+$patchfile$/ {print \$1}" md5sums)
- [[ $check_md5 = $patch_md5 ]] || {
- >&2 printf 'Incorrect md5sums: %s != %s\n' $patch_md5 $check_md5
- exit 1
- }
- cd "$srcdir"
- patch -Np1 -i ../"$patchfile"
- }
- configure_commands() {
- cd "$builddir"
- local build=$($srcdir/scripts/config.guess)
- "$srcdir"/configure \
- --prefix=/tools \
- --host="$LFS_TGT" \
- --build="$build" \
- --disable-profile \
- --enable-kernel=2.6.32 \
- --enable-obsolete-rpc \
- --with-headers=/tools/include \
- libc_cv_forced_unwind=yes \
- libc_cv_ctors_header=yes \
- libc_cv_c_cleanup=yes
- }
- test_commands() {
- cd /tmp
- testfile=dummy.c
- echo 'int main(){}' > $testfile
- $LFS_TGT-gcc -v $testfile -o a.out
- [[ -f a.out ]] || {
- >&2 echo $LFS_TGT-gcc failed to produce a.out
- exit 1
- }
- readelf -l a.out | grep ': /tools'
- }
|