From 3ab308442fb42269d6b6b30427c8b6773ae23739 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 11 Nov 2012 15:09:06 -0500 Subject: We don't need no stinkin' patch for the lib path. --- (limited to 'build') diff --git a/build b/build index 0b16f5c..6bdaa7a 100755 --- a/build +++ b/build @@ -4,13 +4,27 @@ 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. for target in $$(cat ../targets); do \ - CFLAGS='$(CFLAGS)' oh-autoconfigure \ - -B "build-$${target}" -t "$${target}" -- \ + 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"; \ + else \ + 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}") \ --program-transform-name="s&^&$${target}-&" \ -- cgit v0.9.1