Skip to content

Commit

Permalink
Update gcc static-pie workaround
Browse files Browse the repository at this point in the history
Apply for gcc-12
  • Loading branch information
schaefi committed Oct 7, 2023
1 parent 79857c0 commit 91c5aaa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions package/gcc_fix_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ if [ ! -e /usr/bin/sudo ]; then
echo "no sudo available... skipped"
exit 0
fi
if [ -e /usr/bin/gcc-11.bin ];then
if [ -e /usr/bin/gcc-12.bin ];then
echo "gcc already wrapped... skipped"
exit 0
fi
if [ ! -e /usr/bin/gcc-11 ];then
echo "no gcc-11 system... skipped"
if [ ! -e /usr/bin/gcc-12 ];then
echo "no gcc-12 system... skipped"
exit 0
fi
mv /usr/bin/gcc-11 /usr/bin/gcc-11.bin
mv /usr/bin/gcc-12 /usr/bin/gcc-12.bin

cat >/usr/bin/gcc-11 <<- EOF
cat >/usr/bin/gcc-12 <<- EOF
#!/bin/bash
args=\$(echo \$@ | sed -e "s@static-pie@static@")
/usr/bin/gcc-11.bin \$args
/usr/bin/gcc-12.bin \$args
EOF

chmod 755 /usr/bin/gcc-11
chmod 755 /usr/bin/gcc-12

0 comments on commit 91c5aaa

Please sign in to comment.