summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild40
1 files changed, 25 insertions, 15 deletions
diff --git a/build b/build
index c0dccd4..328a850 100755
--- a/build
+++ b/build
@@ -4,11 +4,20 @@ CFLAGS = -g -O2
configure:
# Generate the main makefile.
- # Use (optionally sysroot-prefixed) multiarch library search directories.
- # Use shared BFD and opcodes libraries for all utilities.
- # Don't enable multilib (multiarch is better).
- # Enable plugins.
- # Don't expect to find Gettext.
+ # * Use (optionally sysroot-prefixed) multiarch library search
+ # directories.
+ # - The library path is given to ld/configure through host_configargs in
+ # ld/Makefile's "configure-host" target.
+ # - If we're building a sysroot ld, search only (native or target-
+ # specific) library paths under the sysroot.
+ # - Otherwise, if we're building a cross ld, search only target-specific
+ # library paths.
+ # * Use shared BFD and opcodes libraries for all utilities.
+ # - That is, dynamically link the utilities against a single copy of the
+ # BFD and opcodes libraries.
+ # * Don't enable multilib (multiarch is better).
+ # * Enable plugins.
+ # * Don't expect to find Gettext.
for target in $$(cat ../targets); do \
if [ -n '$(OPK_SYSROOT)' ]; then \
LIB_PATH="=/usr/local/lib/$${target}:=/usr/local/lib"; \
@@ -64,11 +73,11 @@ build: configure
install: build
# Install everything.
- # scriptdir contains target ldscripts.
- # ldscripts should be independent of the host architecture and therefore
- # coinstallable with themselves across host architectures (I hope).
- # All of these macro settings are effective thanks to
- # `patches/01_pass-some-dirs-to-child-makes.patch`.
+ # * scriptdir contains target ldscripts.
+ # * ldscripts should be independent of the host architecture and therefore
+ # coinstallable with themselves across host architectures (I hope).
+ # * All of these macro settings are effective thanks to
+ # `patches/01_pass-some-dirs-to-child-makes.patch`.
for target in $$(cat ../targets); do \
oh-autoinstall -B "build-$${target}" -d "binutils-$${target}.data" \
CFLAGS='$(CFLAGS)' \
@@ -77,11 +86,12 @@ install: build
bfdincludedir="/usr/include/$(OPK_HOST_ARCH)/$${target}" || \
exit 1; \
done
- # /usr/tool/bin (TOOLBINDIR) contains hard links to tools. A quick look at
- # the code suggests we don't need them; ld *should* work without them in any
- # sane configuration.
- # We don't need a static libiberty.
- # Remove static library dependency metadata generated by libtool.
+ # Do some cleanup.
+ # * /usr/tool/bin (TOOLBINDIR) contains hard links to tools. A quick look
+ # at the code suggests we don't need them; ld *should* work without them
+ # in any sane configuration.
+ # * We don't need a static libiberty.
+ # * Remove static library dependency metadata generated by libtool.
for target in $$(cat ../targets); do \
rm -Rf "binutils-$${target}.data/usr/tool" && \
find "binutils-$${target}.data/usr/lib" -name 'libiberty.a' \