FreeBSD Bugzilla – Attachment 184497 Details for
Bug 219838
devel/bazel: Add CLANG38 option and make this port as a master port
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
bazel-clang38-options.diff
bazel-clang38-options.diff (text/plain), 2.70 KB, created by
Jov
on 2017-07-19 10:27:22 UTC
(
hide
)
Description:
bazel-clang38-options.diff
Filename:
MIME Type:
Creator:
Jov
Created:
2017-07-19 10:27:22 UTC
Size:
2.70 KB
patch
obsolete
>diff --git a/Makefile b/Makefile >index 054332d..e30c8bb 100644 >--- a/Makefile >+++ b/Makefile >@@ -7,7 +7,7 @@ CATEGORIES= devel java > MASTER_SITES= https://storage.googleapis.com/bazel/${PORTVERSION}/rc${FINALRC}/ > DISTNAME= bazel-${PORTVERSION}rc${FINALRC}-dist > >-MAINTAINER= aehlig@linta.de >+MAINTAINER?= aehlig@linta.de > COMMENT= Fast and correct build system > > LICENSE= APACHE20 >@@ -32,6 +32,13 @@ JAVA_VERSION= 1.8 > JAVA_BUILD= yes > JAVA_RUN= yes > >+CONFLICTS_INSTALL?= bazel-clang38 >+ >+OPTIONS_DEFINE= CLANG38 >+CLANG38_DESC= Use clang38 as default crosstool >+CLANG38_BUILD_DEPENDS= clang38:devel/llvm38 >+CLANG38_RUN_DEPENDS= clang38:devel/llvm38 >+ > # Have the location of the system-wide rc file reside ${ETCDIR}. > # Also adapt the sample file to disable persistent java workers as they > # do not work reliably on FreeBSD. >@@ -41,6 +48,10 @@ post-patch: > ${WRKSRC}/src/main/cpp/blaze_util_posix.cc > @${ECHO_CMD} build --strategy=Javac=standalone >> ${WRKSRC}/scripts/packages/debian/bazel.bazelrc > >+post-patch-CLANG38-on: >+ @${REINPLACE_CMD} -e 's=/usr/lib/clang=${LOCALBASE}/llvm38/lib/clang=' \ >+ -e 's=/usr/bin/clang=${LOCALBASE}/bin/clang38=' ${WRKSRC}/tools/cpp/CROSSTOOL >+ > do-build: > @${MKDIR} ${WRKDIR}/bazel_tmp > (if [ -z "$${SOURCE_DATE_EPOCH}" ] ; \ >diff --git a/files/patch-src_main_cpp_blaze__util__freebsd.cc b/files/patch-src_main_cpp_blaze__util__freebsd.cc >new file mode 100644 >index 0000000..fe3cd75 >--- /dev/null >+++ b/files/patch-src_main_cpp_blaze__util__freebsd.cc >@@ -0,0 +1,35 @@ >+--- src/main/cpp/blaze_util_freebsd.cc.orig 2017-06-25 06:51:02 UTC >++++ src/main/cpp/blaze_util_freebsd.cc >+@@ -73,16 +73,23 @@ void WarnFilesystemType(const string &ou >+ >+ string GetSelfPath() { >+ char buffer[PATH_MAX] = {}; >+- ssize_t bytes = readlink("/proc/curproc/file", buffer, sizeof(buffer)); >+- if (bytes == sizeof(buffer)) { >+- // symlink contents truncated >+- bytes = -1; >+- errno = ENAMETOOLONG; >+- } >+- if (bytes == -1) { >+- pdie(blaze_exit_code::INTERNAL_ERROR, "error reading /proc/curproc/file"); >++ auto pid = getpid(); >++ if (kill(pid, 0) < 0) return ""; >++ auto procstat = procstat_open_sysctl(); >++ unsigned int n; >++ auto p = procstat_getprocs(procstat, KERN_PROC_PID, pid, &n); >++ if (p) { >++ if (n != 1) { >++ pdie(blaze_exit_code::INTERNAL_ERROR, >++ "expected exactly one process from procstat_getprocs, got %d", n); >++ } >++ auto r = procstat_getpathname(procstat, p, buffer,PATH_MAX); >++ if (r != 0) { >++ pdie(blaze_exit_code::INTERNAL_ERROR, "error procstat_getpathname"); >++ } >++ procstat_freeprocs(procstat, p); >+ } >+- buffer[bytes] = '\0'; // readlink does not NUL-terminate >++ procstat_close(procstat); >+ return string(buffer); >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219838
:
183287
|
183288
|
183316
|
183320
| 184497 |
184809