NetBSD Problem Report #7557
Received: (qmail 24001 invoked from network); 11 May 1999 21:11:40 -0000
Message-Id: <199905112111.OAA20284@charon.anim.dreamworks.com>
Date: Tue, 11 May 1999 14:11:36 -0700 (PDT)
From: abs@mono.org
Reply-To: abs@mono.org
To: gnats-bugs@gnats.netbsd.org
Subject: /usr/lib/c++rt0.o breaks with -fPIC code on sparc
X-Send-Pr-Version: 3.95
>Number: 7557
>Category: port-sparc
>Synopsis: /usr/lib/c++rt0.o breaks with -fPIC code on sparc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-sparc-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 11 14:20:02 +0000 1999
>Closed-Date: Sat May 06 01:50:39 +0000 2000
>Last-Modified: Wed Sep 05 01:12:27 +0000 2001
>Originator: David Brownlee
>Release: NetBSD 1.4
>Organization:
<a href="http://www.mono.org/">Monochrome</a>
>Environment:
System: NetBSD charon.anim.dreamworks.com 1.4 NetBSD 1.4 (GENERIC) #0: Sun May 9 03:00:22 MEST 1999 pk@flambard:/usr/src/sys/arch/sparc/compile/GENERIC sparc
>Description:
On sparc -fpic and -fPIC produce different, and incompatible code.
/usr/lib/c++rt0.o is compiled -fpic, which means it cannot work with
-fPIC code.
In particular this breaks compilation of KDE.
>How-To-Repeat:
Attempt to compile KDE from pkgsrc
>Fix:
Unpleasant workaround:
cd /usr/src/lib/csu/c++
cc -O2 -fPIC -DLIBC_SCCS -c c++rt0.c
mv /usr/lib/c++rt0.o /usr/lib/c++rt0.o.pic
mv c++rt0.o /usr/lib/c++rt0.o
[ compile KDE ]
[ move original c++rt0.o back ]
Fix would probably be either to
a) compile all pic code -fPIC
or
b) compile c++rt0.o both PIC and pic, and tweak toolchain to
use correct one depending on flags passed to cc.
>Release-Note:
>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: abs@mono.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: re: port-sparc/7557: /usr/lib/c++rt0.o breaks with -fPIC code on sparc
Date: Wed, 12 May 1999 09:54:32 +1000
argh!! can't we make `-fpic' on the sparc mean -fPIC ?!?!? and shouldn't
we at least build our own libraries -fPIC so they can possibly be linked
with anything that gets large? sigh.
State-Changed-From-To: open->closed
State-Changed-By: dmcmahill
State-Changed-When: Fri May 5 18:43:52 PDT 2000
State-Changed-Why:
/usr/lib/c++rt0.o is now compiled -fPIC (per mycroft's directions)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.