Skip to content

Commit

Permalink
net-proxy/daed: filter -march= -mtune= from cflags
Browse files Browse the repository at this point in the history
Signed-off-by: liuyujielol <[email protected]>
  • Loading branch information
liuyujielol authored and liangyongxiang committed Oct 13, 2023
1 parent 7d02f52 commit 1931bf6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
18 changes: 16 additions & 2 deletions net-proxy/daed/daed-0.3.3_p1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

EAPI=8

inherit systemd
inherit flag-o-matic systemd

DESCRIPTION="A Modern Dashboard For dae"
HOMEPAGE="https://github.com/daeuniverse/daed"
Expand Down Expand Up @@ -33,13 +33,27 @@ S="${WORKDIR}"

IUSE="+webui"

src_prepare() {
# Prevent conflicting with the user's flags
# https://devmanual.gentoo.org/ebuild-writing/common-mistakes/#-werror-compiler-flag-not-removed
sed -i -e 's/-Werror//' wing/dae-core/Makefile || die 'Failed to remove -Werror via sed'

default
}

src_compile(){
# sed -i '/git submodule update/d' wing/Makefile || die
# sed -i 's/git rev-parse --short HEAD/echo/' vite.config.ts || die
if ! use webui; then
cd wing || die
fi
GO_ROOT="${S}" emake CC=clang CFLAGS="$CFLAGS -fno-stack-protector" APPNAME="${PN}" VERSION="${PV}"

# for dae's ebpf target
# gentoo-zh#3720
filter-flags "-march=*" "-mtune=*"
append-cflags "-fno-stack-protector"

GO_ROOT="${S}" emake APPNAME="${PN}" VERSION="${PV}"
}

src_install(){
Expand Down
18 changes: 16 additions & 2 deletions net-proxy/daed/daed-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

EAPI=8

inherit git-r3 go-module systemd
inherit flag-o-matic git-r3 go-module systemd

DESCRIPTION="A Modern Dashboard For dae"
HOMEPAGE="https://github.com/daeuniverse/daed"
Expand Down Expand Up @@ -39,11 +39,25 @@ src_unpack(){
ego mod download -modcacherw
}

src_prepare() {
# Prevent conflicting with the user's flags
# https://devmanual.gentoo.org/ebuild-writing/common-mistakes/#-werror-compiler-flag-not-removed
sed -i -e 's/-Werror//' wing/dae-core/Makefile || die 'Failed to remove -Werror via sed'

default
}

src_compile(){
if ! use webui; then
cd wing || die
fi
GO_ROOT="${S}" emake CC=clang CFLAGS="$CFLAGS -fno-stack-protector" APPNAME="${PN}" VERSION="${PV}"

# for dae's ebpf target
# gentoo-zh#3720
filter-flags "-march=*" "-mtune=*"
append-cflags "-fno-stack-protector"

GO_ROOT="${S}" emake APPNAME="${PN}" VERSION="${PV}"
}

src_install(){
Expand Down

0 comments on commit 1931bf6

Please sign in to comment.