Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Nov 1999 01:01:50 +0900
From:      SANETO Takanori <sanewo@ba2.so-net.ne.jp>
To:        "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: gcc 2.95.2 
Message-ID:  <199911191601.BAA26542@mail.ba2.so-net.ne.jp>
In-Reply-To: freebsd@gndrsh.dnsmgr.net's message of Tue, 16 Nov 1999 20:15:17 -0800. <199911170415.UAA20119@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <199911170415.UAA20119@gndrsh.dnsmgr.net>
	"Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> said:
>Something weird is going on... I can confirm Manfred's claim, I also just
>build XFree86 just before the compiler change.  I'm certainly not going to
>cvs update right now... :-)

After some investigation, I found that following reasons (both cpp
related) caused the failure of build/installing XFree86:

1. /usr/libexec/cpp now has no predefined symbols like __FreeBSD__,
   which makes imake unable to detect OS type automatically.

Following patch may fix it.

Index: config/imake/imakemdep.h
===================================================================
--- imakemdep.h 1999/09/05 14:53:23     1.1.1.5
+++ imakemdep.h 1999/11/16 15:17:39
@@ -330,6 +330,12 @@
 # ifdef __GNUC__
        "-traditional",
 # endif
+# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 90)
+/* this version of cpp doesn't predefine any specific symbols. driver (gcc) does. */
+#  if defined(__FreeBSD__)
+       "-D__FreeBSD__",
+#  endif
+# endif
 #endif
 #ifdef M4330
        "-DM4330",      /* Tektronix */


2. /usr/libexec/cpp does not accept "-undef" option any more. 

Index: config/cf/host.def
===================================================================
--- host.def    1999/09/23 23:00:33     1.7
+++ host.def    1999/11/18 13:42:23
@@ -4,6 +4,10 @@
 
 #define DefaultGcc2i386Opt     -Os -pipe -march=pentiumpro
 
+#if OSMajorVersion >= 4
+#define RawCppCmd              /usr/libexec/cpp /* -undef */
+#endif
+
 #define HasTk                  YES
 #define XF86SetupUsesStaticTk  NO
 

With these two patches, I can successfully build/install XFree86 with
gcc-2.95.2.

Hope it helps,
-- 
さねを <URL:mailto:sanewo@ba2.so-net.ne.jp>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911191601.BAA26542>