source: scripts/target-scripts/target-m4.sh@ 7882dc5

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 7882dc5 was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 1.6 KB
Line 
1#!/bin/bash
2
3# cross-lfs target m4 build
4# -------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=m4-target.log
13
14unpack_tarball m4-${M4_VER} &&
15cd ${PKGDIR}
16
17set_libdirname
18setup_multiarch
19
20if [ "${USE_SYSROOT}" = "Y" ]; then
21 BUILD_PREFIX=/usr
22 INSTALL_PREFIX="${LFS}${BUILD_PREFIX}"
23 INSTALL_OPTIONS="prefix=${INSTALL_PREFIX}"
24else
25 BUILD_PREFIX="${TGT_TOOLS}"
26 INSTALL_PREFIX="${TGT_TOOLS}"
27 INSTALL_OPTIONS=""
28fi
29
30# NOTE: with gcc-3.4.0, linux-libc-headers-2.6.5.1 on
31# biarch x86_64-pc-linux-gnu the build barfed out with
32# errors in lib/regex.c due to conflicting types for
33# malloc. removed definitions of malloc/realloc and
34# made it so stlib.h always gets read.
35#
36# : same results with linux-libc-headers-2.6.6.0 with
37# gcc-3.4.1-20040620 on x86_64-pc-linux-gnu
38#
39# TODO: check if other architecturess are affected, and for what
40# glibc/gcc/m4 versions.
41#
42# : same issue w powerpc...
43#
44# Get a better fix for this....
45case ${TGT_ARCH} in
46 x86_64 | ppc | powerpc | powerpc64 )
47 apply_patch m4-1.4-regex_c-hack
48 ;;
49esac
50
51max_log_init M4 ${M4_VER} "target (shared)" ${CONFLOGS} ${LOG}
52CC="${TARGET}-gcc ${ARCH_CFLAGS}" AR="${TARGET}-ar" RANLIB="${TARGET}-ranlib" \
53CFLAGS="-O2 -pipe ${TGT_CFLAGS}" ./configure --prefix=${BUILD_PREFIX} \
54 --host=${TARGET} \
55 >> ${LOGFILE} 2>&1 &&
56echo " o Configure OK" &&
57
58min_log_init ${BUILDLOGS} &&
59make LDFLAGS="-s" \
60 >> ${LOGFILE} 2>&1 &&
61echo " o Build OK" &&
62
63min_log_init ${INSTLOGS} &&
64make ${INSTALL_OPTIONS} install \
65 >> ${LOGFILE} 2>&1 &&
66echo " o ALL OK" || barf
67
Note: See TracBrowser for help on using the repository browser.