!167 fix building with clang
From: @jchzhou Reviewed-by: @lyn1001 Signed-off-by: @lyn1001
This commit is contained in:
commit
ee6970ec4e
21
nodejs.spec
21
nodejs.spec
@ -1,4 +1,4 @@
|
||||
%global baserelease 1
|
||||
%global baserelease 2
|
||||
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
%global nodejs_epoch 1
|
||||
%global nodejs_major 20
|
||||
@ -237,10 +237,15 @@ export CXXFLAGS='%{optflags} \
|
||||
-O3 \
|
||||
-fno-ipa-icf'
|
||||
|
||||
export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')"
|
||||
export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')"
|
||||
export CFLAGS="$(echo ${CFLAGS} | tr -s '[:space:]\\' ' ')"
|
||||
export CXXFLAGS="$(echo ${CXXFLAGS} | tr -s '[:space:]\\' ' ')"
|
||||
export LDFLAGS="%{build_ldflags}"
|
||||
|
||||
%if "%toolchain" == "clang"
|
||||
export CFLAGS="$(echo ${CFLAGS} | sed -e s/-fno-ipa-icf//g)"
|
||||
export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e s/-fno-ipa-icf//g)"
|
||||
%endif
|
||||
|
||||
%{__python3} configure.py --prefix=%{_prefix} \
|
||||
--verbose \
|
||||
--ninja \
|
||||
@ -250,12 +255,14 @@ export LDFLAGS="%{build_ldflags}"
|
||||
--shared-zlib \
|
||||
--shared-brotli \
|
||||
--shared-libuv \
|
||||
--enable-lto \
|
||||
%{dtrace_configure} \
|
||||
--with-intl=small-icu \
|
||||
--with-icu-default-data-dir=%{icudatadir} \
|
||||
--without-corepack \
|
||||
--openssl-use-def-ca-store
|
||||
--openssl-use-def-ca-store \
|
||||
%if "%toolchain" != "clang"
|
||||
--enable-lto
|
||||
%endif
|
||||
|
||||
%ninja_build -C out/Release
|
||||
|
||||
@ -402,6 +409,10 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
|
||||
%{_pkgdocdir}/npm/docs
|
||||
|
||||
%changelog
|
||||
* Fri Nov 29 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 1:20.12.1-2
|
||||
- fix building w/ clang: only apply '-fno-ipa-icf' for gcc && disable LTO for clang + ld.bfd
|
||||
- improve the handling of trilling whitespaces in C/CXXFLAGS
|
||||
|
||||
* Wed Sep 18 2024 yaoxin <yao_xin001@hoperun.com> - 1:20.12.1-1
|
||||
- Update to 20.12.1:
|
||||
* CVE-2024-27983 - Assertion failed in node::http2::Http2Session::~Http2Session()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user