| Description: |
OriginalBugID: 3960 Bug
Version: 8.2.3
SubmitDate: '1999-12-29'
LastModified: '2000-01-03'
Severity: CRIT
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: BSD
OSVersion: NetBSD/SPARC 1.4
Machine: Sun SPARCstation IPX
FixedDate: '2000-01-03'
FixedInVersion: 8.3b2
Name: Andreas Gustafsson
CustomShell:
Some NetBSD specific changes to the configuration scripts, described in a separate
Comments:
The Tk Makefile currently specifies the "-fpic" compiler option when
building a shared library on NetBSD. However, on NetBSD 1.4.1 for Sun
SPARC, this will lead to a Global Offset Table overflow due to the
size of the Tk library.
The enclosed patch changes the compiler option to -fPIC (note the
all-caps PIC). This fixes the problem on the SPARC, and should be
harmless on other platforms. The patch is currently needed only for the
Tk library, not the Tcl library, but it makes sense to apply it to Tcl, too,
to prevent future problems as the Tcl library grows.
ReproducibleScript:
configure --enable-shared
make
ObservedBehavior:
Normal configure and make output, then:
ld -Bshareable -x -o libtk82.so.1.0 tk3d.o [...] -rpath
/usr/local/lib:/usr/X11R6/lib -L/home/gson/tcl/tcl8.2.3/unix
-L/usr/X11R6/lib -lX11 -lm -lc
ld: Global Offset Table overflow (use `-fPIC')
ld: tkCanvText.o: GOT overflow for relocation at 0x25b4
DesiredBehavior:
Successful linking.
Patch:
--- aclocal.m4.old Sun Dec 26 04:23:17 1999
+++ aclocal.m4 Sun Dec 26 04:24:25 1999
@@ -729,7 +729,8 @@
NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
# Not available on all versions: check for include file.
AC_CHECK_HEADER(dlfcn.h, [
- SHLIB_CFLAGS="-fpic"
+ # NetBSD/SPARC needs -fPIC, -fpic will not do.
+ SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld -Bshareable -x"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
PatchFiles:
aclocal.m4
Hmmm, I'd say that's a bug in the compiler, since most accept either
case, but it's easy enough to fix (will be in 8.3b2). Tcl's tcl.m4
was changed as well.
-- 01/03/2000 hobbs
|