Bug#847554: clang: Clang should produce position independent code by default

Sylvestre Ledru sylvestre at mozilla.com
Sat Dec 10 03:58:16 UTC 2016


Hello,

Le 09/12/2016 à 00:45, Gregor Jasny a écrit :
> Package: clang
> Version: 1:3.8-34
> Severity: normal
>
> Dear Maintainer,
>
> gcc nowadys seems to be built with --enable-default-pie config option.
> That flag results in generation of position independent code and
> executables by default:
>
> $ gcc -dM -E - < /dev/null|egrep -i '(pie|pic)'
> #define __pie__ 2
> #define __PIE__ 2
> #define __pic__ 2
> #define __PIC__ 2
>
> $ g++ -o main main.cpp && readelf -h ./main | grep Type
>    Type: DYN (Shared object file)
>
> >From a useability and security perspective it would be nice if clang
> could follow the GCC behaviour.
Yes but probably not for the next release of Debian...

S



More information about the Pkg-llvm-team mailing list