Mercurial > hg > aboriginal
annotate sources/sections/elf2flt.sh @ 1789:17d2316a3c3a draft
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 16 Sep 2015 17:08:11 -0500 |
parents | eca87f8f58fb |
children | d461b345c3c9 |
rev | line source |
---|---|
1773
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
1 # This pile of crap cannot be built without zlib. Even if you're not using |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
2 # it, neither the autoconf nor the C has any concept of _not_ using zlib. |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
3 |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
4 setupfor zlib |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
5 CC=${HOST_ARCH:+${HOST_ARCH}-}$CC ./configure && |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
6 make -j $CPUS && |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
7 install -D z*.h "$STAGE_DIR/host/include" && |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
8 install -D libz.a "$STAGE_DIR/host/lib" && |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
9 cleanup |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
10 |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
11 setupfor elf2flt |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
12 CC=${HOST_ARCH:+${HOST_ARCH}-}$CC CFLAGS="$CFLAGS $STATIC_FLAGS" \ |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
13 ./configure --with-bfd-include-dir="$STAGE_DIR/host/include" \ |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
14 --with-binutils-include-dir="$STAGE_DIR/host/include" \ |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
15 --with-libiberty="$STAGE_DIR/host/lib/libiberty.a" --prefix="$STAGE_DIR" \ |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
16 --with-libbfd="$STAGE_DIR/host/lib/libbfd.a" --target="$ELF2FLT" \ |
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
17 --with-zlib-prefix="$STAGE_DIR/host" && |
1704
3675adfb4e36
Add basic elf2flt support to simple-cross-compiler.sh and sh2eb.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 make -j $CPUS && |
3675adfb4e36
Add basic elf2flt support to simple-cross-compiler.sh and sh2eb.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 make install TARGET="$CROSS_TARGET" PREFIX="$TOOLCHAIN_PREFIX" |
1789
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
20 |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
21 [ $? -ne 0 ] && dienow |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
22 |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
23 # elf2flt's wrapper sometimes calls the unprefixed version of this. :( |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
24 |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
25 if [ ! -e "$STAGE_DIR/bin/ld.real" ] |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
26 then |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
27 ln -s "${TOOLCHAIN_PREFIX}ld.real" "$STAGE_DIR/bin/ld.real" |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
28 fi |
17d2316a3c3a
The elf2flt wrapper sometimes calles the unprefixed ld.real. Humor it for now.
Rob Landley <rob@landley.net>
parents:
1773
diff
changeset
|
29 |
1773
eca87f8f58fb
Changes to build cross-compiler-sh2eb.
Rob Landley <rob@landley.net>
parents:
1759
diff
changeset
|
30 cleanup |