> PIE FTBFS are now RC

I don’t know whose stupid idea this is, but…

>> severity 837420 serious
>Bug #837420 [src:dietlibc] dietlibc: FTBFS with bindnow and PIE enabled
>Severity set to 'serious' from 'important'

… this can’t be right — a library cannot be built PIE, it must be
built PIC instead.

@dietlibc maintainers: a solution for this (probably a proper one,
even) is to strip out -fpie/-fPIE from those CFLAGS and -pie from
those LDFLAGS we get from dpkg-buildflags during build, similar to
what mksh does for the builds against dietlibc:

if test $noopt = 1; then
        x=-O0
else
        x=-O2
fi
test $nodbg = 1 || x="$x -g"
dCFLAGS=$(dpkg-buildflags --get CFLAGS 2>/dev/null) || dCFLAGS=$x
# drop optimisation, debugging and PIC flags for mksh-static
for x in $dCFLAGS; do
        case $x in
        (-O*|-g*|-fPIE) ;;
        (*) sCFLAGS="$sCFLAGS $x" ;;
        esac
done
# add debugging flags right back, but more portable
test $nodbg = 1 || sCFLAGS="$sCFLAGS -g"

The first ($x) is for when dpkg-buildflags fails or does not
exist (backports), so it can probably be ignored. Then, we
drop -g* (like -gstabs and other fancy options that dietlibc
probably doesn’t like), anything PIE-related, and -Os (because
we set CC='diet -Os gcc').

HTH & HAND,
//mirabilos
-- 
21:49⎜<allamoox:#sendmail> I have a question guys,
     ⎜    Can I use my PC as SMTP server, I use Windows 7 .
     ⎜    Already googled and Installed IIS
     ⎜    but Still I can't send E-mail

Reply via email to