
Most Linux distros work around aliasing problems in Mesa by compiling with the GCC option -fno-strict-aliasing. Two examples: https://bugs.freedesktop.org/show_bug.cgi?id=6046 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=394311 This makes -fno-strict-aliasing the default with a comment that developers should consider commenting it out. There is a already a note about these bugs in docs/helpwanted.html.
29 lines
864 B
Plaintext
29 lines
864 B
Plaintext
# Configuration for building only libOSMesa on Linux, no Xlib driver
|
|
# This doesn't really have any Linux dependencies, so it should be usable
|
|
# on other (gcc-based) systems.
|
|
|
|
include $(TOP)/configs/default
|
|
|
|
CONFIG_NAME = linux-osmesa
|
|
|
|
# Compiler and flags
|
|
CC = gcc
|
|
CXX = g++
|
|
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
|
|
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
|
|
|
# Work around aliasing bugs - developers should comment this out
|
|
CFLAGS += -fno-strict-aliasing
|
|
CXXFLAGS += -fno-strict-aliasing
|
|
|
|
# Directories
|
|
SRC_DIRS = mesa glu
|
|
DRIVER_DIRS = osmesa
|
|
PROGRAM_DIRS = osdemos
|
|
|
|
|
|
# Dependencies
|
|
OSMESA_LIB_DEPS = -lm -lpthread
|
|
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
|
APP_LIB_DEPS = -lOSMesa -lGLU
|