Skip to content

Instantly share code, notes, and snippets.

@vrodic
Created March 1, 2015 19:17
Show Gist options
  • Save vrodic/b26babf628a15df6fea3 to your computer and use it in GitHub Desktop.
Save vrodic/b26babf628a15df6fea3 to your computer and use it in GitHub Desktop.
Build 32bit Mesa on 64bit host (for 32bit game clients)
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
CFLAGS="-m32" CXXFLAGS="-m32" ./autogen.sh --prefix=/usr --libdir=/usr/lib32
#apt-get install libdrm-dev:i386
#apt-get install libgles2-mesa-dev:i386 libglu1-mesa-dev:i386 mesa-common-dev:i386 libegl1-mesa-dev:i386 libgl1-mesa-dev:i386
#apt-get install libfontconfig1-dev:i386 libfreetype6-dev:i386
#apt-get install libnl-dev libudev-dev:i386 libxml2-dev:i386 libxslt1-dev:i386
#apt-get install libegl1-mesa-dev:i386 libfontconfig1-dev:i386 libfreetype6-dev:i386 libgl1-mesa-dev:i386 libgles2-mesa-dev:i386 libglu1-mesa-dev:i386 libxcomposite-dev:i386 libxdamage-dev:i386 libxi-dev:i386 libxrandr-dev:i386 libxtst-dev:i386
#make clean
export CFLAGS="-m32 -O3 -mtune=native -march=native -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
export CXXFLAGS="-m32 -O3 -mtune=native -march=native -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
./configure --disable-egl --enable-glx-tls --with-gallium-drivers= --with-dri-drivers=i965 --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
make -j4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment