From e8fb0b1ddfc1ffdecb73a4692fa544c6920d8aef Mon Sep 17 00:00:00 2001 From: cshore Date: Wed, 6 Jul 2011 04:01:17 +0000 Subject: [PATCH] [packages] lang/perl: Fixed finding libm and friends due to Ubuntu 11.04 and Debian 6 (Wheezy) using arch dirs for system libraries instead of /usr/lib and /lib. Patch by Andy Doughertry, submitted by Jan. Thanks\! git-svn-id: svn://svn.openwrt.org/openwrt/packages@27468 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...00-host-libc-dir-moved-debian+derivatives.patch | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch diff --git a/lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch b/lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch new file mode 100644 index 000000000..2a0dd6b3d --- /dev/null +++ b/lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch @@ -0,0 +1,27 @@ +--- a/hints/linux.sh ++++ b/hints/linux.sh +@@ -133,6 +133,24 @@ case "$optimize" in + ;; + esac + ++# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries ++# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us ++# where to look. We don't want gcc's own libraries, however, so we ++# filter those out. ++# This could be conditional on Unbuntu, but other distributions may ++# follow suit, and this scheme seems to work even on rather old gcc's. ++# This unconditionally uses gcc because even if the user is using another ++# compiler, we still need to find the math library and friends, and I don't ++# know how other compilers will cope with that situation. ++# Still, as an escape hatch, allow Configure command line overrides to ++# plibpth to bypass this check. ++case "$plibpth" in ++'') plibpth=`gcc -print-search-dirs | grep libraries | ++ cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'` ++ plibpth="$plibpth" # Collapse all entries on one line ++ ;; ++esac ++ + # Are we using ELF? Thanks to Kenneth Albanowski + # for this test. + cat >try.c <<'EOM' -- 2.11.0