# This pile of crap cannot be built without zlib. Even if you're not using # it, neither the autoconf nor the C has any concept of _not_ using zlib. setupfor zlib env CC=$(HOST_ARCH:+${HOST_ARCH}-)$CC ./configure && make -j $CPUS && install -D z*.h "$STAGE_DIR/host/include" && install -D libz.a "$STAGE_DIR/host/lib" && cleanup setupfor elf2flt env CC=$(HOST_ARCH:+${HOST_ARCH}-)$CC CFLAGS="$CFLAGS $STATIC_FLAGS" \ ./configure --with-bfd-include-dir="$STAGE_DIR/host/include" \ --with-binutils-include-dir="$STAGE_DIR/host/include" \ --with-libiberty="$STAGE_DIR/host/lib/libiberty.a" --prefix="$STAGE_DIR" \ --with-libbfd="$STAGE_DIR/host/lib/libbfd.a" --target="$ELF2FLT" \ --with-zlib-prefix="$STAGE_DIR/host" --enable-always-reloc-text \ $(HOST_ARCH:+--host=${KARCH}-unknown-linux) && make -j $CPUS && make install TARGET="$CROSS_TARGET" PREFIX="$TOOLCHAIN_PREFIX" test $Status -ne 0 && dienow # elf2flt's wrapper sometimes calls the unprefixed version of this. :( if test ! -e "$STAGE_DIR/bin/ld.real" { ln -s "$(TOOLCHAIN_PREFIX)ld.real" "$STAGE_DIR/bin/ld.real" } cleanup (CommandList children: [ (C {(setupfor)} {(zlib)}) (AndOr children: [ (SimpleCommand words: [{(./configure)}] more_env: [ (env_pair name: CC val: { (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonPlus arg_word: {(${ VSub_Name HOST_ARCH) (-)} ) spids: [12 19] ) ($ VSub_Name "$CC") } spids: [11] ) ] ) (AndOr children: [ (C {(make)} {(-j)} {($ VSub_Name "$CPUS")}) (AndOr children: [ (C {(install)} {(-D)} {(z) (Lit_Other "*") (.h)} {(DQ ($ VSub_Name "$STAGE_DIR") (/host/include))} ) (AndOr children: [ (C {(install)} {(-D)} {(libz.a)} {(DQ ($ VSub_Name "$STAGE_DIR") (/host/lib))}) (C {(cleanup)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(setupfor)} {(elf2flt)}) (AndOr children: [ (SimpleCommand words: [ {(./configure)} {(--with-bfd-include-dir) (Lit_Other "=") (DQ ($ VSub_Name "$STAGE_DIR") (/host/include))} {(--with-binutils-include-dir) (Lit_Other "=") (DQ ($ VSub_Name "$STAGE_DIR") (/host/include)) } {(--with-libiberty) (Lit_Other "=") (DQ ($ VSub_Name "$STAGE_DIR") (/host/lib/libiberty.a)) } {(--prefix) (Lit_Other "=") (DQ ($ VSub_Name "$STAGE_DIR"))} {(--with-libbfd) (Lit_Other "=") (DQ ($ VSub_Name "$STAGE_DIR") (/host/lib/libbfd.a))} {(--target) (Lit_Other "=") (DQ ($ VSub_Name "$ELF2FLT"))} {(--with-zlib-prefix) (Lit_Other "=") (DQ ($ VSub_Name "$STAGE_DIR") (/host))} {(--enable-always-reloc-text)} { (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonPlus arg_word: {("--host=") (${ VSub_Name KARCH) (-unknown-linux)} ) spids: [150 158] ) } ] more_env: [ (env_pair name: CC val: { (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonPlus arg_word: {(${ VSub_Name HOST_ARCH) (-)} ) spids: [70 77] ) ($ VSub_Name "$CC") } spids: [69] ) (env_pair name: CFLAGS val: {(DQ ($ VSub_Name "$CFLAGS") (" ") ($ VSub_Name "$STATIC_FLAGS"))} spids: [80] ) ] ) (AndOr children: [ (C {(make)} {(-j)} {($ VSub_Name "$CPUS")}) (C {(make)} {(install)} {(Lit_VarLike "TARGET=") (DQ ($ VSub_Name "$CROSS_TARGET"))} {(Lit_VarLike "PREFIX=") (DQ ($ VSub_Name "$TOOLCHAIN_PREFIX"))} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")}) (C {(dienow)}) ] op_id: Op_DAmp ) (If arms: [ (if_arm cond: [ (C {(Lit_Other "[")} {(KW_Bang "!")} {(-e)} {(DQ ($ VSub_Name "$STAGE_DIR") (/bin/ld.real))} {(Lit_Other "]")} ) ] action: [ (C {(ln)} {(-s)} {(DQ (${ VSub_Name TOOLCHAIN_PREFIX) (ld.real))} {(DQ ($ VSub_Name "$STAGE_DIR") (/bin/ld.real))} ) ] spids: [-1 219] ) ] spids: [-1 238] ) (C {(cleanup)}) ] )