Add instructions for pie and ssp in clang

Just instructions for now because in a hurry... TODO:
- Add command explanations
- Update changelog
- also gcc in blfs needs to get the switches for default pie and
  default ssp
This commit is contained in:
Pierre Labastie 2022-09-09 18:52:42 +02:00
parent c8344b7909
commit 0472eb0f00

View File

@ -148,6 +148,15 @@
</listitem>
</itemizedlist>
<itemizedlist spacing="compact">
<listitem>
<para>
SSP patch:
<ulink url="&patch-root;/clang-&llvm-version;-enable_default_ssp-1.patch"/>
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">LLVM Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
@ -226,6 +235,7 @@ mv projects/compiler-rt-&llvm-version;.src projects/compiler-rt</userinput></scr
<!-- need <../<patch> instead of -i because -d changes directory
before applying -i -->
<screen><userinput remap="pre">patch -Np2 -d projects/compiler-rt &lt;../compiler-rt-14.0.6-glibc_2_36-1.patch</userinput></screen>
<screen><userinput remap="pre">patch -Np2 -d tools/clang &lt;../clang-&llvm-version;-enable_default_ssp-1.patch</userinput></screen>
<para>
Install <application>LLVM</application> by running the following
@ -245,6 +255,7 @@ cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DCLANG_DEFAULT_PIE_ON_LINUX=ON \
-Wno-dev -G Ninja .. &amp;&amp;
ninja</userinput></screen>