Bug 2073

Summary: CFLAGS used for sunffb are incoherent on sparc linux using gcc; gcc should never use -mv8
Product: xorg Reporter: Ferris McCormick <fmccor>
Component: Driver/otherAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: alan.coopersmith, dberkholz, erik.andren, roland.mainz
Version: 6.8.0Keywords: patch
Hardware: SPARC   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch to avoid '-mv8' deprecated gcc compiler flag none

Description Ferris McCormick 2004-12-13 06:12:33 UTC
The build for programs/Xserver/hw/xfree86/drivers/sunffb uses incoherent CFLAGS:
namely,
it can end up using '-mcpu=ultrasparc -mv8' which says that the build requires
ultrasparc
extensions (for ffb support) on a v8 architecture (like SS20), which is just
nonsense.
Furthermore, the -mv8 flag to gcc is deprecated (should be -mcpu=v8, and if you
think of it
that way, it is clear that '-mcpu=ultrasparc -mcpu=v8' should be an error
condition.)

Problem seems to be that -mv8 means something else if a Sun compiler is used,
but Linux does not use a Sun compiler.

In fact, with this CFLAGS set, on ultrasparc, sunffb ends up being the only part
of xorg which might also run on SS20, but it
is just about the only part of xorg which must NOT run on SS20.

Following little patch fixes this and works fine (for me, at any rate).
=============================================
--- programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile-	2004-06-16
09:44:00.000000000 +0000
+++ programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile	2004-10-27
20:27:01.000000000 +0000
@@ -19,7 +19,7 @@
 VISOPTIONS = -DUSE_VIS
 ASVISOPTION = AsVISOption
 GCCVISOPTION = -Wa,$(ASVISOPTION)
-#if AsOutputArchSize == 32
+#if AsOutputArchSize == 32 && !defined(LinuxArchitecture)
 #define FFBCObjectRule(name)						@@\
 name.o: name.c								@@\
 	ObjectCompile(-mv8 -mtune=ultrasparc \
================================================
Comment 1 Ferris McCormick 2004-12-13 06:16:59 UTC
Created attachment 1537 [details] [review]
Patch to avoid '-mv8' deprecated gcc compiler flag

Patch reflecting the patch written out in the description.  gcc should never be
given '-mv8'
on sparc linux, and especially not for a module which is guaranteed NOT to run
on v8.
Comment 2 Ferris McCormick 2004-12-13 06:37:34 UTC
For completeness, here is a cross reference to a very long xorg-x11 discussion
for Sparc Linux:
http://bugs.gentoo.org/show_bug.cgi?id=61063
Comment 3 Erik Andren 2006-04-27 07:06:14 UTC
Is this still an issue using a current version of xorg?
Comment 4 Timo Jyrinki 2007-02-22 14:26:49 UTC
Marking broken (status null/blank) bugs in xorg with no activity in a long time as fixed. Please reopen if you think it's necessary, but first do a search if a similar bug report is already filed and in a NEW/ASSIGNED state. These bugs do not currently show in most search results as they do not have any status.

Sorry for this janitorial spam, you know where to send hate mails to when your inbox gets full of bugs you're subscribed to.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.