Date: Wed, 18 Aug 1999 09:00:02 -0700 (PDT) From: Motoyuki Konno <motoyuki@snipe.rim.or.jp> To: freebsd-ports@FreeBSD.org Subject: Re: ports/13224: bug of gcc-2.95? (-D__FreeBSD__=3=4) Message-ID: <199908181600.JAA28899@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/13224; it has been noted by GNATS. From: Motoyuki Konno <motoyuki@snipe.rim.or.jp> To: imura@cs.titech.ac.jp Cc: freebsd-gnats-submit@freebsd.org Subject: Re: ports/13224: bug of gcc-2.95? (-D__FreeBSD__=3=4) Date: Thu, 19 Aug 1999 00:20:45 +0900 Hi, imura@cs.titech.ac.jp wrote: > If a code have "__FreeBSD__" compile fails, because > $(LOCALBASE)/lib/gcc-lib/i386-portbld-freebsd3.2/2.95/specs says > "-D__FreeBSD__=3=4" which comes from $(WRKSRC)/gcc/specs, I'm not sure. > This may be $(WRKSRC)/gcc/stage1/specs or $(WRKSRC)/gcc/stage2/specs. > >How-To-Repeat: > Compile a code which have "__FreeBSD__". > >Fix: > Following patches may solve the problem. I think the problem caused by the followings. In the file ports/lang/egcs/files/freebsd.h, -------- #define CPP_FBSD_PREDEFINES " -Dunix -D__FreeBSD__=4 -Asystem(unix) -Asystem(FreeBSD) " -------- In the file ports/lang/egcs/Makefile -------- pre-configure: @(MAJ=`sysctl -n kern.osreldate | ${SED} -e '/.....$$/s///'` ; \ ${SED} -e "s:__FreeBSD__:__FreeBSD__=$${MAJ}:" ${FILESDIR}/freebsd.h \ >${WRKSRC}/gcc/config/freebsd.h ) -------- So, apply following patches to solve this problem. ========== --- ports/lang/egcs/files/freebsd.h.old Mon Aug 16 10:42:29 1999 +++ ports/lang/egcs/files/freebsd.h Thu Aug 19 00:19:48 1999 @@ -55,7 +55,7 @@ /* Place spaces around this string. We depend on string splicing to produce the final CPP_PREDEFINES value. */ -#define CPP_FBSD_PREDEFINES " -Dunix -D__FreeBSD__=4 -Asystem(unix) -Asystem(FreeBSD) " +#define CPP_FBSD_PREDEFINES " -Dunix -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) " /* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate libc, depending on whether we're doing profiling or need threads support. ========== -- ------------------------------------------------------------------------ Motoyuki Konno mkonno@res.yamanashi-med.ac.jp (Univ) motoyuki@snipe.rim.or.jp (Home) motoyuki@FreeBSD.ORG (FreeBSD Project) Yamanashi Medical University http://www.freebsd.org/~motoyuki/ (WWW) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908181600.JAA28899>