Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] -mstackrealign CFLAGS for glibc x86 32bit

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
ololoshwin
n00b
n00b
Posts: 17
Joined: Thu Nov 25, 2021 8:13 am

[SOLVED] -mstackrealign CFLAGS for glibc x86 32bit

  • Quote

Post by ololoshwin » Thu Nov 25, 2021 8:39 am

I need to build sys-libs/glibc with -mstackrealign compiler flag to run old 32bit game.

How to set CFLAGS for glibc and abi_x86_32 only?
Last edited by ololoshwin on Thu Nov 25, 2021 9:20 pm, edited 1 time in total.
Top
ololoshwin
n00b
n00b
Posts: 17
Joined: Thu Nov 25, 2021 8:13 am

  • Quote

Post by ololoshwin » Thu Nov 25, 2021 9:11 pm

Portage is amazing.
Don't have to change ebuild.

Use package.env to affect only sys-libs/glibc.
/etc/portage/package.env:

Code: Select all

 sys-libs/glibc  glibc.conf 
Use CFLAGS_x86 environment variable to for 32bit target.
/etc/portage/env/glibc.conf:

Code: Select all

COMMON_FLAGS="-O2 -pipe -fpic -g"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
CFLAGS_x86="-m32 -mstackrealign ${COMMON_FLAGS}"

FEATURES="splitdebug"
Top
Post Reply

2 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic