Date: Thu, 3 Dec 1998 22:46:41 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: roychri@total.net (Christian Roy) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Upgrading 2.1.7.1 to stable with broken compiler Message-ID: <199812032246.PAA15343@usr09.primenet.com> In-Reply-To: <199811301944.OAA19524@pablo.total.net> from "Christian Roy" at Nov 30, 98 02:31:50 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <bsd.lib.mk> ------------------------------------------------------------------------ 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812032246.PAA15343>