NetBSD Problem Report #8685
Received: (qmail 7957 invoked from network); 26 Oct 1999 01:46:53 -0000
Message-Id: <19991026014651.17363.qmail@canolog.ninthwonder.com>
Date: 26 Oct 1999 01:46:51 -0000
From: briggs@canolog.ninthwonder.com
Reply-To: briggs@canolog.ninthwonder.com
To: gnats-bugs@gnats.netbsd.org
Subject: Mesa-glx does not build cleanly in pre-ELF i386 system
X-Send-Pr-Version: 3.95
>Number: 8685
>Category: pkg
>Synopsis: Mesa-glx does not build cleanly in pre-ELF i386 system
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 25 18:48:00 +0000 1999
>Closed-Date: Wed Oct 27 13:50:18 +0000 1999
>Last-Modified: Wed Oct 27 13:54:10 +0000 1999
>Originator: Allen Briggs
>Release: NetBSD 1.4.x
>Organization:
Ninth Wonder, LLC
>Environment:
NetBSD i386, TNT video
System: NetBSD canolog 1.4.1 NetBSD 1.4.1 (CANOLOG) #1: Sat Oct 2 09:46:31 EDT 1999 briggs@backup:/usr/src/sys/arch/i386/compile/CANOLOG i386
>Description:
When building Mesa-glx on NetBSD 1.4.1/i386, the build stops
on servGL/mesaglx/asm_386.S with an unknown pseudo-op .section.
>How-To-Repeat:
Attempt to build Mesa-glx on the above platform.
>Fix:
Apply the following patch (or similar--I'm not sure if the test
for __ELF__ is correct) to the Mesa package--not the Mesa-glx
package. The Mesa-glx package links over to the Mesa package
to grab this file during the build:
--- src/asm_386.S.orig Mon Oct 25 21:40:15 1999
+++ src/asm_386.S Mon Oct 25 21:40:07 1999
@@ -57,7 +57,7 @@
* Change this to .data if your system doesn't have .rodata
*/
#ifndef RODATA
-#if defined(FREEBSD) || defined(__EMX__)
+#if defined(FREEBSD) || defined(__EMX__) || (defined(__NetBSD__) && !defined(__ELF__))
#define RODATA .data
#else
#define RODATA .section .rodata
>Release-Note:
>Audit-Trail:
From: Allen Briggs <briggs@ninthwonder.com>
To: gnats-bugs@netbsd.org
Cc: tron@zhadum.de
Subject: Re: pkg/8685
Date: Tue, 26 Oct 1999 01:00:48 -0400
OK. My first patch was woefully incomplete. With this patch, I can
actually build and run glclock in an xsmesa context on my TNT card.
Boy, does it drag things a bit... ;-)
-allen
In the Mesa-3.0 package:
--- files/patch-sum 1999/07/15 15:51:43 1.2
+++ files/patch-sum 1999/10/26 04:52:38
@@ -4,3 +4,4 @@
MD5 (patch-ab) = c3385dd5619c0dd302be1049d80c9d6c
MD5 (patch-ac) = 0baf7f6443f12759dba28d67fe61a426
MD5 (patch-ad) = efea5edced1b2f572f79c267439849c4
+MD5 (patch-ae) = 950ae4f6a7e12dc47c4955513e14b8ac
--- /dev/null Tue Oct 26 00:52:36 1999
+++ patches/patch-ae Tue Oct 26 00:50:28 1999
@@ -0,0 +1,210 @@
+--- src/asm_386.S.orig Wed Jul 8 22:50:13 1998
++++ src/asm_386.S Tue Oct 26 00:46:37 1999
+@@ -57,13 +57,17 @@
+ * Change this to .data if your system doesn't have .rodata
+ */
+ #ifndef RODATA
+-#if defined(FREEBSD) || defined(__EMX__)
++#if defined(FREEBSD) || defined(__EMX__) || (defined(__NetBSD__) && !defined(__ELF__))
+ #define RODATA .data
+ #else
+ #define RODATA .section .rodata
+ #endif
+ #endif
+
++#if defined(FREEBSD) || (defined(__NetBSD__) && !defined(__ELF__))
++#define PREPEND_UNDERSCORE
++#endif
++
+ #ifndef DATA
+ #define DATA .data
+ #endif
+@@ -81,7 +85,7 @@
+ * void asm_transform_points3_general( GLuint n, GLfloat d[][4],
+ * GLfloat m[16], GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points3_general)
+ ALIGN
+ _asm_transform_points3_general:
+@@ -218,7 +222,7 @@
+ * void asm_transform_points3_identity( GLuint n, GLfloat d[][4],
+ * GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points3_identity)
+ ALIGN
+ _asm_transform_points3_identity:
+@@ -264,7 +268,7 @@
+ * void asm_transform_points3_2d( GLuint n, GLfloat d[][4], GLfloat m[16],
+ * GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points3_2d)
+ ALIGN
+ _asm_transform_points3_2d:
+@@ -404,7 +408,7 @@
+ * GLfloat m[16], GLfloat s[][4] );
+ *
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points3_2d_no_rot)
+ ALIGN
+ _asm_transform_points3_2d_no_rot:
+@@ -459,7 +463,7 @@
+ * void asm_transform_points3_3d( GLuint n, GLfloat d[][4], GLfloat m[16],
+ * GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points3_3d)
+ ALIGN
+ _asm_transform_points3_3d:
+@@ -572,7 +576,7 @@
+ * void asm_transform_points4_general( GLuint n, GLfloat d[][4],
+ * GLfloat m[16], GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points4_general)
+ ALIGN
+ _asm_transform_points4_general:
+@@ -728,7 +732,7 @@
+ * void asm_transform_points4_identity( GLuint n, GLfloat d[][4],
+ * GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points4_identity)
+ ALIGN
+ _asm_transform_points4_identity:
+@@ -758,7 +762,7 @@
+ * void asm_transform_points4_2d( GLuint n, GLfloat d[][4], GLfloat m[16],
+ * GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points4_2d)
+ ALIGN
+ _asm_transform_points4_2d:
+@@ -829,7 +833,7 @@
+ * void asm_transform_points4_2d_no_rot( GLuint n, GLfloat d[][4],
+ * GLfloat m[16], GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points4_2d_no_rot)
+ ALIGN
+ _asm_transform_points4_2d_no_rot:
+@@ -883,7 +887,7 @@
+ * void asm_transform_points4_3d( GLuint n, GLfloat d[][4], GLfloat m[16],
+ * GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points4_3d)
+ ALIGN
+ _asm_transform_points4_3d:
+@@ -1015,7 +1019,7 @@
+ * void asm_transform_points4_ortho( GLuint n, GLfloat d[][4],
+ * GLfloat m[16], GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points4_ortho)
+ ALIGN
+ _asm_transform_points4_ortho:
+@@ -1073,7 +1077,7 @@
+ * void asm_transform_points4_perspective( GLuint n, GLfloat d[][4],
+ * GLfloat m[16], GLfloat s[][4] );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_transform_points4_perspective)
+ ALIGN
+ _asm_transform_points4_perspective:
+@@ -1313,7 +1317,7 @@
+ * GLfloat s[][4], GLubyte clipmask[],
+ * GLubyte *ormask, GLubyte *andmask );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_project_and_cliptest_general)
+ ALIGN
+ _asm_project_and_cliptest_general:
+@@ -1333,7 +1337,7 @@
+ pushl %edx
+ pushl %edi
+ pushl %ecx
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ call _asm_transform_points4_general
+ #else
+ call asm_transform_points4_general
+@@ -1366,7 +1370,7 @@
+ * GLfloat s[][4], GLubyte clipmask[],
+ * GLubyte *ormask, GLubyte *andmask );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_project_and_cliptest_identity)
+ ALIGN
+ _asm_project_and_cliptest_identity:
+@@ -1384,7 +1388,7 @@
+ pushl %esi
+ pushl %edi
+ pushl %ecx
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ call _asm_transform_points4_identity
+ #else
+ call asm_transform_points4_identity
+@@ -1416,7 +1420,7 @@
+ * GLfloat s[][4], GLubyte clipmask[],
+ * GLubyte *ormask, GLubyte *andmask );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_project_and_cliptest_ortho)
+ ALIGN
+ _asm_project_and_cliptest_ortho:
+@@ -1436,7 +1440,7 @@
+ pushl %edx
+ pushl %edi
+ pushl %ecx
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ call _asm_transform_points4_ortho
+ #else
+ call asm_transform_points4_ortho
+@@ -1468,7 +1472,7 @@
+ * GLfloat s[][4], GLubyte clipmask[],
+ * GLubyte *ormask, GLubyte *andmask );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_asm_project_and_cliptest_perspective)
+ ALIGN
+ _asm_project_and_cliptest_perspective:
+@@ -1488,7 +1492,7 @@
+ pushl %edx
+ pushl %edi
+ pushl %ecx
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ call _asm_transform_points4_perspective
+ #else
+ call asm_transform_points4_perspective
+@@ -1575,7 +1579,7 @@
+ * GLfloat s[][4], GLboolean normalize,
+ * GLboolean rescale );
+ */
+-#ifdef FREEBSD
++#ifdef PREPEND_UNDERSCORE
+ GLOBAL(_gl_xform_normals_3fv)
+ ALIGN
+ _gl_xform_normals_3fv:
State-Changed-From-To: open->closed
State-Changed-By: tron
State-Changed-When: Wed Oct 27 06:50:18 PDT 1999
State-Changed-Why:
Patch added, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.