commit: 1df63f3196c3a873fcc8bd42016a55a630cf1a45 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sat Dec 28 18:35:52 2024 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sat Dec 28 19:45:35 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1df63f31
app-editors/emacs: Force gcc for jit native compilation Bug: https://bugs.gentoo.org/874657 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> app-editors/emacs/emacs-28.2-r15.ebuild | 20 ++++++++++++-------- app-editors/emacs/emacs-29.4-r1.ebuild | 20 ++++++++++++-------- app-editors/emacs/emacs-30.0.91.ebuild | 20 ++++++++++++-------- app-editors/emacs/emacs-30.0.92.ebuild | 20 ++++++++++++-------- app-editors/emacs/emacs-30.0.93.ebuild | 20 ++++++++++++-------- app-editors/emacs/emacs-30.0.9999-r1.ebuild | 20 ++++++++++++-------- app-editors/emacs/emacs-31.0.9999.ebuild | 20 ++++++++++++-------- 7 files changed, 84 insertions(+), 56 deletions(-) diff --git a/app-editors/emacs/emacs-28.2-r15.ebuild b/app-editors/emacs/emacs-28.2-r15.ebuild index bbc032cf7b63..2c7d3a1e56dd 100644 --- a/app-editors/emacs/emacs-28.2-r15.ebuild +++ b/app-editors/emacs/emacs-28.2-r15.ebuild @@ -142,12 +142,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -168,11 +162,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi default diff --git a/app-editors/emacs/emacs-29.4-r1.ebuild b/app-editors/emacs/emacs-29.4-r1.ebuild index 67e94a869c12..6fb6a878891e 100644 --- a/app-editors/emacs/emacs-29.4-r1.ebuild +++ b/app-editors/emacs/emacs-29.4-r1.ebuild @@ -170,12 +170,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -197,11 +191,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-30.0.91.ebuild b/app-editors/emacs/emacs-30.0.91.ebuild index 1806d63929bf..dd6905d7ea65 100644 --- a/app-editors/emacs/emacs-30.0.91.ebuild +++ b/app-editors/emacs/emacs-30.0.91.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-30.0.92.ebuild b/app-editors/emacs/emacs-30.0.92.ebuild index 1806d63929bf..dd6905d7ea65 100644 --- a/app-editors/emacs/emacs-30.0.92.ebuild +++ b/app-editors/emacs/emacs-30.0.92.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-30.0.93.ebuild b/app-editors/emacs/emacs-30.0.93.ebuild index 1806d63929bf..dd6905d7ea65 100644 --- a/app-editors/emacs/emacs-30.0.93.ebuild +++ b/app-editors/emacs/emacs-30.0.93.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-30.0.9999-r1.ebuild b/app-editors/emacs/emacs-30.0.9999-r1.ebuild index 1806d63929bf..dd6905d7ea65 100644 --- a/app-editors/emacs/emacs-30.0.9999-r1.ebuild +++ b/app-editors/emacs/emacs-30.0.9999-r1.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page diff --git a/app-editors/emacs/emacs-31.0.9999.ebuild b/app-editors/emacs/emacs-31.0.9999.ebuild index ebaeb7a948e3..ec1f01bdf898 100644 --- a/app-editors/emacs/emacs-31.0.9999.ebuild +++ b/app-editors/emacs/emacs-31.0.9999.ebuild @@ -167,12 +167,6 @@ QA_CONFIG_IMPL_DECL_SKIP=( statvfs64 re_set_syntax re_compile_pattern re_search re_match ) -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]] && use jit && ! tc-is-gcc; then - die "Emacs must be built with gcc[jit] if USE=jit is enabled." - fi -} - src_prepare() { if [[ ${PV##*.} = 9999 ]]; then FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \ @@ -194,11 +188,21 @@ src_prepare() { # for live ebuilds FULL_VERSION doesn't exist in global scope QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + # gccjit doesn't play well with ccache or distcc #801580 # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi fi # Fix filename reference in redirected man page
