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 | |
parent | 50e3241ddfd637d031178b5fad8e48715cff1b2b (diff) |
We don't need no stinkin' patch for the lib path.
-rw-r--r-- | README | 9 | ||||
-rwxr-xr-x | build | 18 | ||||
-rw-r--r-- | patches/02_use-multiarch-lib-search-dirs-in-ldscripts.patch | 17 |
3 files changed, 16 insertions, 28 deletions
@@ -1,12 +1,6 @@ Binutils Package ================ -Interesting Patches -------------------- - -ld needs to be built with multiarch library directories in its list of search -paths. Debian has [a patch][debian-ld-ma-patch] to which we can refer for this. - Building the Binutils Package ----------------------------- @@ -57,6 +51,3 @@ Makefile.in (unlikely) and changes in the features (e.g. gold) we enable The trivial patch (which adds just three lines) should apply cleanly across Binutils releases, so it seems best to just stick with that. - - -[debian-ld-ma-patch]: http://patch-tracker.debian.org/patch/series/view/binutils/2.22-7.1/129_ld_mulitarch_dirs.patch @@ -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}-&" \ diff --git a/patches/02_use-multiarch-lib-search-dirs-in-ldscripts.patch b/patches/02_use-multiarch-lib-search-dirs-in-ldscripts.patch deleted file mode 100644 index b8cf899..0000000 --- a/patches/02_use-multiarch-lib-search-dirs-in-ldscripts.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Use multiarch library search directories in ldscripts - The ldscripts of course control the linking of *target-architecture* binary - objects, so we need to search for libraries in the target architecture's - library path. -From: "P. J. McDermott" <pjm@nac.net> - -diff -Naur src.orig/ld/genscripts.sh src/ld/genscripts.sh ---- src.orig/ld/genscripts.sh 2010-12-15 09:56:37.000000000 -0500 -+++ src/ld/genscripts.sh 2012-11-11 05:23:39.143135998 -0500 -@@ -242,6 +242,7 @@ - fi - - LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'` -+LIB_SEARCH_DIRS="${LIB_SEARCH_DIRS}SEARCH_DIR(\"${OPK_TARGET_ARCH}\");" - - # We need it for testsuite. - set $EMULATION_LIBPATH |