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