summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/stage-0-binutils.TARGETS22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/bootstrap/stage-0-binutils.TARGETS b/src/bootstrap/stage-0-binutils.TARGETS
index c4b0d51..ea09156 100644
--- a/src/bootstrap/stage-0-binutils.TARGETS
+++ b/src/bootstrap/stage-0-binutils.TARGETS
@@ -9,21 +9,9 @@
, "target": "binutils"
}
, "files": {"type": "install", "deps": [["TREE", null, "."]]}
-, "flag_files":
- { "type": ["@", "rules", "CC/foreign/shell", "data"]
- , "cmds":
- [ "echo 'int main() {int i=1; return *((char*)&i) == 1;}' > endian_test.c"
- , "${CC} ${CFLAGS} -o endian_test endian_test.c"
- , "CFLAGS=\"-D__$(./endian_test && echo BIG || echo LITTLE)_ENDIAN__=1\""
- , "echo \"${CFLAGS}\" > ${DESTDIR}/cflags"
- ]
- , "outs": ["cflags"]
- }
-, "staged_bootstrap_sources_and_flags":
- {"type": "install", "dirs": [["files", "src"], ["flag_files", "flags"]]}
, "bootstrap-ar":
{ "type": ["@", "rules", "CC/foreign/shell", "data"]
- , "project": ["staged_bootstrap_sources_and_flags"]
+ , "project": ["files"]
, "localbase":
[["@", "busybox", "", "bootstrap"], ["@", "make", "", "bootstrap"]]
, "cmds":
@@ -33,20 +21,19 @@
, "export MAKE=${LOCALBASE}/bin/make"
, "export PATH=${LOCALBASE}/bin:$PATH"
, "unset LDFLAGS"
- , "cd src"
, "./configure --prefix=/ --disable-nls --enable-shared=no --enable-plugins=no --enable-gprofng=no --disable-werror --enable-deterministic-archives --without-zstd >configure.log 2>&1 || (cat configure.log && exit 1)"
, "${MAKE} MAKEINFO=true all-binutils >build.log 2>&1 || true"
, "cd binutils"
, "AR_SRCS='ar.c arparse.c arlex.c arsup.c not-ranlib.c rename.c binemul.c emul_vanilla.c bucomm.c version.c filemode.c'"
, "AR_DEPS=\"$(ls ../bfd/*.o ../libiberty/*.o ../zlib/*.o ../libsframe/*.o | LC_ALL=C sort)\""
- , "AR_CFLAGS=\"${CFLAGS} $(cat ../../flags/cflags) -DDEFAULT_AR_DETERMINISTIC=1 -Dbin_dummy_emulation=bin_vanilla_emulation -I../include -I../bfd\""
+ , "AR_CFLAGS=\"${CFLAGS} -DDEFAULT_AR_DETERMINISTIC=1 -Dbin_dummy_emulation=bin_vanilla_emulation -I../include -I../bfd\""
, "${CC} ${AR_CFLAGS} -o ${DESTDIR}/bin/ar ${AR_SRCS} ${AR_DEPS} >../build.log 2>&1 || (cat ../configure.log ../build.log && exit 1)"
]
, "outs": ["bin/ar"]
}
, "binutils":
{ "type": ["@", "rules", "CC/foreign/shell", "data"]
- , "project": ["staged_bootstrap_sources_and_flags"]
+ , "project": ["files"]
, "localbase":
[ ["@", "busybox", "", "bootstrap"]
, ["@", "make", "", "bootstrap"]
@@ -58,7 +45,6 @@
, "export AR=${LOCALBASE}/bin/ar"
, "export MAKE=${LOCALBASE}/bin/make"
, "export PATH=${LOCALBASE}/bin:$PATH"
- , "export CFLAGS=\"${CFLAGS} $(cat flags/cflags)\""
, "unset LDFLAGS"
, "if [ -f /lib/ld-musl-$(uname -m).so.1 ]; then"
, " ln -s /lib/ld-musl-$(uname -m).so.1 ${TMPDIR}/ldd"
@@ -66,7 +52,7 @@
, "fi"
, "mkdir build"
, "cd build"
- , "../src/configure --prefix=/ --disable-nls --enable-gprofng=no --disable-werror --enable-deterministic-archives >configure.log 2>&1 || (cat configure.log && exit 1)"
+ , "../configure --prefix=/ --disable-nls --enable-gprofng=no --disable-werror --enable-deterministic-archives >configure.log 2>&1 || (cat configure.log && exit 1)"
, "${MAKE} -j1 MAKEINFO=true >build.log 2>&1 || (cat configure.log build.log && exit 1)"
, "${MAKE} -j1 MAKEINFO=true DESTDIR=${DESTDIR} install-strip >>build.log 2>&1 || (cat configure.log build.log && exit 1)"
, "for f in $(find ${DESTDIR} -type f -name '*.la'); do sed -i 's|'$(pwd)'|/build|g' $f; done"