Page MenuHomeFreeBSD

D31011.id91704.diff
No OneTemporary

D31011.id91704.diff

Index: Mk/bsd.gcc.mk
===================================================================
--- Mk/bsd.gcc.mk
+++ Mk/bsd.gcc.mk
@@ -14,9 +14,10 @@
# do so by specifying USE_GCC=X+ which requests at least GCC version X.
# To request a specific version omit the trailing + sign.
#
-# Optionally comma-separated arguments follow the version specifier.
-# Currently we support:
-# build ... which adds GCC as a build dependency (BUILD_DEPENDS) only.
+# Two optional and mutually exclusive arguments are supported after the version
+# specifier.
+# build: adds BUILD_DEPENDS on GCC
+# jit: adds LIB_DEPENDS on GCC for libgccjit
#
# If no arguments are specified, GCC is added as both a build dependency
# and a run time dependency.
@@ -35,6 +36,8 @@
# USE_GCC= 9:build # port requires GCC 9 at build time only.
# USE_GCC= 11+:build # port requires GCC 11 or later at build
# # time only.
+# USE_GCC= 11+:jit # port requires GCC 11 for a LIB_DEPENDS on
+# # libgccjit
#
# If you are wondering what your port exactly does, use "make test-gcc"
# to see some debugging.
@@ -58,12 +61,15 @@
.if ${_USE_GCC_ARGS:Mbuild}
_USE_GCC_ARGS:= ${_USE_GCC_ARGS:Nbuild}
+.elif ${_USE_GCC_ARGS:Mjit}
+_USE_GCC_ARGS:= ${_USE_GCC_ARGS:Njit}
+_USE_GCC_LIB_DEPENDS= yes
.else
_USE_GCC_RUN_DEPENDS= yes
.endif
.if !empty(_USE_GCC_ARGS)
-IGNORE= bad target specification in USE_GCC; only "build" is supported
+IGNORE= bad target specification in USE_GCC; only "build" and "jit" are supported
.endif
.if defined(USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING)
@@ -111,11 +117,13 @@
. else
_GCC_PORT:= gcc${V}
. endif
+. if !defined(_USE_GCC_LIB_DEPENDS)
CC:= gcc${V}
CXX:= g++${V}
CPP:= cpp${V}
+. endif
_GCC_RUNTIME:= ${LOCALBASE}/lib/gcc${V}
-. if ${PORTNAME} == gcc
+. if ${PORTNAME} == gcc || defined(_USE_GCC_LIB_DEPENDS)
# We don't want the rpath stuff while building GCC itself
# so we do not set the FLAGS as done in the else part.
# When building a GCC, we want the target libraries to be used and not the
@@ -132,7 +140,12 @@
CXXFLAGS:= ${CXXFLAGS:N-mretpoline}
.if defined(_GCC_PORT)
+. if defined(_USE_GCC_LIB_DEPENDS)
+LIB_DEPENDS+= libgccjit.so:lang/${_GCC_PORT}
+LDFLAGS= -L${LOCALBASE}/lib/${_GCC_PORT}
+. else
BUILD_DEPENDS+= ${CC}:lang/${_GCC_PORT}
+. endif
. if defined(_USE_GCC_RUN_DEPENDS)
RUN_DEPENDS+= ${CC}:lang/${_GCC_PORT}
. endif
@@ -163,4 +176,5 @@
@echo LDFLAGS=\"${LDFLAGS}\"
@echo "BUILD_DEPENDS=${BUILD_DEPENDS}"
@echo "RUN_DEPENDS=${RUN_DEPENDS}"
+ @echo "LIB_DEPENDS=${LIB_DEPENDS}"
.endif
Index: editors/emacs-devel/Makefile
===================================================================
--- editors/emacs-devel/Makefile
+++ editors/emacs-devel/Makefile
@@ -169,10 +169,9 @@
MAILUTILS_CONFIGURE_ENV_OFF= ac_cv_lib_lockfile_maillock=no \
ac_cv_prog_liblockfile=no
MODULES_CONFIGURE_WITH= modules
-NATIVECOMP_LIB_DEPENDS= libgccjit.so:lang/gcc11
+NATIVECOMP_USE= GCC=11+:jit
NATIVECOMP_CONFIGURE_WITH= native-compilation
NATIVECOMP_MAKE_ARGS= NATIVE_FULL_AOT=1
-NATIVECOMP_LDFLAGS= -L${LOCALBASE}/lib/gcc11
OSS_CONFIGURE_ON= --with-sound=oss
OTF_IMPLIES= XFT
OTF_LIB_DEPENDS= libotf.so:print/libotf

File Metadata

Mime Type
text/plain
Expires
Tue, May 19, 6:22 AM (2 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33297003
Default Alt Text
D31011.id91704.diff (3 KB)

Event Timeline