Skip to content

Commit ce84b49

Browse files
authored
Fix: Disable executable stack in shared library build
Fix: Disable executable stack in shared library build
2 parents d97090a + 3133a67 commit ce84b49

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

.github/workflows/build-and-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# Linux - x86_64
2121
- os: ubuntu-latest
2222
arch: x86_64
23-
cmake_args: '-DCMAKE_BUILD_TYPE=Release -DARCH=native -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-fPIC"'
23+
cmake_args: '-DCMAKE_BUILD_TYPE=Release -DARCH=native -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_SHARED_LINKER_FLAGS="-z noexecstack"'
2424
artifact_name: 'librandomx_linux_x86_64.so'
2525
output_lib: 'librandomx_linux_x86_64.so'
2626
# macOS - x86_64

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Compile and copy the appropriate shared library for your platform:
6161
```bash
6262
cd randomx
6363
mkdir build && cd build
64-
cmake .. -DCMAKE_BUILD_TYPE=Release -DARCH=native -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-fPIC"
64+
cmake .. -DCMAKE_BUILD_TYPE=Release -DARCH=native -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_SHARED_LINKER_FLAGS="-z noexecstack"
6565
make -j4
6666
cp -i librandomx.so ../../src/main/resources/native/librandomx_linux_x86_64.so
6767
```
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)