diff options
author | P. J. McDermott <pjm@nac.net> | 2012-11-11 15:09:06 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-11-11 15:11:02 (EST) |
commit | 3ab308442fb42269d6b6b30427c8b6773ae23739 (patch) | |
tree | fb257a342ace0d93349448f6f685895c30364270 /build | |
parent | 50e3241ddfd637d031178b5fad8e48715cff1b2b (diff) |
We don't need no stinkin' patch for the lib path.
Diffstat (limited to 'build')
-rwxr-xr-x | build | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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}-&" \ |