Forums

Skip to content

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

[SOLVED] Manually creating a USE flag for local ebuilds

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
FieldMan
n00b
n00b
Posts: 2
Joined: Fri Jan 05, 2024 6:11 pm
Location: Philadelphia, PA

[SOLVED] Manually creating a USE flag for local ebuilds

  • Quote

Post by FieldMan » Fri Jan 05, 2024 6:49 pm

Good Afternoon!

I have recently taken on the perilous and possibly regrettable task of using the zig compiler as my default compiler on top of a musl-clang install. So far, have made a successful compile of 6.6.8 zen using the settings below. However, one consistent issue I have been running into is anything having to do with meson. I realize any sane person would use a fallback compiler-clang fallback, but clearly I'm not all there.

Instead, I want to create a custom USE Flag so that I can patch in this PR, bake in support for zig without waiting for upstream (I am very impatient). From here I also hope to start making experimental ZIG use flags for other packages where zig-specific compatibility patches might be needed. I apologize in advance if this seems like a newbie question, but could someone point me into the right direction on implementing this? For the curious, see below for my make.conf

Code: Select all

### CFLAGS ###
COMMON_FLAGS="-O2 -pipe -march=znver3"
CFLAGS="${COMMON_FLAGS} -flto=thin"
CXXFLAGS="${COMMON_FLAGS} -flto=thin"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-O2 -Wl,--as-needed"

### ZIG ENV (Default env) ###
CC="zig cc --target=x86_64-linux-musl"
CXX="zig c++ --target=x86_64-linux-musl"
AR="zig ar"
RANLIB="zig ranlib"
CHOST="x86_64-gentoo-linux-musl"
ZIG_TARGET="x86_64-linux-musl"
ZIG_MCPU="znver3"

LC_MESSAGES=C.utf8
MAKEOPTS="-j16 -l16"
FEATURES="ccache parallel-fetch"
ACCEPT_LICENSE=*

Last edited by FieldMan on Sat Jan 06, 2024 2:26 pm, edited 1 time in total.
Top
grknight
Retired Dev
Retired Dev
Posts: 2564
Joined: Fri Feb 20, 2015 9:36 pm

Re: Manually creating a USE flag for local ebuilds

  • Quote

Post by grknight » Fri Jan 05, 2024 6:57 pm

FieldMan wrote: Instead, I want to create a custom USE Flag so that I can patch in this PR, bake in support for zig without waiting for upstream (I am very impatient). From here I also hope to start making experimental ZIG use flags for other packages where zig-specific compatibility patches might be needed. I apologize in advance if this seems like a newbie question, but could someone point me into the right direction on implementing this?
Add it to the IUSE of the ebuild and then use it. Technically, it should be described in the metadata.xml where the ebuild lies but only tools look here and is OK to skip privately.

It is not ideal to have patches hide behind a USE flag. They really should be crafted to always apply.
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Sat Jan 06, 2024 7:40 am

What about https://wiki.gentoo.org/wiki//etc/portage/patches ?

Best Regards,
Georgi
Top
FieldMan
n00b
n00b
Posts: 2
Joined: Fri Jan 05, 2024 6:11 pm
Location: Philadelphia, PA

  • Quote

Post by FieldMan » Sat Jan 06, 2024 2:25 pm

I see why patches would be a better course of action. The entire ebuild repo is going to be built around zig compatibility anyways! Thank you for the help!
Top
Post Reply

4 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