aboutsummaryrefslogtreecommitdiff
path: root/package/jpeg/jpeg-libtool.patch
blob: 3c4b573e395987bba7db46c484ef9d871df79e5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- jpeg/configure
+++ jpeg/configure
@@ -1559,7 +1559,7 @@
   if test "x$LTSTATIC" = xno; then
     disable_static="--disable-static"
   fi
-  $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh
+  $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh $CHOST
 fi
 
 # Select memory manager depending on user input.
--- jpeg/ltconfig
+++ jpeg/ltconfig
@@ -299,6 +299,7 @@
 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 case "$host_os" in
 linux-gnu*) ;;
+linux-uclibc*) ;;
 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 esac
 
@@ -553,7 +553,9 @@
     # On HP-UX, both CC and GCC only warn that PIC is supported... then they
     # create non-PIC objects.  So, if there were any warnings, we assume that
     # PIC is not supported.
+    # Make sure we only test warnings on HP-UX (pic_flag == +Z) or we can
+    # easily break Linux builds http://bugs.gentoo.org/70947
-    if test -s conftest.err; then
+    if test -s conftest.err -a "$pic_flag" = "+Z"; then
       echo "$ac_t"no 1>&6
       can_build_shared=no
       pic_flag=
@@ -1210,7 +1210,6 @@
   else
     # Only the GNU ld.so supports shared libraries on MkLinux.
     case "$host_cpu" in
-    powerpc*) dynamic_linker=no ;;
     *) dynamic_linker='Linux ld.so' ;;
     esac
   fi
@@ -1259,6 +1260,25 @@
   fi
   ;;
 
+linux-uclibc*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
+  soname_spec='${libname}${release}.so.$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  deplibs_check_method=pass_all
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  # Note: copied from linux-gnu, and may not be appropriate.
+  hardcode_into_libs=yes
+  # Assume using the uClibc dynamic linker.
+  dynamic_linker="uClibc ld.so"
+  ;;
+
 netbsd* | openbsd*)
   version_type=sunos
   library_names_spec='${libname}${release}.so.$versuffix'