pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/firefox firefox: remove clang wrapper hacks, provi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b3908d80d722
branches: trunk
changeset: 771726:b3908d80d722
user: tnn <tnn%pkgsrc.org@localhost>
date: Fri Dec 24 12:09:47 2021 +0000
description:
firefox: remove clang wrapper hacks, provide explicit path to clang
There's no apparent benefit to run "clang for cbindgen" nor the wasm
cross compiler through pkgsrc wrappers. It does however cause issues when
the base compiler is clang.
TODO: apply same change to firefox LTS
diffstat:
www/firefox/mozilla-common.mk | 25 ++++++++++---------------
1 files changed, 10 insertions(+), 15 deletions(-)
diffs (53 lines):
diff -r 64c9afd5fd87 -r b3908d80d722 www/firefox/mozilla-common.mk
--- a/www/firefox/mozilla-common.mk Fri Dec 24 11:37:38 2021 +0000
+++ b/www/firefox/mozilla-common.mk Fri Dec 24 12:09:47 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.215 2021/12/22 16:17:00 ryoon Exp $
+# $NetBSD: mozilla-common.mk,v 1.216 2021/12/24 12:09:47 tnn Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -102,7 +102,13 @@
CONFIGURE_ARGS+= --disable-icf
CONFIGURE_ARGS+= --disable-updater
-#CONFIGURE_ARGS+= --with-libclang-path=${PREFIX}/lib
+.include "../../mk/compiler.mk"
+
+.if empty(PKGSRC_COMPILER:Mclang)
+# Set path to "clang for cbindgen" when target compiler is not clang.
+CONFIGURE_ARGS+= --with-clang-path=${PREFIX}/bin/clang
+.endif
+CONFIGURE_ARGS+= --with-libclang-path=${PREFIX}/lib
# RLBox WASM sandbox
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
@@ -112,6 +118,8 @@
.include "../../lang/wasi-libcxx/buildlink3.mk"
.include "../../lang/wasi-compiler-rt/buildlink3.mk"
CONFIGURE_ARGS+= --with-wasi-sysroot=${PREFIX}/wasi
+CONFIGURE_ENV+= WASM_CC=${PREFIX}/bin/clang
+CONFIGURE_ENV+= WASM_CXX=${PREFIX}/bin/clang++
.else
CONFIGURE_ARGS+= --without-wasm-sandboxed-libraries
.endif
@@ -172,19 +180,6 @@
${WRAPPER_DIR}/bin/rm
chmod +x ${WRAPPER_DIR}/bin/rm
-.PHONY: fix-clang-wrapper
-pre-configure: fix-clang-wrapper
-fix-clang-wrapper:
-.if empty(PKGSRC_COMPILER:M*clang*)
-# Firefox requires Clang during the build, even when building with GCC.
-# XXX: When using GCC, pkgsrc provides 'clang' wrappers that are actually gcc.
-# This breaks the build.
-# PR pkg/55647 https://gnats.netbsd.org/55647
- ${LN} -sf ${PREFIX}/bin/clang ${WRKDIR}/.cwrapper/bin/clang
- ${LN} -sf ${PREFIX}/bin/clang++ ${WRKDIR}/.cwrapper/bin/clang++
- ${LN} -sf ${PREFIX}/bin/clang-cpp ${WRKDIR}/.cwrapper/bin/clang-cpp
-.endif
-
# The configure test for __thread succeeds, but later we end up with:
# dist/bin/libxul.so: undefined reference to `__tls_get_addr'
CONFIGURE_ENV.NetBSD+= ac_cv_thread_keyword=no
Home |
Main Index |
Thread Index |
Old Index