From e88ced3381a79d1d33c9f0e06c8f95f80940905f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 12 Nov 2012 13:23:54 -0500 Subject: Fix sysroot configuration; use "/" by default. --- (limited to 'build') 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 \ -- cgit v0.9.1