It was reported that libpcap fails to link on freebsd-sparc:
http://bugs.gentoo.org/show_bug.cgi?id=247076

Patch in attachment fixes this issue. Please, apply.

-- 
Peter.
>From 8c8c09edc7f6315a4b2851578c957c616561cfd8 Mon Sep 17 00:00:00 2001
From: Peter Volkov <p...@gentoo.org>
Date: Sun, 9 May 2010 13:01:06 +0400
Subject: [PATCH] Fix build failure on freebsd-sparc

libpcap fails to link on sparc-fbsd with the following error:

sparc64-gentoo-freebsd7.2-ranlib libpcap.a
pcap-bpf.o: In function `pcap_cleanup_bpf':
pcap-bpf.c:(.text+0x6cc): relocation truncated to fit: R_SPARC_GOT13 against
symbol `__stderrp@@FBSD_1.0' defined in .data section in
/usr/lib/gcc/sparc64-gentoo-freebsd7.2/4.4.3/../../../libc.so

This patch fixes this issue by forcing -fPIC on sparc. Initially this
bug was reported: http://bugs.gentoo.org/247076
---
 aclocal.m4 |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index e5841ed..a086fc1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -245,7 +245,14 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
 		    # or accepts command-line arguments like
 		    # those the GNU linker accepts.
 		    #
-		    V_CCOPT="$V_CCOPT -fpic"
+		    case "$host_cpu" in
+		    	sparc*)
+				V_CCOPT="$V_CCOPT -fPIC"
+				;;
+			*)
+				V_CCOPT="$V_CCOPT -fpic"
+				;;
+		    esac
 		    V_SONAME_OPT="-Wl,-soname,"
 		    V_RPATH_OPT="-Wl,-rpath,"
 		    ;;
-- 
1.6.4.4

-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to