From owner-freebsd-hackers Thu Dec 3 14:47:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA07645 for freebsd-hackers-outgoing; Thu, 3 Dec 1998 14:47:25 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA07638 for ; Thu, 3 Dec 1998 14:47:21 -0800 (PST) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.8/8.8.8) id PAA05622; Thu, 3 Dec 1998 15:47:05 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp04.primenet.com, id smtpd005476; Thu Dec 3 15:46:55 1998 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id PAA15343; Thu, 3 Dec 1998 15:46:41 -0700 (MST) From: Terry Lambert Message-Id: <199812032246.PAA15343@usr09.primenet.com> Subject: Re: Upgrading 2.1.7.1 to stable with broken compiler To: roychri@total.net (Christian Roy) Date: Thu, 3 Dec 1998 22:46:41 +0000 (GMT) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <199811301944.OAA19524@pablo.total.net> from "Christian Roy" at Nov 30, 98 02:31:50 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > This is my first post. I came here because FAQs, IRC, man pages and > friends couldn't help me much. > I do not have that much experience with freeBSD. This machine was used for > website statistic before but is no longer used. > There's some files in there that I would like to keep. I will back them up > but I would like to avoid installing from scratch (format) because I am not > in the same physical location as that machine. I am in canada and the > machine is in california. I do not want to ask the people that are there > because they charge too much. (And they do stupid mistakes). They are in > charge of the hosting and that's enough. When you use the 2.8.1 compiler, you get a different than the default path for the RTTI headers, the libgcc.a, and other various pieces of the compiler. Then when you compile something using the standard .mk templates, and you have DESTDIR set, the standard .mk templates will point the header and library paths *away* from the compiled in location, and *back* to the location of the default installed compiler. Needless to say, this will break code heinously. In general, I tend to hack my Makefiles to undo the .mk brain damage, which has yet to be corrected (mostly because the FreeBSD default compiler needs an upgrade, and there is controversy on whether to use EGCS or GNU 2.8.1 -- the source of which is the EGCS supporters never having tried to use a complex application with threads and exceptions, which doesn't work in EGCS unless you link all your programs against libc_r all the time, even if you nevere use threads). Here is an example of a hacked up Makefile for my C++ implementation of all of the java base classes: ------------------------------------------------------------------------ LIB=java CXX=g++28 CXXINCLUDES+= -frtti \ -I/usr/local/lib/gcc-lib/i386-unknown-freebsd2.2.5/2.8.1/include CC=gcc28 CDEBUGFLAGS= -ggdb CXXFLAGS+= ${CDEBUGFLAGS} -I../../include NOMAN= yes .include "${.CURDIR}/Makefile.inc" all: cp lib${LIB}.a ../../lib/lib${LIB}.a .include ------------------------------------------------------------------------ The magic is in the CXXINCLUDES line, which re-overrides the include path. See bsd.prog.mk and bsd,lib.mk for a detailed understanding of the .mk file brain damage that causes the problem with the non-default compiler. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message