blob: 6c46cef9951c7efb576029ae687fa6b065f116ef (
plain)
1
2
3
4
5
6
7
8
|
#!/bin/sh
export SPECSFILE=$(dirname "$(gcc -print-libgcc-file-name)")/asneeded.specs
export CURRPROFILE=/etc/env.d/gcc/$(gcc-config -c)
gcc -dumpspecs | sed -e '/link:/,+1 s:--eh-frame-hdr:\0 --as-needed:' > "$SPECSFILE"
sed "${CURRPROFILE}" -e '1i\GCC_SPECS='$SPECSFILE > "${CURRPROFILE}-asneeded"
gcc-config "$(basename "${CURRPROFILE}")-asneeded"
source /etc/profile
|