summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild33
1 files changed, 14 insertions, 19 deletions
diff --git a/build b/build
index ecfc037..9a575f1 100755
--- a/build
+++ b/build
@@ -1,20 +1,20 @@
#! /usr/bin/make -f
CFLAGS = -g -O2
+OPK_SYSROOT = /
nop:
@:
configure:
# Generate the main makefile.
- # * Use (optionally sysroot-prefixed) multiarch library search
- # directories.
+ # * Use 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.
+ # - If we're building a cross ld, search only target-specific library
+ # paths.
+ # * TODO: Should the sysroot be handled differently for cross binutils?
+ # - Should there be build and host system roots?
# * 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.
@@ -22,23 +22,18 @@ configure:
# * 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"; \
- LIB_PATH="$${LIB_PATH}:=/lib/$${target}:=/lib"; \
- LIB_PATH="$${LIB_PATH}:=/usr/lib/$${target}:=/usr/lib"; \
- elif [ '$(OPK_HOST_ARCH)' = "$${target}" ]; then \
- LIB_PATH="/usr/local/lib/$${target}:/usr/local/lib"; \
- LIB_PATH="$${LIB_PATH}:/lib/$${target}:/lib"; \
- LIB_PATH="$${LIB_PATH}:/usr/lib/$${target}:/usr/lib"; \
+ if [ '$(OPK_HOST_ARCH)' = "$${target}" ]; then \
+ LIB_PATH="=/usr/local/lib/$${target}=:/usr/local/lib"; \
+ LIB_PATH="$${LIB_PATH}=:/lib/$${target}=:/lib"; \
+ LIB_PATH="$${LIB_PATH}=:/usr/lib/$${target}=:/usr/lib"; \
else \
- LIB_PATH="/usr/local/lib/$${target}"; \
- LIB_PATH="$${LIB_PATH}:/lib/$${target}"; \
- LIB_PATH="$${LIB_PATH}:/usr/lib/$${target}"; \
+ LIB_PATH="=/usr/local/lib/$${target}"; \
+ LIB_PATH="$${LIB_PATH}=:/lib/$${target}"; \
+ LIB_PATH="$${LIB_PATH}=:/usr/lib/$${target}"; \
fi; \
CFLAGS='$(CFLAGS)' host_configargs="--with-lib-path=$${LIB_PATH}" \
oh-autoconfigure -B "build-$${target}" -t "$${target}" -- \
- $$([ -n "$${OPK_SYSROOT}" ] && \
- printf "--with-sysroot='%s'" "$${OPK_SYSROOT}") \
+ --with-sysroot='$(OPK_SYSROOT)' \
--program-transform-name="s&^&$${target}-&" \
--enable-shared --disable-multilib \
--enable-plugins --disable-nls \