Skip to content

Commit f27f294

Browse files
committed
Disable PIC and PIE by default
1 parent 12956ae commit f27f294

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
id: check-cache
1818
uses: actions/cache@main
1919
with:
20-
key: gcc-15.1.0
20+
key: gcc-15.1.0-1
2121
lookup-only: true
2222
path: |
2323
/tmp/x86_64-linux-gnu.tar.xz
@@ -26,24 +26,6 @@ jobs:
2626
if: ${{ steps.check-cache.outputs.cache-hit != 'true' }}
2727
run: |
2828
bash './build.sh' 'native'
29-
- name: Create logs
30-
if: ${{ steps.check-cache.outputs.cache-hit != 'true' }} && '!cancelled()'
31-
run: |
32-
declare logs=''
33-
34-
while read file; do
35-
logs+="${file} "
36-
done <<< $(find "/tmp/gcc-"*"/build" -wholename '*/config.log')
37-
38-
tar --create --file=- ${logs} | xz --threads='0' --compress -9 > '/tmp/logs.tar.xz'
39-
- name: Upload logs
40-
if: ${{ steps.check-cache.outputs.cache-hit != 'true' }} && '!cancelled()'
41-
uses: actions/upload-artifact@main
42-
with:
43-
name: logs
44-
if-no-files-found: error
45-
path: |
46-
/tmp/logs.tar.xz
4729
- name: Generate tarball
4830
if: ${{ steps.check-cache.outputs.cache-hit != 'true' }}
4931
run: |
@@ -63,7 +45,7 @@ jobs:
6345
if: ${{ steps.check-cache.outputs.cache-hit != 'true' }}
6446
uses: actions/cache@main
6547
with:
66-
key: gcc-15.1.0
48+
key: gcc-15.1.0-1
6749
path: |
6850
/tmp/x86_64-linux-gnu.tar.xz
6951
/tmp/x86_64-linux-gnu.tar.xz.sha256
@@ -100,7 +82,7 @@ jobs:
10082
- name: Restore from cache
10183
uses: actions/cache@main
10284
with:
103-
key: gcc-15.1.0
85+
key: gcc-15.1.0-1
10486
fail-on-cache-miss: true
10587
path: |
10688
/tmp/x86_64-linux-gnu.tar.xz

build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,6 @@ for triplet in "${targets[@]}"; do
360360
mv "${toolchain_directory}/${triplet}/include/unwind.h" "${toolchain_directory}/${triplet}/include/unwind.h.bak"
361361
fi
362362

363-
if ! (( is_native )); then
364-
extra_configure_flags+=' --enable-default-pie'
365-
fi
366-
367363
[ -d "${gcc_directory}/build" ] || mkdir "${gcc_directory}/build"
368364

369365
cd "${gcc_directory}/build"
@@ -390,6 +386,7 @@ for triplet in "${targets[@]}"; do
390386
--enable-__cxa_atexit \
391387
--enable-cet='auto' \
392388
--enable-checking='release' \
389+
--disable-default-pie \
393390
--enable-default-ssp \
394391
--enable-gnu-indirect-function \
395392
--enable-languages='c,c++' \

0 commit comments

Comments
 (0)